diff options
author | Sage Weil <sage@newdream.net> | 2010-03-16 01:20:39 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-03-23 10:46:51 -0400 |
commit | 12eadc190038e68b5884a4aa313b6ab89ba60f5e (patch) | |
tree | ba53a7209528981aec774f99132723b913a9e6ae | |
parent | 0a990e7093566ceb07e38951e1a01686923d4f09 (diff) |
ceph: fix null pointer deref of r_osd in debug output
This causes an oops when debug output is enabled and we kick
an osd request with no current r_osd (sometime after an osd
failure). Check the pointer before dereferencing.
Signed-off-by: Sage Weil <sage@newdream.net>
-rw-r--r-- | fs/ceph/osd_client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/osd_client.c b/fs/ceph/osd_client.c index dbe63db9762f..221038253e61 100644 --- a/fs/ceph/osd_client.c +++ b/fs/ceph/osd_client.c | |||
@@ -913,7 +913,7 @@ static int __kick_requests(struct ceph_osd_client *osdc, | |||
913 | 913 | ||
914 | kick: | 914 | kick: |
915 | dout("kicking %p tid %llu osd%d\n", req, req->r_tid, | 915 | dout("kicking %p tid %llu osd%d\n", req, req->r_tid, |
916 | req->r_osd->o_osd); | 916 | req->r_osd ? req->r_osd->o_osd : -1); |
917 | req->r_flags |= CEPH_OSD_FLAG_RETRY; | 917 | req->r_flags |= CEPH_OSD_FLAG_RETRY; |
918 | err = __send_request(osdc, req); | 918 | err = __send_request(osdc, req); |
919 | if (err) { | 919 | if (err) { |