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:	Tue, 26 Aug 2014 15:24:10 +0200
From:	Samuel Thibault <samuel.thibault@...-lyon.org>
To:	Johannes Berg <johannes@...solutions.net>
Cc:	Hugh Dickins <hughd@...gle.com>, akpm@...ux-foundation.org,
	Sabrina Dubroca <sd@...asysnail.net>, Valdis.Kletnieks@...edu,
	Vincent Donnefort <vdonnefort@...il.com>,
	Bryan Wu <cooloney@...il.com>, linux-leds@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-wireless@...r.kernel.org
Subject: Re: [PATCHv2][input-led] Defer input led work to workqueue

Johannes Berg, le Tue 26 Aug 2014 15:22:07 +0200, a écrit :
> On Tue, 2014-08-26 at 11:17 +0200, Samuel Thibault wrote:
> 
> > -	led_trigger_event(&vt_led_triggers[led], !!brightness);
> > +	vt_led_state[led] = !!brightness;
> > +	schedule_work(&vt_led_work[led]);
> 
> 
> > +static int __init input_led_init(void)
> > +{
> > +	unsigned i;
> > +
> > +	for (i = 0; i < LED_CNT; i++)
> > +		INIT_WORK(&vt_led_work[i], vt_led_cb);
> > +
> > +	return 0;
> > +}
> > +
> > +static void __exit input_led_exit(void)
> > +{
> > +}
> 
> Come to think of it - don't you need to cancel_work_sync() in exit so
> the work struct can't be queued while the module is being unloaded?

Well, this is never built as a module ATM, so it's not a problem.

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