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, 22 Mar 2011 16:59:02 +0200 (EET)
From:	Aaro Koskinen <aaro.koskinen@...ia.com>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
cc:	Aaro Koskinen <aaro.koskinen@...ia.com>,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] input: tsc2005: fix locking issue

Hi,

On Mon, 21 Mar 2011, Dmitry Torokhov wrote:
> On Mon, Mar 21, 2011 at 06:24:10PM +0200, Aaro Koskinen wrote:
>> Commit 0b950d3 (Input: tsc2005 - add open/close) introduced a
>> locking issue with the ESD watchdog: __tsc2005_disable() is calling
>> cancel_delayed_work_sync() with mutex held, and the work also needs the
>> same mutex.
>>
>> Fix the problem by using cancel_delayed_work() on disable. If
>> the ESD work was running it will check if the device is closed
>> or suspended, and in that case it will do nothing and skip
>> re-arming. cancel_delayed_work_sync() is still needed when the module
>> is removed.
>
> Hmm, indeed. However, instead of moving cancel_delayed_work_sync() to
> remove maybe we should use mutex_trylock() in tsc2005_esd_work()?
> If trylock fails that means that device is in the middle of open/close
> transition. We should just reschedule the work and get out of there.

But I guess the reschedule should not happen if we are in the middle of
close/disable? And without the mutex we cannot know that.

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