summaryrefslogtreecommitdiffstats
path: root/fs/kernfs/file.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-27 10:28:34 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-27 10:28:34 -0700
commit005fbcd03458b6c0044f65c1fe8d8a68d726a321 (patch)
tree60265e75c50f3acf802e195363f44b8a10acdf80 /fs/kernfs/file.c
parentfefb82756e9fd89d0c0d5983e056df81d51eb075 (diff)
parent0c8c77d35582c3f7989f1316368da5ae7f14ad4b (diff)
downloadop-kernel-dev-005fbcd03458b6c0044f65c1fe8d8a68d726a321.zip
op-kernel-dev-005fbcd03458b6c0044f65c1fe8d8a68d726a321.tar.gz
Merge tag 'driver-core-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core fixes from Greg KH: "Here are some kernfs fixes for 3.15-rc3 that resolve some reported problems. Nothing huge, but all needed" * tag 'driver-core-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: s390/ccwgroup: Fix memory corruption kernfs: add back missing error check in kernfs_fop_mmap() kernfs: fix a subdir count leak
Diffstat (limited to 'fs/kernfs/file.c')
-rw-r--r--fs/kernfs/file.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c
index 8034706..e01ea4a 100644
--- a/fs/kernfs/file.c
+++ b/fs/kernfs/file.c
@@ -484,6 +484,8 @@ static int kernfs_fop_mmap(struct file *file, struct vm_area_struct *vma)
ops = kernfs_ops(of->kn);
rc = ops->mmap(of, vma);
+ if (rc)
+ goto out_put;
/*
* PowerPC's pci_mmap of legacy_mem uses shmem_zero_setup()
OpenPOWER on IntegriCloud