Re: [Bluez-devel] Oops involving RFCOMM and sysfs
From: Cornelia Huck
Date: Wed Jan 09 2008 - 10:58:31 EST
On Wed, 09 Jan 2008 18:16:02 +0900,
Tejun Heo <htejun@xxxxxxxxx> wrote:
> This isn't supported. sysfs doesn't allow parents to die first and the
> dangling children to be salvaged using sysfs_move().
But (with the sysfs bugs fixed) it will return an error, won't it? It
seems the bluetooth code is rather optimistic with never checking
device_move()'s return code.
>
> 2. Which in turn exposes three bugs in sysfs
> - sysfs_lookup() returning NULL on negative lookup. sysfs
> code requires that all negative dentries are shot down.
> lookup should return -ENOENT instead of NULL.
> - in move and rename, error handling is wrong. It ends up
> passing ERR_PTR() values to dput().
> - there was an extra dput() in sysfs_move_dir().
Ups, seem to have copied that from some old version of
sysfs_rename_dir()...
>
> The attached patch fixes all sysfs bugs and removes the oops.
Looks OK at first glance.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/