From patchwork Fri Jan 4 08:48:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 1931551 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 740BD3FF0F for ; Fri, 4 Jan 2013 08:51:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754492Ab3ADIt5 (ORCPT ); Fri, 4 Jan 2013 03:49:57 -0500 Received: from mail-ee0-f47.google.com ([74.125.83.47]:43397 "EHLO mail-ee0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754144Ab3ADItr (ORCPT ); Fri, 4 Jan 2013 03:49:47 -0500 Received: by mail-ee0-f47.google.com with SMTP id e51so7794637eek.34 for ; Fri, 04 Jan 2013 00:49:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=aQSDGfKpUeKN34cdzFrogDdvyiYYwUuBaYv8wgXZhlc=; b=jYTwZucOL74Q03d+wEkj2zRh4/Xb5qn5GOmF1K4UtZTB+383eHK3QXa25WUDpu7wju w66fiIZqoIkt5gD8oTgptPswazh0rHgcnGWw8sW+UE54hetRE/zgargXWWtSS/gsWkPF lJA3orMRbAhBF5cS3ly5fH5uO8QuTkvQYn4UxCNb2O4lhxiSBJR8zxT8TthA7YuWHECs GpQwugLFQnQ6cRDw+igoo5ZUur0qXVVS18b5A85kJnmmd9BsIVx+SrgPn3/ae79NaqYb fJhq1CiBTcKeMz6WSlmMlpQ3nfLuxghGYwLw2n/rXRhvt2qBsh6O7vWjE9SXToZzh5VA cqnQ== X-Received: by 10.14.216.70 with SMTP id f46mr141904248eep.12.1357289386026; Fri, 04 Jan 2013 00:49:46 -0800 (PST) Received: from localhost (ip-89-103-8-129.net.upcbroadband.cz. [89.103.8.129]) by mx.google.com with ESMTPS id 6sm109289931eea.3.2013.01.04.00.49.43 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Jan 2013 00:49:45 -0800 (PST) From: Jiri Pirko To: netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, faisal.latif@intel.com, roland@kernel.org, sean.hefty@intel.com, hal.rosenstock@gmail.com, fubar@us.ibm.com, andy@greyhouse.net, divy@chelsio.com, jitendra.kalsaria@qlogic.com, sony.chacko@qlogic.com, linux-driver@qlogic.com, kaber@trash.net, ursula.braun@de.ibm.com, blaschka@linux.vnet.ibm.com, linux390@de.ibm.com, shemminger@vyatta.com, bhutchings@solarflare.com, therbert@google.com, xiyou.wangcong@gmail.com, joe@perches.com, gregory.v.rose@intel.com, john.r.fastabend@intel.com, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, bridge@lists.linux-foundation.org, fbl@redhat.com Subject: [patch net-next V6 09/15] qlcnic: guard __vlan_find_dev_deep() by rcu_read_lock Date: Fri, 4 Jan 2013 09:48:57 +0100 Message-Id: <1357289343-817-10-git-send-email-jiri@resnulli.us> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1357289343-817-1-git-send-email-jiri@resnulli.us> References: <1357289343-817-1-git-send-email-jiri@resnulli.us> X-Gm-Message-State: ALoCoQmF4MB/v0syOo1FmNz2uLwQYEaOkTC9nuIVwGZE0ACVSLOVPfggGEZAUMg/dnRtJ4yQhQjJ Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org rcu_read_lock was missing here Signed-off-by: Jiri Pirko Acked-by: Sony Chacko --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c index 137ca13..3655ca2 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c @@ -3186,12 +3186,14 @@ void qlcnic_restore_indev_addr(struct net_device *netdev, unsigned long event) qlcnic_config_indev_addr(adapter, netdev, event); + rcu_read_lock(); for_each_set_bit(vid, adapter->vlans, VLAN_N_VID) { dev = __vlan_find_dev_deep(netdev, vid); if (!dev) continue; qlcnic_config_indev_addr(adapter, dev, event); } + rcu_read_unlock(); } static int qlcnic_netdev_event(struct notifier_block *this,