summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/glock.c
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2019-08-13 15:25:15 +0200
committerAndreas Gruenbacher <agruenba@redhat.com>2019-09-03 09:42:41 +0200
commit98fb057487a806303f93db3e0f746525ea487c59 (patch)
tree9d21f612318b21ab8fc40ec3c429a41c938a4333 /fs/gfs2/glock.c
parentgfs2: untangle the logic in gfs2_drevalidate (diff)
downloadlinux-98fb057487a806303f93db3e0f746525ea487c59.tar.xz
linux-98fb057487a806303f93db3e0f746525ea487c59.zip
gfs2: Fix possible fs name overflows
This patch fixes three places in which temporary character buffers could overflow due to the addition of the file system id from patch 3792ce973f07. Thanks to Dan Carpenter for pointing it out. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/glock.c')
-rw-r--r--fs/gfs2/glock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index e23fb8b7b020..a27dbd3dec01 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -1788,8 +1788,8 @@ void gfs2_dump_glock(struct seq_file *seq, struct gfs2_glock *gl, bool fsid)
unsigned long long dtime;
const struct gfs2_holder *gh;
char gflags_buf[32];
- char fs_id_buf[GFS2_FSNAME_LEN + 3 * sizeof(int) + 2];
struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
+ char fs_id_buf[sizeof(sdp->sd_fsname) + 7];
memset(fs_id_buf, 0, sizeof(fs_id_buf));
if (fsid && sdp) /* safety precaution */