Skip to content

Commit f826bc9

Browse files
pchelkin91brauner
authored andcommitted
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). Fixes: fbe3812 ("signalfd: convert to ->read_iter()") Signed-off-by: Fedor Pchelkin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Jens Axboe <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent 4e527d5 commit f826bc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/signalfd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ static int do_signalfd4(int ufd, sigset_t *mask, int flags)
282282
if (IS_ERR(file)) {
283283
put_unused_fd(ufd);
284284
kfree(ctx);
285-
return ufd;
285+
return PTR_ERR(file);
286286
}
287287
file->f_mode |= FMODE_NOWAIT;
288288

0 commit comments

Comments
 (0)