Messages in this thread | | | Subject | Re: [PATCH v3 2/2] fs: avoid fdput() after failed fdget() in kernel_read_file_from_fd() | From | Mimi Zohar <> | Date | Fri, 15 May 2020 15:22:48 -0400 |
| |
On Wed, 2020-05-13 at 17:33 -0600, Shuah Khan wrote: > Fix kernel_read_file_from_fd() to avoid fdput() after a failed fdget(). > fdput() doesn't do fput() on this file since FDPUT_FPUT isn't set > in fd.flags. Fix it anyway since failed fdget() doesn't require > a fdput(). > > This was introduced in a commit that added kernel_read_file_from_fd() as > a wrapper for the VFS common kernel_read_file(). > > Fixes: b844f0ecbc56 ("vfs: define kernel_copy_file_from_fd()") > Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Thanks, Shuah.
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
| |