Skip to content

Commit

Permalink
cnic: Fix symbol_put_addr() panic on ia64.
Browse files Browse the repository at this point in the history
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: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Michael Chan authored and David S. Miller committed Aug 16, 2009
1 parent 8cdb045 commit 64c6460
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/cnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2543,7 +2543,7 @@ static struct cnic_dev *init_bnx2_cnic(struct net_device *dev)
probe = symbol_get(bnx2_cnic_probe);
if (probe) {
ethdev = (*probe)(dev);
symbol_put_addr(probe);
symbol_put(bnx2_cnic_probe);
}
if (!ethdev)
return NULL;
Expand Down

0 comments on commit 64c6460

Please sign in to comment.