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:	Mon, 14 Apr 2014 16:35:04 -0500
From:	Felipe Balbi <balbi@...com>
To:	Mathias Krause <minipli@...glemail.com>
CC:	Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
	David Woodhouse <dwmw2@...radead.org>,
	<linux-kernel@...r.kernel.org>, PaX Team <pageexec@...email.hu>,
	Felipe Balbi <balbi@...com>, Anton Vorontsov <anton@...msg.org>
Subject: Re: [PATCH 2/2] pda_power: Unregister USB notifier in
 pda_power_remove()

On Sun, Mar 30, 2014 at 03:34:15PM +0200, Mathias Krause wrote:
> If we've registered a notifier in pda_power_probe() we must deregister
> it in pda_power_remove() to not let it work on stale data like, e.g.,
> the charger timer.
> 
> Cc: Felipe Balbi <balbi@...com>
> Cc: Anton Vorontsov <anton@...msg.org>
> Signed-off-by: Mathias Krause <minipli@...glemail.com>
> ---
>  drivers/power/pda_power.c |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/power/pda_power.c b/drivers/power/pda_power.c
> index 87a963d0a8..aba23d6848 100644
> --- a/drivers/power/pda_power.c
> +++ b/drivers/power/pda_power.c
> @@ -430,6 +430,11 @@ static int pda_power_remove(struct platform_device *pdev)
>  	if (pdata->is_ac_online && ac_irq)
>  		free_irq(ac_irq->start, &pda_psy_ac);
>  
> +#if IS_ENABLED(CONFIG_USB_PHY)
> +	if (!IS_ERR_OR_NULL(transceiver) && pdata->use_otg_notifier)

IS_ERR() should be enough here.

> +		usb_unregister_notifier(transceiver, &otg_nb);
> +#endif
> +
>  	if (polling)
>  		del_timer_sync(&polling_timer);
>  	del_timer_sync(&charger_timer);
> -- 
> 1.7.10.4
> 

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ