diff options
author | Helge Deller <deller@gmx.de> | 2021-10-17 18:53:31 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2021-11-01 07:36:00 +0100 |
commit | 3759778e6b8c0d547d77f681a7779edccdf1710a (patch) | |
tree | 74ee5e8b5ea37fa4f2a035aac86d031dbd58f640 /arch/parisc/kernel | |
parent | 0760a9157bc93f660256f7014b936c584f3f8fdd (diff) | |
download | linux-3759778e6b8c0d547d77f681a7779edccdf1710a.tar.bz2 |
parisc: enhance warning regarding usage of O_NONBLOCK
Instead of showing only the very first application which needs
recompile, show all of them, but print them only once.
Includes typo fix noticed by Colin Ian King.
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Diffstat (limited to 'arch/parisc/kernel')
-rw-r--r-- | arch/parisc/kernel/sys_parisc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c index 5f12537318ab..2b34294517a1 100644 --- a/arch/parisc/kernel/sys_parisc.c +++ b/arch/parisc/kernel/sys_parisc.c @@ -409,10 +409,12 @@ long parisc_personality(unsigned long personality) static int FIX_O_NONBLOCK(int flags) { - if (flags & O_NONBLOCK_MASK_OUT) { - struct task_struct *tsk = current; - pr_warn_once("%s(%d) uses a deprecated O_NONBLOCK value.\n", - tsk->comm, tsk->pid); + if ((flags & O_NONBLOCK_MASK_OUT) && + !test_thread_flag(TIF_NONBLOCK_WARNING)) { + set_thread_flag(TIF_NONBLOCK_WARNING); + pr_warn("%s(%d) uses a deprecated O_NONBLOCK value." + " Please recompile with newer glibc.\n", + current->comm, current->pid); } return flags & ~O_NONBLOCK_MASK_OUT; } |