From: Michael Chan Date: Fri, 14 Aug 2009 15:49:43 +0000 (+0000) Subject: cnic: Fix symbol_put_addr() panic on ia64. X-Git-Tag: firefly_0821_release~13027^2~36 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=64c6460875957502541a4ba30835ac625a0bee79;p=firefly-linux-kernel-4.4.55.git 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: Michael Chan Signed-off-by: David S. Miller --- diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c index 4869d77cbe91..ecde186fccd6 100644 --- a/drivers/net/cnic.c +++ b/drivers/net/cnic.c @@ -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;