From patchwork Fri Dec 20 20:26:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Upinder Malhi (umalhi)" X-Patchwork-Id: 3391731 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4DD24C0D4A for ; Fri, 20 Dec 2013 20:27:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9DA2D20709 for ; Fri, 20 Dec 2013 20:27:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ADD3E20666 for ; Fri, 20 Dec 2013 20:27:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751797Ab3LTU1Q (ORCPT ); Fri, 20 Dec 2013 15:27:16 -0500 Received: from mtv-iport-2.cisco.com ([173.36.130.13]:9511 "EHLO mtv-iport-2.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753512Ab3LTU1M (ORCPT ); Fri, 20 Dec 2013 15:27:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=908; q=dns/txt; s=iport; t=1387571232; x=1388780832; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=II0ZlVxOHeeVv9qTNX6KtME3fiZrUPovWpYTzgaT9t0=; b=fpvmo+cK5KdXDKEk0cRor3/Q4WQszOidKZeC3siM/cnN4R86HkRCEKU6 nabQelLEbBVzMKr84YFCLf9qhiooB+jfXWb89IoygPTJHI1LAaS4sD0DG VrSl/WgVJqocgblA+KdGNzjPanZTAurfq7x80pGyDPF+3MulHpOhzGCO2 0=; X-IronPort-AV: E=Sophos;i="4.95,523,1384300800"; d="scan'208";a="101113187" Received: from mtv-core-2.cisco.com ([171.68.58.7]) by mtv-iport-2.cisco.com with ESMTP; 20 Dec 2013 20:27:11 +0000 Received: from sjc-savbu-bld03.cisco.com (sjc-savbu-bld03.cisco.com [171.71.188.58]) by mtv-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id rBKKR9GW028548; Fri, 20 Dec 2013 20:27:10 GMT Received: by sjc-savbu-bld03.cisco.com (Postfix, from userid 246720) id 1150C3F821; Fri, 20 Dec 2013 12:27:10 -0800 (PST) From: Upinder Malhi To: linux-rdma@vger.kernel.org, roland@kernel.org Cc: Upinder Malhi Subject: [PATCH for-next 14/15] IB/usnic: Use netdev_notifier_info_to_dev to get netdev Date: Fri, 20 Dec 2013 12:26:45 -0800 Message-Id: <1387571206-8043-15-git-send-email-umalhi@cisco.com> X-Mailer: git-send-email 1.8.0-rc0 In-Reply-To: <1387571206-8043-1-git-send-email-umalhi@cisco.com> References: <1387571206-8043-1-git-send-email-umalhi@cisco.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-15.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY, USER_IN_DEF_DKIM_WL autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/infiniband/hw/usnic/usnic_ib_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {