Abhishek Singh
Abhishek Singh

Reputation: 1

Is the reference count of a sysfs kobject incremented when it is read?

If I call read on a sysfs file to retrieve some data from the kernel, and at the same time, the kernel driver calls kobj_put on the kobject associated with that file, what will happen? Does the sysfs infrastructure automatically prevent the release of the kobject if it is being read?

I don't want to handle the race condition between reading and releasing the sysfs kobject.

Upvotes: 0

Views: 13

Answers (0)

Related Questions