mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
UPSTREAM: 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:
parent
35e1532031
commit
3ab55eae01
1 changed files with 3 additions and 1 deletions
|
|
@ -353,7 +353,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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue