From patchwork Tue Aug 14 15:05:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 1320931 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 268873FC81 for ; Tue, 14 Aug 2012 15:09:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756615Ab2HNPG2 (ORCPT ); Tue, 14 Aug 2012 11:06:28 -0400 Received: from mail-ey0-f174.google.com ([209.85.215.174]:33776 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756598Ab2HNPGY (ORCPT ); Tue, 14 Aug 2012 11:06:24 -0400 Received: by mail-ey0-f174.google.com with SMTP id c11so194843eaa.19 for ; Tue, 14 Aug 2012 08:06:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=7UFLInBIziUocFQWIKsjMrUuOFukaaiOuMNFkjgfXU4=; b=GVmvlBldfbjs16oA8xb9uQq7BkG3h8RZ7NWNQqutSbtVp4VbqIXpDRCBM2cNBHJUzp j9ujx1/WhuRvhpm3/oYGYbGwjq7N6D1zd+difFg0lJ7ApT+KkQ9bo77ttDVp7hWY0urI IuSj0rI+pExYQATco3rnCY9++gO/D3Kx21zPGoqhmRw+6Wm9wjjhnS/TnLRUThYcdh1S jJXW5mYIDh+T37Nub4qvfedYuzMyyAr/8nsFW6JOVD1kLfD0bLcxTGUc3X9W8vJF1V9Y qpzZ5ymThCFzgCsY6wCfUxGeTUFzByrC+Gy8ISiy2B9ANlHzn1LzmjEkw7vSQo7Ddf1+ d3VA== Received: by 10.14.172.129 with SMTP id t1mr19997548eel.34.1344956783388; Tue, 14 Aug 2012 08:06:23 -0700 (PDT) Received: from localhost (nat-pool-brq-t.redhat.com. [209.132.186.34]) by mx.google.com with ESMTPS id y1sm7631348eel.0.2012.08.14.08.06.22 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 14 Aug 2012 08:06:22 -0700 (PDT) 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 v2 09/15] qlcnic: guard __vlan_find_dev_deep() by rcu_read_lock Date: Tue, 14 Aug 2012 17:05:42 +0200 Message-Id: <1344956748-2099-10-git-send-email-jiri@resnulli.us> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1344956748-2099-1-git-send-email-jiri@resnulli.us> References: <1344956748-2099-1-git-send-email-jiri@resnulli.us> X-Gm-Message-State: ALoCoQl5BaZZP4dfFUDk7lEEBgRi5bTrmQooW+7WbXZWoppfpwryy+gipzPsyMXj9nBN2Z9iD8yr 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 --- 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 212c121..9eadf17 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c @@ -4425,12 +4425,14 @@ 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,