Return-Path: Received: from shards.monkeyblade.net ([149.20.54.216]:44273 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752348AbcCCRDo (ORCPT ); Thu, 3 Mar 2016 12:03:44 -0500 Date: Thu, 03 Mar 2016 12:03:40 -0500 (EST) Message-Id: <20160303.120340.1274644863637861160.davem@davemloft.net> To: idosch@mellanox.com Cc: sasha.levin@oracle.com, stable@vger.kernel.org, stable-commits@vger.kernel.org, jiri@mellanox.com Subject: Re: [added to the 4.1 stable tree] switchdev: Require RTNL mutex to be held when sending FDB notifications From: David Miller In-Reply-To: <20160303093531.GA5957@colbert.mtl.com> References: <1456950258-513-1-git-send-email-sasha.levin@oracle.com> <1456950258-513-8-git-send-email-sasha.levin@oracle.com> <20160303093531.GA5957@colbert.mtl.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: From: Ido Schimmel Date: Thu, 3 Mar 2016 11:35:31 +0200 > Hi Sasha, > > Wed, Mar 02, 2016 at 10:23:52PM IST, sasha.levin@oracle.com wrote: >>From: Ido Schimmel >> >>This patch has been added to the 4.1 stable tree. If you have any >>objections, please let us know. >> >>=============== >> >>[ Upstream commit 4f2c6ae5c64c353fb1b0425e4747e5603feadba1 ] >> >>When switchdev drivers process FDB notifications from the underlying >>device they resolve the netdev to which the entry points to and notify >>the bridge using the switchdev notifier. >> >>However, since the RTNL mutex is not held there is nothing preventing >>the netdev from disappearing in the middle, which will cause >>br_switchdev_event() to dereference a non-existing netdev. >> >>Make switchdev drivers hold the lock at the beginning of the >>notification processing session and release it once it ends, after >>notifying the bridge. >> >>Also, remove switchdev_mutex and fdb_lock, as they are no longer needed >>when RTNL mutex is held. > > You removed the fdb_lock bits from the commit below since they aren't > present in kernel 4.1. Can you remove it from the description as well? > Should probably be: > > "Also, remove switchdev_mutex, as it's no longer needed when RTNL mutex > is held." No, I did this, and I do not think editing the commit log message contents are appropriate for stable backports ever! You can add notes in a "[]" bracketed section, but that's it.