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:	Thu, 23 Dec 2010 16:47:08 -0500
From:	David Dillow <dave@...dillows.org>
To:	Tejun Heo <tj@...nel.org>
Cc:	Roland Dreier <rdreier@...co.com>, linux-kernel@...r.kernel.org,
	Roland Dreier <rolandd@...co.com>,
	Sean Hefty <sean.hefty@...el.com>,
	Hal Rosenstock <hal.rosenstock@...il.com>
Subject: Re: [PATCH 01/30] infiniband: update workqueue usage

On Thu, 2010-12-16 at 17:50 +0100, Tejun Heo wrote:
> On 12/15/2010 07:33 PM, Roland Dreier wrote:
> > 
> >  > * qib_wq is removed and ib_wq is used instead.
> > 
> > You obviously looked at the comment
> > 
> > -	/*
> > -	 * We create our own workqueue mainly because we want to be
> > -	 * able to flush it when devices are being removed.  We can't
> > -	 * use schedule_work()/flush_scheduled_work() because both
> > -	 * unregister_netdev() and linkwatch_event take the rtnl lock,
> > -	 * so flush_scheduled_work() can deadlock during device
> > -	 * removal.
> > -	 */
> > -	qib_wq = create_workqueue("qib");
> > 
> > and know that with the new workqueue stuff, this issue no longer
> > exists.  But for both my education and also the clarity of the changelog
> > for this patch, perhaps you could expand on why ib_wq is safe here.
> 
> I think I got confused.  I thought the comment was indicating the
> separation between qib_wq and qib_cq_wq.  It's between system_wq and
> qib_wq, right?  I'll drop this part from the series, but then again
> what's the difference from ib_srp, which flushes the common workqueue?
> Why doesn't ib_srp have the same problem?

Looking at qib, I'm not sure the comment isn't confused -- the only
place I see where qib_wq or qib_cq_wq get flushed is by
destroy_workqueue() when the module is being unloaded. And we shouldn't
be there with rtnl_lock held by the caller.

Roland, please let me know how plan to proceed -- I need to update
ib_srp to get rid of *scheduled_work(), and I can either use the IB
core's queue, or define my own. Since it's cheap, I don't suppose it
matters much, but I think I'd prefer to share if possible.

Thanks,
Dave


--
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