]> git.baikalelectronics.ru Git - kernel.git/commit
parisc: Add wrapper syscalls to fix O_NONBLOCK flag usage
authorHelge Deller <deller@gmx.de>
Thu, 22 Oct 2020 16:40:07 +0000 (18:40 +0200)
committerHelge Deller <deller@gmx.de>
Fri, 23 Oct 2020 18:14:07 +0000 (20:14 +0200)
commitd042e49bfe7609b63924a8201f5622fedfda8d05
treec5fd06a96b1b0a190434fdbf1ad91406c6871086
parent3c528c15cb6f22b5259c0346e29e8adead44451f
parisc: Add wrapper syscalls to fix O_NONBLOCK flag usage

The commit 2d4e9f39785f ("parisc: Define O_NONBLOCK to become
000200000") changed the O_NONBLOCK constant to have only one bit set
(like all other architectures). This change broke some existing
userspace code (e.g.  udevadm, systemd-udevd, elogind) which called
specific syscalls which do strict value checking on their flag
parameter.

This patch adds wrapper functions for the relevant syscalls. The
wrappers masks out any old invalid O_NONBLOCK flags, reports in the
syslog if the old O_NONBLOCK value was used and then calls the target
syscall with the new O_NONBLOCK value.

Fixes: 2d4e9f39785f ("parisc: Define O_NONBLOCK to become 000200000")
Signed-off-by: Helge Deller <deller@gmx.de>
Tested-by: Meelis Roos <mroos@linux.ee>
Tested-by: Jeroen Roovers <jer@xs4all.nl>
arch/parisc/kernel/sys_parisc.c
arch/parisc/kernel/syscalls/syscall.tbl