On Wed, Sep 20, 2023 at 05:21:03PM +0200, Max Kellermann wrote: > On Wed, Sep 20, 2023 at 3:30 PM Christian Brauner <brauner@xxxxxxxxxx> wrote: > > Afaict, the mutex is sufficient protection unless you're using > > watchqueues which use post_one_notification() that cannot acquire the > > pipe mutex. Since splice operations aren't supported on such kernel > > notification pipes - see get_pipe_info() - it should be unproblematic. > > Which means that the spinlocks can safely be removed from > pipe_write(), because they are unnecessary overhead? I don't think so, O_NOTIFICATION/watch queue pipes allow userspace to use pipe_read() and pipe_write() but prevent the usage of splice. The spinlock is there for post_one_notification() which is called from kernel context.