1 From: James Bottomley <James.Bottomley@HansenPartnership.com>
2 Subject: fcoe: fix incorrect use of struct module
3 Patch-mainline: 9296e519538b77b5070d49f2f9d66032733c76d4
4 References: bnc #468051
6 This structure may not be defined if CONFIG_MODULE=n, so never deref it. Change
7 uses of module->name to module_name(module) and corrects some dyslexic printks
10 Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
11 Cc: Robert Love <robert.w.love@intel.com>
12 Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
13 Acked-by: Bernhard Walle <bwalle@suse.de>
16 drivers/scsi/fcoe/libfcoe.c | 10 +++++-----
17 1 file changed, 5 insertions(+), 5 deletions(-)
19 --- a/drivers/scsi/fcoe/libfcoe.c
20 +++ b/drivers/scsi/fcoe/libfcoe.c
21 @@ -167,7 +167,7 @@ static int fcoe_cpu_callback(struct noti
22 #endif /* CONFIG_HOTPLUG_CPU */
25 - * foce_rcv - this is the fcoe receive function called by NET_RX_SOFTIRQ
26 + * fcoe_rcv - this is the fcoe receive function called by NET_RX_SOFTIRQ
27 * @skb: the receive skb
28 * @dev: associated net device
30 @@ -992,8 +992,8 @@ static int fcoe_ethdrv_get(const struct
32 owner = fcoe_netdev_to_module_owner(netdev);
34 - printk(KERN_DEBUG "foce:hold driver module %s for %s\n",
35 - owner->name, netdev->name);
36 + printk(KERN_DEBUG "fcoe:hold driver module %s for %s\n",
37 + module_name(owner), netdev->name);
38 return try_module_get(owner);
41 @@ -1012,8 +1012,8 @@ static int fcoe_ethdrv_put(const struct
43 owner = fcoe_netdev_to_module_owner(netdev);
45 - printk(KERN_DEBUG "foce:release driver module %s for %s\n",
46 - owner->name, netdev->name);
47 + printk(KERN_DEBUG "fcoe:release driver module %s for %s\n",
48 + module_name(owner), netdev->name);