From: Jens Axboe <axboe@suse.de>
It doesn't always look safe to let ->waiting remain set when returning from
functions that set it to point to stack area, since various locations check
for != NULL to see if it's valid. So clear it on return from
ide_do_drive_cmd() and blk_execute_rq().
elv_add_request(q, rq, ELEVATOR_INSERT_BACK, 1);
generic_unplug_device(q);
wait_for_completion(&wait);
+ rq->waiting = NULL;
if (rq->errors)
err = -EIO;
err = 0;
if (must_wait) {
wait_for_completion(&wait);
+ rq->waiting = NULL;
if (rq->errors)
err = -EIO;