mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 20:10:23 +09:00
ANDROID: fuse-bpf: Add NULL pointer check in fuse_release_in
If open request sent to classic fuse, backing_file is null. In fuse_release_initialize, fput will trigger a crash. Bug: 297831741 Signed-off-by: liujing40 <liujing40@xiaomi.corp-partner.google.com> (cherry picked from https://android-review.googlesource.com/q/commit:4d2ff573981f06ba09e1ddda8726bb73ff6a2c3f) Merged-In: I2d54d99d62b54c39a6dc9064f8f62488433aff6f Change-Id: I2d54d99d62b54c39a6dc9064f8f62488433aff6f
This commit is contained in:
committed by
Treehugger Robot
parent
4030b1eeed
commit
6ac8b4fbb4
@@ -300,7 +300,9 @@ int fuse_release_initialize(struct fuse_bpf_args *fa, struct fuse_release_in *fr
|
||||
struct inode *inode, struct fuse_file *ff)
|
||||
{
|
||||
/* Always put backing file whatever bpf/userspace says */
|
||||
fput(ff->backing_file);
|
||||
if (ff->backing_file) {
|
||||
fput(ff->backing_file);
|
||||
}
|
||||
|
||||
*fri = (struct fuse_release_in) {
|
||||
.fh = ff->fh,
|
||||
|
||||
Reference in New Issue
Block a user