linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Vasiliy Kovalev <kovalev@altlinux.org>,
	linux-fsdevel@vger.kernel.org, lvc-patches@linuxtesting.org,
	syzbot+d98fd19acd08b36ff422@syzkaller.appspotmail.com
Cc: stable@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	"Tigran A. Aivazian" <aivazian.tigran@gmail.com>,
	dutyrok@altlinux.org
Subject: Re: [PATCH fs/bfs 1/2] bfs: fix null-ptr-deref in bfs_move_block
Date: Wed, 10 Jul 2024 22:09:04 +0200	[thread overview]
Message-ID: <8fd93c4e-3324-49b6-a77c-ea9986bc3033@web.de> (raw)
In-Reply-To: <20240710191118.40431-2-kovalev@altlinux.org>

> 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()”?


…
> +++ 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;


Regards,
Markus

  reply	other threads:[~2024-07-10 20:09 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 [this message]
2024-07-10 21:57     ` Василий Ковалев
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=8fd93c4e-3324-49b6-a77c-ea9986bc3033@web.de \
    --to=markus.elfring@web.de \
    --cc=aivazian.tigran@gmail.com \
    --cc=dutyrok@altlinux.org \
    --cc=kovalev@altlinux.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvc-patches@linuxtesting.org \
    --cc=stable@vger.kernel.org \
    --cc=syzbot+d98fd19acd08b36ff422@syzkaller.appspotmail.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;
as well as URLs for NNTP newsgroup(s).