Re: [added to the 4.1 stable tree] switchdev: Require RTNL mutex to be held when sending FDB notifications

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thu, Mar 03, 2016 at 07:03:40PM IST, davem@xxxxxxxxxxxxx wrote:
>From: Ido Schimmel <idosch@xxxxxxxxxxxx>
>Date: Thu, 3 Mar 2016 11:35:31 +0200
>
>> Hi Sasha,
>> 
>> Wed, Mar 02, 2016 at 10:23:52PM IST, sasha.levin@xxxxxxxxxx wrote:
>>>From: Ido Schimmel <idosch@xxxxxxxxxxxx>
>>>
>>>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!

OK, I wasn't aware of that. I'm good with the current patch as is in
that case.

Thank you both.

>
>You can add notes in a "[]" bracketed section, but that's it.
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]