From: Markus Elfring <Markus.Elfring@web.de>
To: Hao Ge <gehao@kylinos.cn>,
linux-trace-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Hao Ge <hao.ge@linux.dev>
Subject: Re: [PATCH] eventfs: Directly return NULL to avoid null point dereferenced
Date: Sun, 12 May 2024 19:12:20 +0200 [thread overview]
Message-ID: <34c7ffeb-1fe9-4e89-a7b6-c6a8be17df90@web.de> (raw)
In-Reply-To: <20240511024255.34767-1-hao.ge@linux.dev>
> When the condition ei->is_free holds,we return NULL directly to
> avoid update_events_attr to use NULL point about ei.
* Please avoid typos in the summary phrase and the commit message.
* Would you like to use an imperative wording for an improved change description?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.9-rc7#n94
…
> +++ b/fs/tracefs/event_inode.c
> @@ -346,8 +346,7 @@ static struct eventfs_inode *eventfs_find_events(struct dentry *dentry)
> * doesn't matter.
> */
> if (ei->is_freed) {
> - ei = NULL;
> - break;
> + return NULL;
> }
…
How do you think about to omit curly brackets here?
Regards,
Markus
next prev parent reply other threads:[~2024-05-12 17:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-11 2:42 [PATCH] eventfs: Directly return NULL to avoid null point dereferenced hao.ge
2024-05-12 17:12 ` Markus Elfring [this message]
2024-05-13 3:25 ` Hao Ge
2024-05-13 5:33 ` [PATCH v2] eventfs: Fix a possible null pointer dereference in eventfs_find_events hao.ge
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=34c7ffeb-1fe9-4e89-a7b6-c6a8be17df90@web.de \
--to=markus.elfring@web.de \
--cc=gehao@kylinos.cn \
--cc=hao.ge@linux.dev \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
/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 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 read-only IMAP folder(s) and NNTP newsgroup(s).