This is a note to let you know that I've just added the patch titled
ceph: Fix oops when handling mdsmap that decreases max_mds
to the 3.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ceph-fix-oops-when-handling-mdsmap-that-decreases-max_mds.patch
and it can be found in the queue-3.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 3e8f43a089f06279c5f76a9ccd42578eebf7bfa5 Mon Sep 17 00:00:00 2001
From: "Yan, Zheng" <[email protected]>
Date: Thu, 20 Sep 2012 17:42:25 +0800
Subject: ceph: Fix oops when handling mdsmap that decreases max_mds
From: "Yan, Zheng" <[email protected]>
commit 3e8f43a089f06279c5f76a9ccd42578eebf7bfa5 upstream.
When i >= newmap->m_max_mds, ceph_mdsmap_get_addr(newmap, i) return
NULL. Passing NULL to memcmp() triggers oops.
Signed-off-by: Yan, Zheng <[email protected]>
Signed-off-by: Sage Weil <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
fs/ceph/mds_client.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -2636,7 +2636,8 @@ static void check_new_map(struct ceph_md
ceph_mdsmap_is_laggy(newmap, i) ? " (laggy)" : "",
session_state_name(s->s_state));
- if (memcmp(ceph_mdsmap_get_addr(oldmap, i),
+ if (i >= newmap->m_max_mds ||
+ memcmp(ceph_mdsmap_get_addr(oldmap, i),
ceph_mdsmap_get_addr(newmap, i),
sizeof(struct ceph_entity_addr))) {
if (s->s_state == CEPH_MDS_SESSION_OPENING) {
Patches currently in stable-queue which might be from [email protected] are
queue-3.4/ceph-fix-oops-when-handling-mdsmap-that-decreases-max_mds.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html