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, 3 Feb 2009 03:33:45 +0300
From:	Anton Vorontsov <cbouatmailru@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Balaji Rao <balajirrao@...nmoko.org>, linux-kernel@...r.kernel.org,
	cbou@...l.ru, andy@...nmoko.com
Subject: Re: [PATCH 3/3] pcf50633_charger: Enable periodic charging restart

On Mon, Feb 02, 2009 at 02:41:31PM -0800, Andrew Morton wrote:
> On Tue, 27 Jan 2009 19:23:12 +0530
> Balaji Rao <balajirrao@...nmoko.org> wrote:
> 
> > @@ -157,6 +213,7 @@ pcf50633_mbc_irq_handler(int irq, void *data)
> >  		mbc->usb_online = 0;
> >  		mbc->usb_active = 0;
> >  		pcf50633_mbc_usb_curlim_set(mbc->pcf, 0);
> > +		cancel_delayed_work_sync(&mbc->charging_restart_work);
> >  	}
> 
> eek, can't call cancel_delayed_work_sync() from an interrupt handler! 

It's rather confusing, but it's not an irq handler, in the sense that
it does not run in atomic context -- the PCF IRQ handlers run in
kernel threads.

It's done that way because PCF50633 is an I2C device, and normally
we can't access I2C devices in the atomic context (plus it's rather
slow, thus would cause huge latencies if we'd try).

-- 
Anton Vorontsov
email: cbouatmailru@...il.com
irc://irc.freenode.net/bd2
--
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