All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hao Ge <hao.ge@linux.dev>
To: Markus Elfring <Markus.Elfring@web.de>, 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>
Subject: Re: [PATCH] eventfs: Directly return NULL to avoid null point dereferenced
Date: Mon, 13 May 2024 11:25:38 +0800	[thread overview]
Message-ID: <b574c8d6-c000-8673-74de-a7cc092057ad@linux.dev> (raw)
In-Reply-To: <34c7ffeb-1fe9-4e89-a7b6-c6a8be17df90@web.de>

Hi Markus


Thanks for your review.


在 5/13/24 01:12, Markus Elfring 写道:
>> 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
>
>
> …
OK, I'll study it,
>> +++ 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?
You are right, I will make changes to it in future versions
>
> Regards,
> Markus

Best Regards

Hao


  reply	other threads:[~2024-05-13  3:26 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
2024-05-13  3:25   ` Hao Ge [this message]
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=b574c8d6-c000-8673-74de-a7cc092057ad@linux.dev \
    --to=hao.ge@linux.dev \
    --cc=Markus.Elfring@web.de \
    --cc=gehao@kylinos.cn \
    --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 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.