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

2014-04-16 Thread Li, ZhenHua
Hi David, I have sent out another patch for the fix. Thanks ZhenHua On 04/16/2014 02:30 PM, Li, ZhenHua wrote: Hi David, I think you are right. I checked other NIC drivers, found some of them call rtnl_lock and rtnl_unlock around netif_device_detach and attach functions, while some drivers did

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

2014-04-16 Thread Li, ZhenHua
Hi David, I think you are right. I checked other NIC drivers, found some of them call rtnl_lock and rtnl_unlock around netif_device_detach and attach functions, while some drivers did not. I will create a new patch in generic way to fix this. Regards ZhenHua On 04/16/2014 03:09 AM, David

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

2014-04-16 Thread Li, ZhenHua
Hi David, I think you are right. I checked other NIC drivers, found some of them call rtnl_lock and rtnl_unlock around netif_device_detach and attach functions, while some drivers did not. I will create a new patch in generic way to fix this. Regards ZhenHua On 04/16/2014 03:09 AM, David

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

2014-04-16 Thread Li, ZhenHua
Hi David, I have sent out another patch for the fix. Thanks ZhenHua On 04/16/2014 02:30 PM, Li, ZhenHua wrote: Hi David, I think you are right. I checked other NIC drivers, found some of them call rtnl_lock and rtnl_unlock around netif_device_detach and attach functions, while some drivers did

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

2014-04-15 Thread David Miller
From: "Li, Zhen-Hua" Date: Tue, 15 Apr 2014 14:45:52 +0800 > From: "Li, Zhen-Hua" > > In benet driver, netif_device_detach and netif_device_attach should be > called between rtnl_lock and rtnl_unlock. > > Signed-off-by: Li, Zhen-Hua This absolutely does not look like a driver specific

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

2014-04-15 Thread Li, Zhen-Hua
Yes, that's ok for me. 发自我的 iPhone 在 2014年4月15日,下午7:57,"Sathya Perla" 写道: >> -Original Message- >> From: Li, ZhenHua [mailto:zhen-h...@hp.com] >> >> Because netif_running() is called in netif_device_detach and >> netif_device_attach. To avoid dev status changed while >>

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

2014-04-15 Thread Sathya Perla
> -Original Message- > From: Li, ZhenHua [mailto:zhen-h...@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

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

2014-04-15 Thread Li, ZhenHua
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. Thanks Zhenhua On 04/15/2014 04:07 PM, Sathya Perla wrote:

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

2014-04-15 Thread Sathya Perla
> -Original Message- > From: Li, Zhen-Hua [mailto:zhen-h...@hp.com] > > In benet driver, netif_device_detach and netif_device_attach should be > called between rtnl_lock and rtnl_unlock. Zhen, it's not clear to me why rtnl_lock is needed around netif_device_attach(). Can you pls explain

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

2014-04-15 Thread Sathya Perla
-Original Message- From: Li, Zhen-Hua [mailto:zhen-h...@hp.com] In benet driver, netif_device_detach and netif_device_attach should be called between rtnl_lock and rtnl_unlock. Zhen, it's not clear to me why rtnl_lock is needed around netif_device_attach(). Can you pls explain what

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

2014-04-15 Thread Li, ZhenHua
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. Thanks Zhenhua On 04/15/2014 04:07 PM, Sathya Perla wrote:

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

2014-04-15 Thread Sathya Perla
-Original Message- From: Li, ZhenHua [mailto:zhen-h...@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

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

2014-04-15 Thread Li, Zhen-Hua
Yes, that's ok for me. 发自我的 iPhone 在 2014年4月15日,下午7:57,Sathya Perla sathya.pe...@emulex.com 写道: -Original Message- From: Li, ZhenHua [mailto:zhen-h...@hp.com] Because netif_running() is called in netif_device_detach and netif_device_attach. To avoid dev status changed while

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

2014-04-15 Thread David Miller
From: Li, Zhen-Hua zhen-h...@hp.com Date: Tue, 15 Apr 2014 14:45:52 +0800 From: Li, Zhen-Hua zhen-h...@hp.com In benet driver, netif_device_detach and netif_device_attach should be called between rtnl_lock and rtnl_unlock. Signed-off-by: Li, Zhen-Hua zhen-h...@hp.com This absolutely does