From: hehuiwen <huiwen.he@linux.dev>
To: Namjae Jeon <linkinjeon@kernel.org>
Cc: smfrench@gmail.com, pc@manguebit.org, ronniesahlberg@gmail.com,
sprasad@microsoft.com, tom@talpey.com, bharathsm@microsoft.com,
senozhatsky@chromium.org, dhowells@redhat.com,
chenxiaosong@kylinos.cn, linux-cifs@vger.kernel.org,
lkp@intel.com
Subject: Re: [PATCH] smb/client: remove redundant NULL check before kfree()
Date: Mon, 17 Aug 2026 14:57:21 +0800 [thread overview]
Message-ID: <782ba8b3-336b-459f-8a39-808c1fde9f06@linux.dev> (raw)
In-Reply-To: <CAKYAXd_N3i0jvBn0Nw3-K+U1yS528-ynh0PVETrGuLDnGsZV_g@mail.gmail.com>
Hi Namjae,
I copied the Fixes, Reported-by, and Closes tags from the kernel test
robot report when sending the patch.
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 3eb40771c00a8488fa6ed2cc1fe203477908bf38
> commit: 5693347de107a26f68d1f43b25ff2e348c7229a9 smb/client: use writable handle for FS_IOC_SETFLAGS compression
> date: 9 weeks ago
> config: powerpc-randconfig-r053-20260812 (https://download.01.org/0day-ci/archive/20260816/202608160402.0ffQDoCg-lkp@intel.com/config)
> compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 12df34b8469b8095359de8c249cb1b2753fadeea)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Fixes: 5693347de107 ("smb/client: use writable handle for FS_IOC_SETFLAGS compression")
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202608160402.0ffQDoCg-lkp@intel.com/
>
> cocci warnings: (new ones prefixed by >>)
>>> fs/smb/client/ioctl.c:135:2-7: WARNING: NULL check before some freeing functions is not needed.
But chenxiaosong suggested that the Fixes tag may not be necessary
because this is only a Coccinelle cleanup with no functional change. I
am not sure which convention is preferred here, so please feel free to
drop the Fixes tag when applying the patch.
Thanks,
Huiwen
在 2026/8/17 14:42, Namjae Jeon 写道:
> On Mon, Aug 17, 2026 at 12:40 AM Huiwen He <huiwen.he@linux.dev> wrote:
>>
>> From: Huiwen He <hehuiwen@kylinos.cn>
>>
>> kfree() accepts NULL pointers, so checking tmp_cfile before freeing it
>> is unnecessary and triggers a Coccinelle warning.
>>
>> Remove the redundant check. This does not change runtime behavior.
>>
>> Fixes: 5693347de107 ("smb/client: use writable handle for FS_IOC_SETFLAGS compression")
>> Reported-by: kernel test robot <lkp@intel.com>
>> Closes: https://lore.kernel.org/oe-kbuild-all/202608160402.0ffQDoCg-lkp@intel.com/
>> Signed-off-by: Huiwen He <hehuiwen@kylinos.cn>
> Applied it to #for-next.
> Thanks!
prev parent reply other threads:[~2026-08-17 6:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-16 15:39 [PATCH] smb/client: remove redundant NULL check before kfree() Huiwen He
2026-08-17 6:42 ` Namjae Jeon
2026-08-17 6:57 ` hehuiwen [this message]
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=782ba8b3-336b-459f-8a39-808c1fde9f06@linux.dev \
--to=huiwen.he@linux.dev \
--cc=bharathsm@microsoft.com \
--cc=chenxiaosong@kylinos.cn \
--cc=dhowells@redhat.com \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=lkp@intel.com \
--cc=pc@manguebit.org \
--cc=ronniesahlberg@gmail.com \
--cc=senozhatsky@chromium.org \
--cc=smfrench@gmail.com \
--cc=sprasad@microsoft.com \
--cc=tom@talpey.com \
/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