]> git.baikalelectronics.ru Git - kernel.git/commit
pipe: Check for ring full inside of the spinlock in pipe_write()
authorDavid Howells <dhowells@redhat.com>
Mon, 7 Oct 2019 15:30:51 +0000 (16:30 +0100)
committerDavid Howells <dhowells@redhat.com>
Fri, 15 Nov 2019 16:22:54 +0000 (16:22 +0000)
commit98c19bb73916f02a281c0ed29f2642af31fac68c
tree7dc49acddd4b6585d146bbab6c24062237bf5407
parent015cbd764d5349cc77d636fa3d0ae05d6ec7fc87
pipe: Check for ring full inside of the spinlock in pipe_write()

Make pipe_write() check to see if the ring has become full between it
taking the pipe mutex, checking the ring status and then taking the
spinlock.

This can happen if a notification is written into the pipe as that happens
without the pipe mutex.

Signed-off-by: David Howells <dhowells@redhat.com>
fs/pipe.c