Re: [PATCH 0/2] kernfs, autofs: fix pipe lock cycles through sysfs stores

From: Tejun Heo

Date: Fri Oct 23 2026 - 14:33:20 EST


Hello, Krystian.

On Fri, Oct 23, 2026 at 04:05:38PM +0200, Krystian Kaniewski wrote:
> Given these two separate paths, did you intend to prevent only direct
> splice operations on /sys/power/resume even though the reported class
> cycle would remain, or should a replacement also eliminate the
> lockdep report?

The lockdep report should go away too.

What about disabling splice only for the files whose ->store() can look
up arbitrary paths, such as /sys/power/resume, and giving their of->mutex
a separate lockdep class? Splice is what nests of->mutex inside
pipe->mutex, so if those files can't be spliced, pipe->mutex never nests
outside the new class and the cycle is gone. Commit 16b52bbee482
("kernfs: annotate different lockdep class for of->mutex of writable
files") did the same kind of split for writable files.

Thanks.

--
tejun