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]
Message-ID: <20140212162311.GB26809@htj.dyndns.org>
Date:	Wed, 12 Feb 2014 11:23:11 -0500
From:	Tejun Heo <tj@...nel.org>
To:	Borislav Petkov <bp@...en8.de>
Cc:	Prarit Bhargava <prarit@...hat.com>, linux-edac@...r.kernel.org,
	Doug Thompson <dougthompson@...ssion.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] edac, poll timeout cannot be zero

Hello,

On Wed, Feb 12, 2014 at 04:57:53PM +0100, Borislav Petkov wrote:
> Ha, so this sounds like the issue because the splat happens
> when updating /sys/.../edac_mc_poll_msec and it goes and calls
> edac_mc_workq_setup()...
> 
> And this code is pretty old and edac_mc_workq_setup() is used both
> when one inits an edac driver and also when one wants to change the
> polling period (edac_mc_reset_delay_period) and thus needs to mod the
> workqueue's timeout.
> 
> So I'm guessing a simple fix would be to differentiate between the two
> paths, something like the diff below.
> 
> Or is there a reliable way to check whether a workqueue has been
> initialized already, say, something like
> 
> 	if (work->func)

Hah... can't you just do it on object initialization?  It's a bit
nasty and fragile to game initialization state.

> or so... I.e., what PREPARE_WORK() does?

It allows you to change the callback without breaking the
synchronization.  Of course, if there's a pending work item, it may or
may not execute the newly assigned function.  It's also a bit nasty
and has only few users in the whole kernel and I think we might wanna
get rid of them.

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