diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-03-06 14:55:27 -0600 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-03-06 14:55:27 -0600 |
commit | 0b25d458035d0ca6502e678874e2ccb2fa2ddc23 (patch) | |
tree | be031839fcdb58b4c9388864804635d23b8d2a4d /fs/fcntl.c | |
parent | ae24a21bbd96a7a4a3e82890285255d7e86540f0 (diff) | |
parent | 6d390e4b5d48ec03bb87e63cf0a2bff5f4e116da (diff) |
Merge tag 'filelock-v5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux
Pull file locking fixes from Jeff Layton:
"Just a couple of late-breaking patches for the file locking code. The
second patch (from yangerkun) fixes a rather nasty looking potential
use-after-free that should go to stable.
The other patch could technically wait for 5.7, but it's fairly
innocuous so I figured we might as well take it"
* tag 'filelock-v5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux:
locks: fix a potential use-after-free problem when wakeup a waiter
fcntl: Distribute switch variables for initialization
Diffstat (limited to 'fs/fcntl.c')
-rw-r--r-- | fs/fcntl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/fcntl.c b/fs/fcntl.c index 9bc167562ee8..2e4c0fa2074b 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -735,8 +735,9 @@ static void send_sigio_to_task(struct task_struct *p, return; switch (signum) { - kernel_siginfo_t si; - default: + default: { + kernel_siginfo_t si; + /* Queue a rt signal with the appropriate fd as its value. We use SI_SIGIO as the source, not SI_KERNEL, since kernel signals always get @@ -769,6 +770,7 @@ static void send_sigio_to_task(struct task_struct *p, si.si_fd = fd; if (!do_send_sig_info(signum, &si, p, type)) break; + } /* fall-through - fall back on the old plain SIGIO signal */ case 0: do_send_sig_info(SIGIO, SEND_SIG_PRIV, p, type); |