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: <55097BF5.8080600@ti.com>
Date:	Wed, 18 Mar 2015 18:51:57 +0530
From:	Kishon Vijay Abraham I <kishon@...com>
To:	Linus Walleij <linus.walleij@...aro.org>
CC:	Nishanth Menon <nm@...com>, Alexandre Courbot <gnurou@...il.com>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Sekhar Nori <nsekhar@...com>,
	Linux-OMAP <linux-omap@...r.kernel.org>,
	"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
	Benoit Parrot <bparrot@...com>
Subject: Re: [PATCH] gpio: pcf857x: restore the initial line state of all
 pcf lines

Hi,

On Wednesday 18 March 2015 05:51 PM, Linus Walleij wrote:
> On Mon, Mar 16, 2015 at 9:46 AM, Kishon Vijay Abraham I <kishon@...com> wrote:
>> On Wednesday 14 January 2015 05:28 PM, Linus Walleij wrote:
>
>>> #include <linux/reboot.h>
>>>
>>> static int foo_reboot_handler(struct notifier_block *this,
>>>                                   unsigned long code,
>>>                                   void *unused)
>>> {
>>>           pr_crit("do some last minute stuff\n");
>>>           return NOTIFY_OK;
>>> }
>>>
>>> static struct notifier_block foo_reboot_notifier = {
>>>           .notifier_call = foo_reboot_handler,
>>> };
>>>
>>> register_reboot_notifier(&foo_reboot_notifier);
>>
>>
>> Added debug prints and found the reboot notifier gets invoked before the
>> shutdown handler which means some stuff can be done after this reboot
>> notifier:-(
>
> Specify exactly what stuff may happen after the reboot notifier.

okay, it's assumed the device may be used (active) till the shutdown handler
of that particular device is called.

In this particular case we are restoring the initial line state of all pcf
lines even though we don't know if the devices connected to it are still being
active, which might cause a contention as explained by NM [1]

If the reboot notifier gets invoked after the shutdown handler then we could
be sure that restoring the initial line state of the pcf lines wouldn't affect
the devices connected to it.

Thanks
Kishon

[1] -> http://www.spinics.net/lists/linux-mmc/msg29855.html
>
> Of course stuff happens both before and after the reboot
> notifier, the question is exactly what, that may conflict with this.
>
> 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