diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2017-03-06 12:58:42 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-26 13:08:12 +0200 |
commit | a69813714424f0cbbf1d7440b84c5fe4ae3d69af (patch) | |
tree | 91eabc6627b2fe1ee7aaf2e7f193167f999514d0 | |
parent | d369c16ffb4650c87e19e1295db9f980d2a9b013 (diff) | |
download | linux-stable-a69813714424f0cbbf1d7440b84c5fe4ae3d69af.tar.gz linux-stable-a69813714424f0cbbf1d7440b84c5fe4ae3d69af.tar.bz2 linux-stable-a69813714424f0cbbf1d7440b84c5fe4ae3d69af.zip |
gfs2: Avoid alignment hole in struct lm_lockname
commit 28ea06c46fbcab63fd9a55531387b7928a18a590 upstream.
Commit 88ffbf3e03 switches to using rhashtables for glocks, hashing over
the entire struct lm_lockname instead of its individual fields. On some
architectures, struct lm_lockname contains a hole of uninitialized
memory due to alignment rules, which now leads to incorrect hash values.
Get rid of that hole.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | fs/gfs2/incore.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index a6a3389a07fc..51519c2836b5 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -207,7 +207,7 @@ struct lm_lockname { struct gfs2_sbd *ln_sbd; u64 ln_number; unsigned int ln_type; -}; +} __packed __aligned(sizeof(int)); #define lm_name_equal(name1, name2) \ (((name1)->ln_number == (name2)->ln_number) && \ |