lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 2 Feb 2012 17:28:30 +0000
From:	Wei Liu <wei.liu2@...rix.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
CC:	<wei.liu2@...rix.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>,
	"Ian Campbell" <Ian.Campbell@...rix.com>,
	"konrad.wilk@...cle.com" <konrad.wilk@...cle.com>
Subject: Re: [RFC PATCH V4 02/13] netback: add module unload function.

On Thu, 2012-02-02 at 17:08 +0000, Eric Dumazet wrote:
> Le jeudi 02 février 2012 à 16:49 +0000, Wei Liu a écrit :
> > Enables users to unload netback module.
> > 
> > Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
> > Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
> > Signed-off-by: Wei Liu <wei.liu2@...rix.com>
> > ---
> >  drivers/net/xen-netback/common.h  |    1 +
> >  drivers/net/xen-netback/netback.c |   14 ++++++++++++++
> >  drivers/net/xen-netback/xenbus.c  |    5 +++++
> >  3 files changed, 20 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h
> > index 288b2f3..372c7f5 100644
> > --- a/drivers/net/xen-netback/common.h
> > +++ b/drivers/net/xen-netback/common.h
> > @@ -126,6 +126,7 @@ void xenvif_get(struct xenvif *vif);
> >  void xenvif_put(struct xenvif *vif);
> >  
> >  int xenvif_xenbus_init(void);
> > +void xenvif_xenbus_exit(void);
> >  
> >  int xenvif_schedulable(struct xenvif *vif);
> >  
> > diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
> > index d11205f..3059684 100644
> > --- a/drivers/net/xen-netback/netback.c
> > +++ b/drivers/net/xen-netback/netback.c
> > @@ -1670,5 +1670,19 @@ failed_init:
> >  
> >  module_init(netback_init);
> >  
> 
> While reviewing this code, I can see current netback_init() is buggy.
> 
> It assumes all online cpus xen_netbk_group_nr are numbered from 0 to
> xen_netbk_group_nr-1
> 
> This is not right.
> 

You're right about this.

But this part is destined to get wiped out (in the very near future?) --
see following patches. So I don't think it is worthy to fix this.


Wei.

> Instead of using :
> 
> xen_netbk = vzalloc(sizeof(struct xen_netbk) * xen_netbk_group_nr);
> 
> You should use a percpu variable to get proper NUMA properties.
> 
> And instead of looping like :
> 
> for (group = 0; group < xen_netbk_group_nr; group++) {
> 
> You must use :
> 
> for_each_online_cpu(cpu) {
> 	...
> }
> 
> [ and also use kthread_create_on_node() instead of kthread_create() ]
> 
> 
> 


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ