From: Alan Huang <mmpgouride@gmail.com>
To: kent.overstreet@linux.dev, dan.carpenter@linaro.org
Cc: linux-bcachefs@vger.kernel.org, Alan Huang <mmpgouride@gmail.com>
Subject: [PATCH] bcachefs: Fix possible pointer dereference
Date: Wed, 6 Aug 2025 20:20:18 +0800 [thread overview]
Message-ID: <20250806122018.552250-1-mmpgouride@gmail.com> (raw)
c hasn't been set yet here.
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Fixes: 09b9c72bd4b7 ("bcachefs: bch_err_throw()")
Signed-off-by: Alan Huang <mmpgouride@gmail.com>
---
fs/bcachefs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c
index b0019488f586..5992ca040bf6 100644
--- a/fs/bcachefs/super.c
+++ b/fs/bcachefs/super.c
@@ -2369,7 +2369,7 @@ struct bch_fs *bch2_fs_open(darray_const_str *devices,
}
if (opts->nochanges && !opts->read_only) {
- ret = bch_err_throw(c, erofs_nochanges);
+ ret = -BCH_ERR_erofs_nochanges;
goto err_print;
}
--
2.49.0
next reply other threads:[~2025-08-06 12:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-06 12:20 Alan Huang [this message]
2025-08-06 14:08 ` [PATCH] bcachefs: Fix possible pointer dereference Kent Overstreet
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=20250806122018.552250-1-mmpgouride@gmail.com \
--to=mmpgouride@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=kent.overstreet@linux.dev \
--cc=linux-bcachefs@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