Message ID | 1389307663-11296-15-git-send-email-umalhi@cisco.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
diff --git a/drivers/infiniband/hw/usnic/usnic_ib_main.c b/drivers/infiniband/hw/usnic/usnic_ib_main.c index ae4e544..bbe614b 100644 --- a/drivers/infiniband/hw/usnic/usnic_ib_main.c +++ b/drivers/infiniband/hw/usnic/usnic_ib_main.c @@ -216,7 +216,7 @@ static int usnic_ib_netdevice_event(struct notifier_block *notifier, { struct usnic_ib_dev *us_ibdev; - struct net_device *netdev = ptr; + struct net_device *netdev = netdev_notifier_info_to_dev(ptr); mutex_lock(&usnic_ib_ibdev_list_lock); list_for_each_entry(us_ibdev, &usnic_ib_ibdev_list, ib_dev_link) {
usNIC netdev notifier is casting the *ptr directly to netdev. This is a bug. The netdev pointer should be retrieved via netdev_notifier_info_to_dev. Signed-off-by: Upinder Malhi <umalhi@cisco.com> --- drivers/infiniband/hw/usnic/usnic_ib_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)