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:	Wed, 28 Sep 2011 11:18:59 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Stijn Devriendt <highguy@...il.com>
Cc:	Linus Walleij <linus.walleij@...ricsson.com>,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	Grant Likely <grant.likely@...retlab.ca>,
	Stephen Warren <swarren@...dia.com>,
	Barry Song <21cnbao@...il.com>,
	Lee Jones <lee.jones@...aro.org>,
	Joe Perches <joe@...ches.com>,
	Russell King <linux@....linux.org.uk>,
	Linaro Dev <linaro-dev@...ts.linaro.org>,
	Sascha Hauer <s.hauer@...gutronix.de>,
	David Brown <davidb@...eaurora.org>
Subject: Re: [PATCH 1/2] drivers: create a pin control subsystem v7

On Tue, Sep 27, 2011 at 11:30 AM, Stijn Devriendt <highguy@...il.com> wrote:
>> +       spin_unlock(&desc->lock);
>
> Now this is racing with...
> (...)
> ... this:
>
>> +       spin_lock(&desc->lock);
>> +       desc->mux_requested = true;
>> +       strncpy(desc->mux_function, function, sizeof(desc->mux_function));
>> +       spin_unlock(&desc->lock);

Good catch!

I've fixed it by setting ->mux_requested immediatelty and then
later release it (inside a lock) if something fails.

Yours,
Linus Walleij
--
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