Re: [PATCH 1/1] driver/net: add missing rtnl lock/unlock for benet

Li, Zhen-Hua
2014-04-15T13:01:17Z

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb2312", Size: 1004 bytes --]

Yes, that's ok for me.

·¢×ÔÎÒµÄ iPhone

ÔÚ 2014Äê4ÔÂ15ÈÕ£¬ÏÂÎç7:57£¬"Sathya Perla" <Sathya.Perla@Emulex.Com> Ð´µÀ£º

>> -----Original Message-----
>> From: Li, ZhenHua [mailto:zhen-hual@hp.com]
>>
>> Because netif_running() is called in netif_device_detach and
>> netif_device_attach. To avoid dev status changed while
>> netif_device_detach/attach is not finished, I think a rtnl_lock and
>> unlock should be called to avoid this.
>
> Ok. I'd like to then factor the code slightly differently by using
> routines like this:
>
> be_close_sync() {
> rtnl_lock();
>
> netif_device_detach(netdev);
> if (netif_running(netdev))
> be_close(netdev);
>
> rtnl_unlock();
> }
>
> and similarly for be_open_sync()
>
> And, I'd need some time to test these flows too.
> Would you be OK with this?
>
> thanks,
> -Sathya
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éÝ¶\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dÊ‡Ú™ë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥