Tejun Heo ca23509fba [PATCH] blk: fix dangling pointer access in __elv_add_request
cfq's add_req_fn callback may invoke q->request_fn directly and
depending on low-level driver used and timing, a queued request may be
finished & deallocated before add_req_fn callback returns.  So,
__elv_add_request must not access rq after it's passed to add_req_fn
callback.

This patch moves rq_mergeable test above add_req_fn().  This may
result in q->last_merge pointing to REQ_NOMERGE request if add_req_fn
callback sets it but as RQ_NOMERGE is checked again when blk layer
actually tries to merge requests, this does not cause any problem.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-01 21:58:06 -08:00
..
2005-10-30 17:37:32 -08:00
2005-10-30 17:37:10 -08:00
2005-10-31 13:37:12 +11:00
2005-10-28 10:13:16 -07:00
2005-10-30 17:37:32 -08:00
2005-10-31 09:20:54 -08:00
2005-10-30 17:37:32 -08:00
2005-10-30 17:37:32 -08:00
2005-10-30 17:37:32 -08:00
2005-10-30 17:37:32 -08:00
2005-10-28 12:18:07 -04:00
2005-10-30 17:37:32 -08:00
2005-10-30 17:37:32 -08:00
2005-10-30 17:37:32 -08:00
2005-10-30 17:37:32 -08:00
2005-10-30 17:37:32 -08:00
2005-10-30 17:37:32 -08:00
2005-09-11 19:15:07 -07:00
2005-10-28 16:47:38 -07:00