aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/llite/llite_mmap.c
diff options
context:
space:
mode:
authorDmitry Eremin <dmitry.eremin@intel.com>2016-08-24 11:11:55 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-01 17:25:46 +0200
commit8d897d2540ff7f97941f1f3cb065ce4a9d808774 (patch)
tree8d5d1587b16f3df9b420a24bc04d6283cedb8933 /drivers/staging/lustre/lustre/llite/llite_mmap.c
parentstaging/lustre/llite: check return value for obd_set_info_async (diff)
downloadlinux-dev-8d897d2540ff7f97941f1f3cb065ce4a9d808774.tar.xz
linux-dev-8d897d2540ff7f97941f1f3cb065ce4a9d808774.zip
staging/lustre/llite: Fix suspicious dereference of pointer 'vma->vm_file'
Remove useless LASSERT(vma->vm_file) because of if it's NULL it will crash early in file_inode(vma->vm_file). Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-on: http://review.whamcloud.com/21171 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8372 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/llite/llite_mmap.c')
-rw-r--r--drivers/staging/lustre/lustre/llite/llite_mmap.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lustre/llite/llite_mmap.c b/drivers/staging/lustre/lustre/llite/llite_mmap.c
index 9d03e79ccfec..37f82ed22864 100644
--- a/drivers/staging/lustre/lustre/llite/llite_mmap.c
+++ b/drivers/staging/lustre/lustre/llite/llite_mmap.c
@@ -429,7 +429,6 @@ static void ll_vm_open(struct vm_area_struct *vma)
struct inode *inode = file_inode(vma->vm_file);
struct vvp_object *vob = cl_inode2vvp(inode);
- LASSERT(vma->vm_file);
LASSERT(atomic_read(&vob->vob_mmap_cnt) >= 0);
atomic_inc(&vob->vob_mmap_cnt);
}
@@ -442,7 +441,6 @@ static void ll_vm_close(struct vm_area_struct *vma)
struct inode *inode = file_inode(vma->vm_file);
struct vvp_object *vob = cl_inode2vvp(inode);
- LASSERT(vma->vm_file);
atomic_dec(&vob->vob_mmap_cnt);
LASSERT(atomic_read(&vob->vob_mmap_cnt) >= 0);
}