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: <51187376.2060106@nvidia.com>
Date:	Mon, 11 Feb 2013 13:28:38 +0900
From:	Alex Courbot <acourbot@...dia.com>
To:	Grant Likely <grant.likely@...retlab.ca>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Linus Walleij <linus.walleij@...aro.org>,
	Alexandre Courbot <gnurou@...il.com>
Subject: Re: [PATCH] gpiolib: Fix locking on gpio debugfs files

On 02/09/2013 07:34 PM, Grant Likely wrote:
> The debugfs files really need to hold the gpiolib spinlock before
> accessing the list. Otherwise chip addition/removal will cause an oops.
>
> Cc: Alexandre Courbot <acourbot@...dia.com>
> Cc: Linus Walleij <linus.walleij@...aro.org>
> Signed-off-by: Grant Likely <grant.likely@...retlab.ca>

Tested-by: Alexandre Courbot <acourbot@...dia.com>

Just wondering: if we manage to change this spinlock into a mutex in the 
future, wouldn't it be better to acquire it only once in 
gpiolib_seq_start() and release it in gpiolib_seq_stop()?

Even though the protection introduced by this patch definitely improves 
the situation, it seems to me that chips could still be removed while 
being displayed by gpiolib_seq_show().

Thanks,
Alex.
--
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