From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Mario Rugiero <mrugiero@gmail.com>
Cc: Richard Weinberger <richard@nod.at>,
linux-mtd@lists.infradead.org,
Adrian Hunter <adrian.hunter@intel.com>,
Artem Bityutskiy <dedekind1@gmail.com>
Subject: Re: [PATCH] ubifs: no need to check return value of debugfs_create functions
Date: Wed, 12 Jun 2019 19:00:44 +0200 [thread overview]
Message-ID: <20190612170044.GA3219@kroah.com> (raw)
In-Reply-To: <CAKKQwLSm5FchbBH43G=3hJJ3LdrcOxnEn10_cjES+MZotVCpng@mail.gmail.com>
A: Top-posting.
Q: What is the most annoying thing in e-mail?
A: No.
Q: Should I include quotations after my reply?
http://daringfireball.net/2007/07/on_top
On Wed, Jun 12, 2019 at 01:52:23PM -0300, Mario Rugiero wrote:
> I think you should still abort if the directory fails to be created.
Why?
> If it's NULL, all later file creation will be attempted at root debugfs.
debugfs_create_dir() can not return NULL.
> Not only will they pollute the filesystem, but since they are not
> attached to the directory we remove on cleanup, they'll leak.
That can not happen, if the parent directory is an error pointer, the
file will just not be created.
> Also, since failure is no longer reported, it may be a good idea to
> log that failure.
Why? To where? For what? debugfs should never matter if it works or
not as no no-debugging userspace code should ever depend on it, and the
kernel should not ever "fail" anything if it is not working properly.
thanks,
greg k-h
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2019-06-12 17:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-12 15:21 [PATCH] ubifs: no need to check return value of debugfs_create functions Greg Kroah-Hartman
2019-06-12 16:52 ` Mario Rugiero
2019-06-12 17:00 ` Greg Kroah-Hartman [this message]
2019-06-12 18:53 ` Richard Weinberger
2019-06-13 5:47 ` Greg Kroah-Hartman
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190612170044.GA3219@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=adrian.hunter@intel.com \
--cc=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=mrugiero@gmail.com \
--cc=richard@nod.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.