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: <200609221158.07226.eike-kernel@sf-tec.de>
Date:	Fri, 22 Sep 2006 11:58:02 +0200
From:	Rolf Eike Beer <eike-kernel@...tec.de>
To:	Cornelia Huck <cornelia.huck@...ibm.com>
Cc:	Greg K-H <greg@...ah.com>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [1/9] driver core fixes: make_class_name() retval check

Cornelia Huck wrote:
> From: Cornelia Huck <cornelia.huck@...ibm.com>
>
> Make make_class_name() return NULL on error and fixup callers in the
> driver core.

> @@ -409,8 +409,11 @@ static int make_deprecated_class_device_
>  		return 0;
>
>  	class_name = make_class_name(class_dev->class->name, &class_dev->kobj);
> -	error = sysfs_create_link(&class_dev->dev->kobj, &class_dev->kobj,
> -				  class_name);
> +	if (!class_name)
> +		error = sysfs_create_link(&class_dev->dev->kobj,
> +					  &class_dev->kobj, class_name);
> +	else
> +		error = -ENOMEM;
>  	kfree(class_name);
>  	return error;
>  }

Either this is inverse of what you wanted to do or just calling 
sysfs_create_link(..., NULL) would make it clearer for readers.

Eike

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ