signalfd: fix error return code
PATCH 1/2 signalfd: fix error return code
If anon_inode_getfile() fails, return appropriate error code. This looks like a single typo: the similar code changes in timerfd and userfaultfd are okay.
Found by Linux Verification Center (linuxtesting.org).
--- fs/signalfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/signalfd.c +1 -1
@@ -282,7 +282,7 @@ static int do_signalfd4(int ufd, sigset_t *mask, int flags)if (IS_ERR (file)) {put_unused_fd (ufd);kfree (ctx); -return ufd; +return PTR_ERR (file); } file->f_mode |=FMODE_NOWAIT ;
Signature · 1 line
2.39.2
PATCH 2/2 signalfd: drop an obsolete comment
Commit fbe38120eb1d ("signalfd: convert to ->read_iter()") removed the call to anon_inode_getfd() by splitting fd setup into two parts. Drop the comment referencing the internal details of that function.
--- fs/signalfd.c | 4 ---- 1 file changed, 4 deletions(-)
fs/signalfd.c +0 -4
@@ -286,10 +286,6 @@ static int do_signalfd4(int ufd, sigset_t *mask, int flags) } file->f_mode |=FMODE_NOWAIT ; -/* -* When we call this, the initialization must be complete, since -* anon_inode_getfd() will install the fd. -*/ fd_install (ufd, file); }else {struct fd f =fdget (ufd);
Signature · 1 line
2.39.2
Re: [PATCH 2/2] signalfd: drop an obsolete comment
Quoted 3 lines · Fedor Pchelkin
Commit
fbe38120eb1d("signalfd: convert to ->read_iter()") removed the call toanon_inode_getfd()by splitting fd setup into two parts. Drop the comment referencing the internal details of that function.
Signature · 1 line
Jens Axboe
Quoted 3 lines · Fedor Pchelkin
If
anon_inode_getfile()fails, return appropriate error code. This looks like a single typo: the similar code changes in timerfd and userfaultfd are okay.
Oops yes, that's my bad.
Signature · 1 line
Jens Axboe
Quoted 8 lines · Fedor Pchelkin
If
anon_inode_getfile()fails, return appropriate error code. This looks like a single typo: the similar code changes in timerfd and userfaultfd are okay.Found by Linux Verification Center (linuxtesting.org).
[...]
Applied to the vfs.fixes branch of the vfs/vfs.git tree. Patches in the vfs.fixes branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs.fixes
[1/2] signalfd: fix error return code
https://git.kernel.org/vfs/vfs/c/e8df0c67191f [2/2] signalfd: drop an obsolete comment https://git.kernel.org/vfs/vfs/c/0dda1466f355