Commit 64c64608 authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

cnic: Fix symbol_put_addr() panic on ia64.

When the cnic driver tries to grab a symbol from bnx2 when bnx2 is
running init code, symbol_get() will succeed but symbol_put_addr()
will hit BUG() a moment later.  module_text_address() fails because
bnx2 is still in init code.

This is fixed by using symbol_put() instead which does the exact
opposite of symbol_get().
Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8cdb0456
...@@ -2543,7 +2543,7 @@ static struct cnic_dev *init_bnx2_cnic(struct net_device *dev) ...@@ -2543,7 +2543,7 @@ static struct cnic_dev *init_bnx2_cnic(struct net_device *dev)
probe = symbol_get(bnx2_cnic_probe); probe = symbol_get(bnx2_cnic_probe);
if (probe) { if (probe) {
ethdev = (*probe)(dev); ethdev = (*probe)(dev);
symbol_put_addr(probe); symbol_put(bnx2_cnic_probe);
} }
if (!ethdev) if (!ethdev)
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment