From: "Василий Ковалев" <kovalevvv@basealt.ru>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: stable@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
"Tigran A. Aivazian" <aivazian.tigran@gmail.com>,
dutyrok@altlinux.org, linux-fsdevel@vger.kernel.org,
lvc-patches@linuxtesting.org
Subject: Re: [PATCH fs/bfs 1/2] bfs: fix null-ptr-deref in bfs_move_block
Date: Thu, 11 Jul 2024 00:57:17 +0300 [thread overview]
Message-ID: <cd942b65-b6d7-0e0f-be4d-c3b950ee008f@basealt.ru> (raw)
In-Reply-To: <8fd93c4e-3324-49b6-a77c-ea9986bc3033@web.de>
10.07.2024 23:09, Markus Elfring wrote:
>> Add a check to ensure 'sb_getblk' did not return NULL before copying data.
>
> Wording suggestion:
> that a sb_getblk() call
>
>
> How do you think about to use a summary phrase like
> “Prevent null pointer dereference in bfs_move_block()”?
Ok, I'll change it in the next version:
bfs: prevent null pointer dereference in bfs_move_block()
Add a check to ensure that a sb_getblk() call did not return NULL before
copying data.
>
> …
>> +++ b/fs/bfs/file.c
>> @@ -35,16 +35,22 @@ static int bfs_move_block(unsigned long from, unsigned long to,
>> struct super_block *sb)
>> {
>> struct buffer_head *bh, *new;
>> + int err;
>
> Can a statement (like the following) become more appropriate for such
> a function implementation?
>
> int ret = 0;
Yes, thank you.
>
> Regards,
> Markus
--
Regards,
Vasiliy Kovalev
next prev parent reply other threads:[~2024-07-10 21:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-10 19:11 [PATCH fs/bfs 0/2] bfs: fix null-ptr-deref and possible warning in bfs_move_block() func kovalev
2024-07-10 19:11 ` [PATCH fs/bfs 1/2] bfs: fix null-ptr-deref in bfs_move_block kovalev
2024-07-10 20:09 ` Markus Elfring
2024-07-10 21:57 ` Василий Ковалев [this message]
2024-07-11 6:00 ` [fs/bfs " Markus Elfring
2024-07-11 16:40 ` [PATCH fs/bfs " kernel test robot
2024-07-10 19:11 ` [PATCH fs/bfs 2/2] bfs: add buffer_uptodate check before mark_buffer_dirty call kovalev
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=cd942b65-b6d7-0e0f-be4d-c3b950ee008f@basealt.ru \
--to=kovalevvv@basealt.ru \
--cc=Markus.Elfring@web.de \
--cc=aivazian.tigran@gmail.com \
--cc=dutyrok@altlinux.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lvc-patches@linuxtesting.org \
--cc=stable@vger.kernel.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 NNTP newsgroup(s).