* [PATCH 1/2] signalfd: fix error return code
@ 2024-05-20 9:08 Fedor Pchelkin
2024-05-20 9:08 ` [PATCH 2/2] signalfd: drop an obsolete comment Fedor Pchelkin
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Fedor Pchelkin @ 2024-05-20 9:08 UTC (permalink / raw)
To: Jens Axboe, Christian Brauner
Cc: Fedor Pchelkin, Alexander Viro, Jan Kara, linux-fsdevel,
linux-kernel, Alexey Khoroshilov, lvc-project
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: fbe38120eb1d ("signalfd: convert to ->read_iter()")
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
---
fs/signalfd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/signalfd.c b/fs/signalfd.c
index 4a5614442dbf..65fe5eed0be4 100644
--- a/fs/signalfd.c
+++ b/fs/signalfd.c
@@ -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;
--
2.39.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] signalfd: drop an obsolete comment
2024-05-20 9:08 [PATCH 1/2] signalfd: fix error return code Fedor Pchelkin
@ 2024-05-20 9:08 ` Fedor Pchelkin
2024-05-20 12:39 ` Jens Axboe
2024-05-20 12:38 ` [PATCH 1/2] signalfd: fix error return code Jens Axboe
2024-05-21 14:23 ` Christian Brauner
2 siblings, 1 reply; 5+ messages in thread
From: Fedor Pchelkin @ 2024-05-20 9:08 UTC (permalink / raw)
To: Jens Axboe, Christian Brauner
Cc: Fedor Pchelkin, Alexander Viro, Jan Kara, linux-fsdevel,
linux-kernel, Alexey Khoroshilov, lvc-project
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.
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
---
fs/signalfd.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/fs/signalfd.c b/fs/signalfd.c
index 65fe5eed0be4..ec7b2da2477a 100644
--- a/fs/signalfd.c
+++ b/fs/signalfd.c
@@ -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);
--
2.39.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] signalfd: fix error return code
2024-05-20 9:08 [PATCH 1/2] signalfd: fix error return code Fedor Pchelkin
2024-05-20 9:08 ` [PATCH 2/2] signalfd: drop an obsolete comment Fedor Pchelkin
@ 2024-05-20 12:38 ` Jens Axboe
2024-05-21 14:23 ` Christian Brauner
2 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2024-05-20 12:38 UTC (permalink / raw)
To: Fedor Pchelkin, Christian Brauner
Cc: Alexander Viro, Jan Kara, linux-fsdevel, linux-kernel,
Alexey Khoroshilov, lvc-project
On 5/20/24 3:08 AM, Fedor Pchelkin wrote:
> 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.
Reviewed-by: Jens Axboe <axboe@kernel.dk>
--
Jens Axboe
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] signalfd: drop an obsolete comment
2024-05-20 9:08 ` [PATCH 2/2] signalfd: drop an obsolete comment Fedor Pchelkin
@ 2024-05-20 12:39 ` Jens Axboe
0 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2024-05-20 12:39 UTC (permalink / raw)
To: Fedor Pchelkin, Christian Brauner
Cc: Alexander Viro, Jan Kara, linux-fsdevel, linux-kernel,
Alexey Khoroshilov, lvc-project
On 5/20/24 3:08 AM, Fedor Pchelkin wrote:
> 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.
Reviewed-by: Jens Axboe <axboe@kernel.dk>
--
Jens Axboe
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] signalfd: fix error return code
2024-05-20 9:08 [PATCH 1/2] signalfd: fix error return code Fedor Pchelkin
2024-05-20 9:08 ` [PATCH 2/2] signalfd: drop an obsolete comment Fedor Pchelkin
2024-05-20 12:38 ` [PATCH 1/2] signalfd: fix error return code Jens Axboe
@ 2024-05-21 14:23 ` Christian Brauner
2 siblings, 0 replies; 5+ messages in thread
From: Christian Brauner @ 2024-05-21 14:23 UTC (permalink / raw)
To: Jens Axboe, Fedor Pchelkin
Cc: Christian Brauner, Alexander Viro, Jan Kara, linux-fsdevel,
linux-kernel, Alexey Khoroshilov, lvc-project
On Mon, 20 May 2024 12:08:18 +0300, Fedor Pchelkin wrote:
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-05-21 14:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-20 9:08 [PATCH 1/2] signalfd: fix error return code Fedor Pchelkin
2024-05-20 9:08 ` [PATCH 2/2] signalfd: drop an obsolete comment Fedor Pchelkin
2024-05-20 12:39 ` Jens Axboe
2024-05-20 12:38 ` [PATCH 1/2] signalfd: fix error return code Jens Axboe
2024-05-21 14:23 ` Christian Brauner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).