]> 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)
commit5a9f15aaa0aa4dd40fff9f942e8b9cb06efa94d4
treec5fd06a96b1b0a190434fdbf1ad91406c6871086
parent04f49dd5f31c25d283428c8fbbf9d40cf8a0e485
parisc: Add wrapper syscalls to fix O_NONBLOCK flag usage

The commit 5ba3e04d76f0 ("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: 5ba3e04d76f0 ("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