]> git.karo-electronics.de Git - karo-tx-linux.git/commit
The access beyond the end of device BUG_ON that was introduced to
authorMike Snitzer <snitzer@redhat.com>
Tue, 2 Oct 2012 00:01:04 +0000 (10:01 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 2 Oct 2012 00:01:04 +0000 (10:01 +1000)
commitcf5b5bfebf226953655fc51a92bf74cb875401ce
treee63e24d3c8b2cdeff2f3b639bd074b9930b85221
parent988a5d61165a46a1c4be05c456c2c565293d3f59
The access beyond the end of device BUG_ON that was introduced to
dm_request_fn via commit 29e4013de7ad950280e4b2208 ("dm: implement
REQ_FLUSH/FUA support for request-based dm") was an overly
drastic (but simple) response to this situation.

I have received a report that this BUG_ON was hit and now think
it would be better to use dm_kill_unmapped_request() to fail the clone
and original request with -EIO.

map_request() will assign the valid target returned by
dm_table_find_target to tio->ti.  But when the target
isn't valid tio->ti is never assigned (because map_request isn't
called); so add a check for tio->ti != NULL to dm_done().

Reported-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Cc: stable@vger.kernel.org # v2.6.37+
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm.c