Home Home > GIT Browse > SLE12-SP5-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Henriques <lhenriques@suse.com>2019-08-27 11:14:09 +0100
committerLuis Henriques <lhenriques@suse.com>2019-09-05 10:07:45 +0100
commit72ddb93bda4d625d28e288bc2d0dd694f714f5ad (patch)
tree768a9d7fb55f73db8a0a0c24b98eee7284a93868
parentd442f4ac964b07b89aede6be3ca7156d91693eff (diff)
ceph: silence a checker warning in mdsc_show() (bsc#1148133).
-rw-r--r--patches.suse/ceph-silence-a-checker-warning-in-mdsc_show.patch37
-rw-r--r--series.conf1
2 files changed, 38 insertions, 0 deletions
diff --git a/patches.suse/ceph-silence-a-checker-warning-in-mdsc_show.patch b/patches.suse/ceph-silence-a-checker-warning-in-mdsc_show.patch
new file mode 100644
index 0000000000..2c659bed7e
--- /dev/null
+++ b/patches.suse/ceph-silence-a-checker-warning-in-mdsc_show.patch
@@ -0,0 +1,37 @@
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Thu, 9 May 2019 13:11:25 +0300
+Subject: ceph: silence a checker warning in mdsc_show()
+Git-commit: 13c41737b912a6f6354369c9b20a02c3868ab304
+Patch-mainline: v5.3-rc1
+References: bsc#1148133
+
+The problem is that if ceph_mdsc_build_path() fails then we set "path"
+to NULL and the "pathlen" variable is uninitialized. Then we call
+ceph_mdsc_free_path(path, pathlen) to clean up. Since "path" is NULL,
+the function is a no-op but Smatch and UBSan still complain that
+"pathlen" is uninitialized.
+
+This patch doesn't change run time, it just silence the warnings.
+
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
+Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
+Acked-by: Luis Henriques <lhenriques@suse.com>
+---
+ fs/ceph/debugfs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c
+index b3fc5fe26a1a..a14d64664878 100644
+--- a/fs/ceph/debugfs.c
++++ b/fs/ceph/debugfs.c
+@@ -52,7 +52,7 @@ static int mdsc_show(struct seq_file *s, void *p)
+ struct ceph_mds_client *mdsc = fsc->mdsc;
+ struct ceph_mds_request *req;
+ struct rb_node *rp;
+- int pathlen;
++ int pathlen = 0;
+ u64 pathbase;
+ char *path;
+
+
diff --git a/series.conf b/series.conf
index 7544c4c1d8..97e7cdd9ef 100644
--- a/series.conf
+++ b/series.conf
@@ -23909,6 +23909,7 @@
patches.suse/ALSA-hda-realtek-Fixed-Headphone-Mic-can-t-record-on.patch
patches.suse/ALSA-hda-realtek-apply-ALC891-headset-fixup-to-one-D.patch
patches.suse/ALSA-seq-Break-too-long-mutex-context-in-the-write-l.patch
+ patches.suse/ceph-silence-a-checker-warning-in-mdsc_show.patch
patches.suse/ceph-clean-up-ceph-dir-pin-vxattr-name-sizeof.patch
patches.suse/cifs-Use-kmemdup-in-SMB2_ioctl_init-.patch
patches.suse/fs-cifs-Drop-unlikely-before-IS_ERR-_OR_NULL-.patch