From: Riyan Dhiman <riyandhiman14@gmail.com>
To: fdmanana@kernel.org, clm@fb.com, josef@toxicpanda.com, dsterba@suse.com
Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] btrfs: add missing NULL check in btrfs_free_tree_block()
Date: Thu, 26 Sep 2024 19:26:59 +0530 [thread overview]
Message-ID: <20240926135729.4578-1-riyandhiman14@gmail.com> (raw)
In-Reply-To: <CAL3q7H5vV1MLODuCHr1p4Dx6tMGOMeqxDnTGMsDz290kw8Vsew@mail.gmail.com>
> If that happens we want it to be noisy so that it gets reported and we
> look at it.
> Letting a NULL pointer dereference happen is one way of getting our attention.
>
> O more gentle and explicit way would be to have a: ASSERT(bg != NULL);
I am wondering whether it would be better to have an ASSERT statement here, as you
suggested, or use a BUG_ON instead.
I haven't personally encountered a null pointer dereference issue in a live kernel
environment, so I'm not sure how the kernel behaves in such a scenario. However, it
seems wrong to leave it unhandled as it currently is.
Regards,
Riyan Dhiman
next prev parent reply other threads:[~2024-09-26 13:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-26 7:49 Riyan Dhiman
2024-09-26 8:55 ` Filipe Manana
2024-09-26 13:56 ` Riyan Dhiman [this message]
2024-09-26 14:09 ` Filipe Manana
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=20240926135729.4578-1-riyandhiman14@gmail.com \
--to=riyandhiman14@gmail.com \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=fdmanana@kernel.org \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®