mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +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 Change-Id: I2d54d99d62b54c39a6dc9064f8f62488433aff6f Signed-off-by: liujing40 <liujing40@xiaomi.corp-partner.google.com>
This commit is contained in:
@@ -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)
|
struct inode *inode, struct fuse_file *ff)
|
||||||
{
|
{
|
||||||
/* Always put backing file whatever bpf/userspace says */
|
/* 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) {
|
*fri = (struct fuse_release_in) {
|
||||||
.fh = ff->fh,
|
.fh = ff->fh,
|
||||||
|
|||||||
Reference in New Issue
Block a user