[PATCH net v4] xen-netback: fix race condition on XenBus disconnect

2017-03-10 Thread Igor Druzhinin
In some cases during XenBus disconnect event handling and subsequent queue resource release there may be some TX handlers active on other processors. Use RCU in order to synchronize with them. Signed-off-by: Igor Druzhinin <igor.druzhi...@citrix.com> --- v4: * Use READ_ONCE i

[PATCH net v3] xen-netback: fix race condition on XenBus disconnect

2017-03-09 Thread Igor Druzhinin
In some cases during XenBus disconnect event handling and subsequent queue resource release there may be some TX handlers active on other processors. Use RCU in order to synchronize with them. Signed-off-by: Igor Druzhinin <igor.druzhi...@citrix.com> --- v3: * Fix unintended semantic

Re: [PATCH net v2] xen-netback: fix race condition on XenBus disconnect

2017-03-06 Thread Igor Druzhinin
On 06/03/17 08:58, Paul Durrant wrote: >> -Original Message- >> From: Igor Druzhinin [mailto:igor.druzhi...@citrix.com] >> Sent: 03 March 2017 20:23 >> To: netdev@vger.kernel.org; xen-de...@lists.xenproject.org >> Cc: Paul Durrant <paul.durr...@citr

[PATCH net v2] xen-netback: fix race condition on XenBus disconnect

2017-03-03 Thread Igor Druzhinin
In some cases during XenBus disconnect event handling and subsequent queue resource release there may be some TX handlers active on other processors. Use RCU in order to synchronize with them. Signed-off-by: Igor Druzhinin <igor.druzhi...@citrix.com> --- v2: * Add prot

Re: [PATCH] xen-netback: fix race condition on XenBus disconnect

2017-03-03 Thread Igor Druzhinin
On 03/03/17 09:18, Paul Durrant wrote: >> -Original Message- >> From: Igor Druzhinin [mailto:igor.druzhi...@citrix.com] >> Sent: 02 March 2017 22:57 >> To: netdev@vger.kernel.org; xen-de...@lists.xenproject.org >> Cc: Paul Durrant <paul.durr...@citr

Re: [PATCH] xen-netback: fix race condition on XenBus disconnect

2017-03-03 Thread Igor Druzhinin
On 03/03/17 09:18, Paul Durrant wrote: >> -Original Message- >> From: Igor Druzhinin [mailto:igor.druzhi...@citrix.com] >> Sent: 02 March 2017 22:57 >> To: netdev@vger.kernel.org; xen-de...@lists.xenproject.org >> Cc: Paul Durrant <paul.durr...@citr

[PATCH] xen-netback: fix race condition on XenBus disconnect

2017-03-02 Thread Igor Druzhinin
In some cases during XenBus disconnect event handling and subsequent queue resource release there may be some TX handlers active on other processors. Use RCU in order to synchronize with them. Signed-off-by: Igor Druzhinin <igor.druzhi...@citrix.com> --- drivers/net/xen-netback/interface.

Re: BUG due to "xen-netback: protect resource cleaning on XenBus disconnect"

2017-03-02 Thread Igor Druzhinin
On 02/03/17 12:19, Paul Durrant wrote: >> -Original Message- >> From: Juergen Gross [mailto:jgr...@suse.com] >> Sent: 02 March 2017 12:13 >> To: Wei Liu <wei.l...@citrix.com> >> Cc: Igor Druzhinin <igor.druzhi...@citrix.com>; xen-devel > de..

[PATCH v2 1/2] xen-netback: fix memory leaks on XenBus disconnect

2017-01-17 Thread Igor Druzhinin
Eliminate memory leaks introduced several years ago by cleaning the queue resources which are allocated on XenBus connection event. Namely, queue structure array and pages used for IO rings. Signed-off-by: Igor Druzhinin <igor.druzhi...@citrix.com> --- drivers/net/xen-netback/xenbus.

[PATCH v2 2/2] xen-netback: protect resource cleaning on XenBus disconnect

2017-01-17 Thread Igor Druzhinin
vif->lock is used to protect statistics gathering agents from using the queue structure during cleaning. Signed-off-by: Igor Druzhinin <igor.druzhi...@citrix.com> --- drivers/net/xen-netback/interface.c | 6 -- drivers/net/xen-netback/xenbus.c| 2 ++ 2 files changed, 6 inserti

[PATCH v2 0/2] xen-netback: fix memory leaks on XenBus disconnect

2017-01-17 Thread Igor Druzhinin
Just split the initial patch in two as proposed by Wei. Since the approach for locking netdev statistics is inconsistent (tends not to have any locking at all) accross the kernel we'd better to rely on our internal lock for this purpose. Igor Druzhinin (2): xen-netback: fix memory leaks

Re: [PATCH] xen-netback: fix memory leaks on XenBus disconnect

2017-01-13 Thread Igor Druzhinin
On 13/01/17 10:38, Wei Liu wrote: > On Thu, Jan 12, 2017 at 05:51:56PM +0000, Igor Druzhinin wrote: >> Eliminate memory leaks introduced several years ago by cleaning the queue >> resources which are allocated on XenBus connection event. Namely, queue >> structure array and pa

Re: [PATCH] xen-netback: fix memory leaks on XenBus disconnect

2017-01-12 Thread Igor Druzhinin
On 12/01/17 17:51, Igor Druzhinin wrote: > Eliminate memory leaks introduced several years ago by cleaning the queue > resources which are allocated on XenBus connection event. Namely, queue > structure array and pages used for IO rings. > vif->lock is used to protect statistics g

[PATCH] xen-netback: fix memory leaks on XenBus disconnect

2017-01-12 Thread Igor Druzhinin
ing. Signed-off-by: Igor Druzhinin <igor.druzhi...@citrix.com> --- drivers/net/xen-netback/interface.c | 6 -- drivers/net/xen-netback/xenbus.c| 13 + 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xe