From 71c42f664dea842a56e0d1184d828081746f2eab Mon Sep 17 00:00:00 2001 From: Andriy Skulysh Date: Wed, 20 Jun 2018 17:17:09 +0300 Subject: [PATCH] LU-11700 osp: GPF in osp_reserved_mb_low_seq_write() opd_pre pointer may be uninitialized on statrup Change-Id: If6ff4289545503e07719c7e9a282be1bd393465b Cray-bug-id: LUS-6118 Signed-off-by: Andriy Skulysh Reviewed-by: Alexander Boyko Reviewed-by: Andrew Perepechko Reviewed-on: https://review.whamcloud.com/33717 Tested-by: Jenkins Reviewed-by: Andreas Dilger Reviewed-by: Alexandr Boyko Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- lustre/osp/lproc_osp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/osp/lproc_osp.c b/lustre/osp/lproc_osp.c index e1d5509..59c90e2 100644 --- a/lustre/osp/lproc_osp.c +++ b/lustre/osp/lproc_osp.c @@ -835,7 +835,7 @@ osp_reserved_mb_high_seq_write(struct file *file, const char __user *buffer, __s64 val; int rc; - if (osp == NULL) + if (osp == NULL || osp->opd_pre == NULL) return -EINVAL; rc = lprocfs_str_with_units_to_s64(buffer, count, &val, 'M'); @@ -896,7 +896,7 @@ osp_reserved_mb_low_seq_write(struct file *file, const char __user *buffer, __s64 val; int rc; - if (osp == NULL) + if (osp == NULL || osp->opd_pre == NULL) return -EINVAL; rc = lprocfs_str_with_units_to_s64(buffer, count, &val, 'M'); -- 1.8.3.1