2.5.recent: device_remove_file() doesn't

David Brownell
2003-03-27T03:31:19Z

I've noticed that recent kernels don't clean up device
attribute files correctly when they're removed. Instead,
they're left in the directory with a refcount of zero.

That refcount stays even when the file is recreated later;
and the contents can be read. Delete them again, and now
the refcount is 65535 ... though now reading the contents
may cause oopsing.

This worked correctly at some point last month: the file
no longer appeared in sysfs after deletion.

Got Patch?

- Dave