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, 16 Jul 2007 17:12:34 +0200
From:	Cornelia Huck <cornelia.huck@...ibm.com>
To:	Akinobu Mita <akinobu.mita@...il.com>
Cc:	linux-kernel@...r.kernel.org, Greg Kroah-Hartman <gregkh@...e.de>
Subject: Re: [PATCH 2/10] sysdev: add error check in sysdev_register()

On Mon, 16 Jul 2007 22:51:38 +0900,
Akinobu Mita <akinobu.mita@...il.com> wrote:

> This patch enables to catch the errors returned by add() procedure of
> sysdev driver in sysdev_register.

> @@ -253,23 +254,50 @@ int sysdev_register(struct sys_device * 
> 
>  		/* Notify global drivers */
>  		list_for_each_entry(drv, &sysdev_drivers, entry) {
> -			if (drv->add)
> -				drv->add(sysdev);
> +			if (drv->add) {
> +				error = drv->add(sysdev);
> +				if (error)
> +					goto error_sysdev;
> +			}
> +			added_sysdev++;
>  		}

This looks asymmetric to me. Imagine we have a device/driver
combination for which drv->add will return -ESOMEERROR. Now, it depends
on the order:

1. The device is registered when the driver is already registered:
registration of the device will fail.

2. The driver is registered when the device is already registered:
driver registration will succeed, and the device will stay registered.

I'm not sure if that is what we really want.
-
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