On Wed, Jan 07, 2026 at 10:29:44PM +0100, Mikulas Patocka wrote:
On Wed, 7 Jan 2026, Matthew Wilcox wrote:
On Wed, Jan 07, 2026 at 09:31:14PM +0100, Mikulas Patocka wrote:
This commit changes -EINTR to -ERESTARTSYS, so that if the signal handler was installed with the SA_RESTART flag, the operation is automatically restarted.
No, this is bonkers. If you get a signal, you return -EINTR.
Why?
fifo_open returns -ERESTARTSYS, so why not here?
This is fundamentally changing what this does for all callers, and we've simply not encountered this issue elsewhere.
Given how long it might take to work it might be interrupted by another signal on the next attempt, whose to say that it might not result in a situation where it can never complete?
I thnk it should stay as it is.
Also the comment above literally has:
* mm_take_all_locks() and mm_drop_all_locks are expensive operations * that may have to take thousand of locks. * * mm_take_all_locks() can fail if it's interrupted by signals. */
Which at any rate would need to be changed even if we were to change it.
I'm more and more inclined to say let's just drop this series in general, and you should go fix how signals are handled in the driver/userland code.
This is really feeling like the wrong place to fix this.
Mikulas
Cheers, Lorenzo