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] [day] [month] [year] [list]
Date:	Sat, 13 Dec 2008 14:01:56 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org, linux-net-drivers@...arflare.com
Subject: Re: [PATCH 25/33] sfc: Generate unique names for per-NIC workqueues

David Miller wrote:
> From: Ben Hutchings <bhutchings@...arflare.com>
> Date: Sat, 13 Dec 2008 06:23:03 +0000
> 
> > David Miller wrote:
> > > create_singlethread_workqueue() is going to reference this
> > > name buffer on the stack for the life of the workqueue, but
> > > once this function returns that reference will no longer
> > > be valid.
> >  
> > No, it's copied into the "comm" field of task_struct.
> 
> Hmmm...
> 
> create_singlethread_workqueue(name...
> 	--> __create_workqueue(name...
> 	--> __create_workqueue_key(name...
> 
> which goes:
> 	wq->cpu_wq = alloc_percpu(struct cpu_workqueue_struct);
>  ...
> 	wq->name = name;
> 
> Which looks like a dynamic memory assumption to me.

If you look carefully you'll see that wq->name is never used after
initialisation of single-threaded workqueues.  But I'd agree it's not
nice to have that dangling pointer around, so I'll respin this.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
--
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