Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
* [Drbd-dev] DRBD-8 trunk crashes if NegDReply received in reply to RSDataRequest
@ 2006-08-06  2:29 Graham, Simon
  2006-08-08 13:43 ` Philipp Reisner
  0 siblings, 1 reply; 2+ messages in thread
From: Graham, Simon @ 2006-08-06  2:29 UTC (permalink / raw)
  To: drbd-dev

When an RSDataRequest is sent, the block_id field in the request is set
to SYNCER_ID (-1) - if the receiver is unable to process the request
(e.g. if the receiver doesn't have good data) then it sends back a
NegDReply with the same block_id - on the origin side, got_NegDReply
attempts to validate the block_id value using drbd_pr_verify which
promptly crashes attempting to reference the master_bio field to get the
sector (drbd_req_get_sector()).

I found this testing my fixes for removing panic() calls on meta data
read/write failures but I thought it was worth bugging separately;
clearly this routine needs to validate the request pointer before
attempting to access it at all, but also we should have got a
NedRSDreply in this case - so there are at least two bugs here:

1. The target side should have send a NegRSDreply in this case;
receive_DataRequest should switch on h->command 
   to decide what response to send when it bails early
2. drbd_pr_verify should NOT call drbd_req_get_sector() before
validating the pointer - is there any reason why 
   it shouldn't use the sector value passed in as a parameter?

I can make patches for these when we agree on the right solution...

Simon


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-08-08 13:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-06  2:29 [Drbd-dev] DRBD-8 trunk crashes if NegDReply received in reply to RSDataRequest Graham, Simon
2006-08-08 13:43 ` Philipp Reisner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox