Linux-Fsdevel Archive on
help / color / mirror / Atom feed
From: Markus Elfring <>
	Namjae Jeon <>,
	Sungjong Seo <>
	"Dan Carpenter" <>,
	"Pali Rohár" <>,
	"Tetsuhiro Kohada" <>,
	"Wei Yongjun" <>
Subject: Re: exfat: Improving exception handling in two functions
Date: Wed, 10 Jun 2020 11:27:58 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>


I have taken another look at pointer usage after calls of the function “brelse”.
My source code analysis approach pointed implementation details
like the following out for further software development considerations.

		epold = exfat_get_dentry(sb, p_dir, oldentry + 1, &old_bh,
		epnew = exfat_get_dentry(sb, p_dir, newentry + 1, &new_bh,
		if (!epold || !epnew)
			return -EIO;

I suggest to split such an error check.
How do you think about to release a buffer head object for the desired
exception handling if one of these function calls succeeded?

Would you like to adjust such code in the functions “exfat_rename_file”
and “exfat_move_file”?


  parent reply	other threads:[~2020-06-10  9:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-08 15:07 [PATCH] exfat: Fix use after free in exfat_load_upcase_table() Markus Elfring
2020-06-08 15:52 ` Matthew Wilcox
2020-06-08 20:07   ` Markus Elfring
2020-06-09  9:10 ` [PATCH] " Greg KH
2020-06-10  9:27 ` Markus Elfring [this message]
2020-06-10  9:59   ` [PATCH] exfat: call brelse() on error path Dan Carpenter
2020-06-10 12:14   ` exfat: Improving exception handling in two functions Markus Elfring
2020-06-10 14:53   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: exfat: Improving exception handling in two functions' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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