Skip to content

Commit

Permalink
ceph: fix null pointer deref of r_osd in debug output
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sage Weil committed Mar 23, 2010
1 parent 0a990e7 commit 12eadc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ceph/osd_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ static int __kick_requests(struct ceph_osd_client *osdc,

kick:
dout("kicking %p tid %llu osd%d\n", req, req->r_tid,
req->r_osd->o_osd);
req->r_osd ? req->r_osd->o_osd : -1);
req->r_flags |= CEPH_OSD_FLAG_RETRY;
err = __send_request(osdc, req);
if (err) {
Expand Down

0 comments on commit 12eadc1

Please sign in to comment.