linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] fs: avoid fdput() after failed fdget()
@ 2020-05-12 19:43 Shuah Khan
  2020-05-12 19:43 ` [PATCH v2 1/2] fs: avoid fdput() after failed fdget() in ksys_sync_file_range() Shuah Khan
  2020-05-12 19:43 ` [PATCH v2 2/2] fs: avoid fdput() after failed fdget() in kernel_read_file_from_fd() Shuah Khan
  0 siblings, 2 replies; 11+ messages in thread
From: Shuah Khan @ 2020-05-12 19:43 UTC (permalink / raw)
  To: viro, axboe, zohar, mcgrof, keescook
  Cc: Shuah Khan, linux-fsdevel, linux-kernel

While debugging an unrelated problem, I noticed these two cases fdput()
is called after failed fdget() while reviewing at all the fdget() and
fdput() paths in the kernel.

Changes since v1:
Patch 1:
  Changed to address review comments to refine the code for improved
  readability in addition to the change to avoid fdput() on failed
  fdget()
Patch 2:
  No change to v1. Including it in the series to keep the patches
  together.

Shuah Khan (2):
  fs: avoid fdput() after failed fdget() in ksys_sync_file_range()
  fs: avoid fdput() after failed fdget() in kernel_read_file_from_fd()

 fs/exec.c |  2 +-
 fs/sync.c | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-05-22 22:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-12 19:43 [PATCH v2 0/2] fs: avoid fdput() after failed fdget() Shuah Khan
2020-05-12 19:43 ` [PATCH v2 1/2] fs: avoid fdput() after failed fdget() in ksys_sync_file_range() Shuah Khan
2020-05-13  5:46   ` Al Viro
2020-05-12 19:43 ` [PATCH v2 2/2] fs: avoid fdput() after failed fdget() in kernel_read_file_from_fd() Shuah Khan
2020-05-13  5:49   ` Al Viro
2020-05-13 13:13     ` Luis Chamberlain
2020-05-13 14:19       ` Luis Chamberlain
2020-05-22 21:59         ` Scott Branden
2020-05-22 22:14           ` Scott Branden
2020-05-22 22:47             ` Luis Chamberlain
2020-05-13 17:56     ` Shuah Khan

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).