From: Jens Axboe Date: Sat, 16 Apr 2005 22:25:40 +0000 (-0700) Subject: [PATCH] possible use-after-free of bio X-Git-Tag: v2.6.12-rc3~121 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a534f93b371e8e6e87ae302757365f0f583e06b;p=pandora-kernel.git [PATCH] possible use-after-free of bio There is a possibility that a bio will be accessed after it has been freed on SCSI. It happens if you submit a bio with BIO_SYNC marked and the auto-unplugging kicks the request_fn, SCSI re-enables interrupts in-between so if the request completes between the add_request() in __make_request() and the bio_sync() call, we could be looking at a dead bio. It's a slim race, but it has been triggered in the Real World. So assign bio_sync() to a local variable instead. Signed-off-by: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed