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]
Message-ID: <20111114181353.GC30922@google.com>
Date:	Mon, 14 Nov 2011 10:13:53 -0800
From:	Tejun Heo <tj@...nel.org>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	Ben Myers <bpm@....com>, xfs@....sgi.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/5] xfs: use per-filesystem I/O completion workqueues

Hello, Christoph.

On Mon, Nov 14, 2011 at 05:34:10AM -0500, Christoph Hellwig wrote:
> On Thu, Nov 10, 2011 at 11:42:42AM -0600, Ben Myers wrote:
> > > +STATIC int
> > > +xfs_init_mount_workqueues(
> > > +	struct xfs_mount	*mp)
> > > +{
> > > +#define XFS_WQ_NAME_LEN		512
> > > +	char			name[XFS_WQ_NAME_LEN];
> > > +
> > > +	snprintf(name, XFS_WQ_NAME_LEN, "xfs-data/%s", mp->m_fsname);
> > > +	mp->m_data_workqueue = alloc_workqueue(name, WQ_MEM_RECLAIM, 1);
> > > +	if (!mp->m_data_workqueue)
> > > +		goto out;
> > 
> > Looks to me like alloc_workqueue holds on to that name pointer in
> > wq->name... won't overwriting the name below be a problem?
> 
> It applies deep magic to make sure a pattern like mine is fine for
> the lockdep lock name, but just uses it directly for the workqueue name.

For lockdep lock name, it isn't about reusing but ensuring that same
lockdep key doesn't end up with different names which lockdep doesn't
allow.  But yeah, given that workqueue is dynamically allocated, it's
a bit silly to require the name to be constant.

> Oddly enough the names seem to display correctly on my test systems
> anyway.
> 
> Tejun, any chance to change alloc_workqueue to use the string pasting
> trick also for the normal workqueue name, or even better add a varargs
> version of alloc_workqueue?

Yeah, will whip something up.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ