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:	Sat, 17 Feb 2007 10:36:01 +0100
From:	Sylvain Munaut <tnt@...tNt.com>
To:	Hoang-Nam Nguyen <hnguyen@...ux.vnet.ibm.com>
CC:	paulus@...ba.org, linuxppc-dev@...abs.org,
	linux-kernel@...r.kernel.org, johnrose@...ibm.com,
	pmac@....ibm.com, fenkes@...ibm.com
Subject: Re: [PATCH 2.6.21-rc1] ibmebus: Use of_device_uevent()

Hoang-Nam Nguyen wrote:
> This patch replaces ibmebus_uevent() by Sylvain's generic function.
>
>  struct bus_type ibmebus_bus_type = {
> -	.name = "ibmebus",
> -	.uevent = ibmebus_uevent,
> -	.match = ibmebus_bus_match,
> +	.name   = "ibmebus",
> +	.uevent = of_device_uevent,
> +	.match  = ibmebus_bus_match,
>  };
>  EXPORT_SYMBOL(ibmebus_bus_type);
>   
Doesn't that oops when called with the fake parent device ?

Either you do a wrapper that test for it (that's what I did when I
posted the patch).
Or, an even better approach is to add this

+	if (!ebus_dev->ofdev.node)
+		return -ENODEV;

inside the code of of_device_uevent itself.


	Sylvain



-
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