cnic: Fix symbol_put_addr() panic on ia64.
authorMichael Chan <mchan@broadcom.com>
Fri, 14 Aug 2009 15:49:43 +0000 (15:49 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 16 Aug 2009 01:50:42 +0000 (18:50 -0700)
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>
drivers/net/cnic.c

index 4869d77cbe91dc9fde5cee6b82babc8f50517ff7..ecde186fccd6afe1a9c2bd2bd1f1033c608be213 100644 (file)
@@ -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;