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]
Message-id: <51BAC39D.6020909@samsung.com>
Date:	Fri, 14 Jun 2013 16:17:49 +0900
From:	Chanwoo Choi <cw00.choi@...sung.com>
To:	Jonghwa Lee <jonghwa3.lee@...sung.com>
Cc:	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
	MyungJoo Ham <myungjoo.ham@...sung.com>
Subject: Re: [PATCH] extcon: class: Add NULL pointer checking for removing
 notifier block.

On 06/14/2013 11:11 AM, Jonghwa Lee wrote:
> This patch adds NULL pointer checking of extcon device to 'extcon_unregister
> _interest' which unregisters extcon notifier block.
> 
> Signed-off-by: Jonghwa Lee <jonghwa3.lee@...sung.com>
> Signed-off-by: Myungjoo Ham <myungjoo.ham@...sung.com>
> ---
>  drivers/extcon/extcon-class.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/extcon/extcon-class.c b/drivers/extcon/extcon-class.c
> index 8c69803..23f11ea 100644
> --- a/drivers/extcon/extcon-class.c
> +++ b/drivers/extcon/extcon-class.c
> @@ -491,7 +491,7 @@ EXPORT_SYMBOL_GPL(extcon_register_interest);
>   */
>  int extcon_unregister_interest(struct extcon_specific_cable_nb *obj)
>  {
> -	if (!obj)
> +	if (!obj || !obj->edev)
>  		return -EINVAL;
>  
>  	return raw_notifier_chain_unregister(&obj->edev->nh, &obj->internal_nb);
> 

Applied it.

Thanks,
Chanwoo Choi
--
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