]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bcachefs: add check NULL return of bio_kmalloc in journal_read_bucket
authorPei Xiao <xiaopei01@kylinos.cn>
Wed, 30 Oct 2024 07:48:01 +0000 (15:48 +0800)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 7 Nov 2024 21:48:21 +0000 (16:48 -0500)
commit93d53f1caf2cf861d0f28d096792d3b92efae178
treea7ec109e5876b44934aaec8f36398caa4eed8778
parentef4f6c322bf4ca8e6d050cd0667a9447b8cbe212
bcachefs: add check NULL return of bio_kmalloc in journal_read_bucket

bio_kmalloc may return NULL, will cause NULL pointer dereference.
Add check NULL return for bio_kmalloc in journal_read_bucket.

Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
Fixes: ac10a9611d87 ("bcachefs: Some fixes for building in userspace")
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/errcode.h
fs/bcachefs/journal_io.c