]> xenbits.xensource.com Git - people/royger/linux-2.6.18-xen.git/commit
blktap2: fix synchronization in blktap_device_run_queue()
authorKeir Fraser <keir@xen.org>
Fri, 19 Nov 2010 13:20:06 +0000 (13:20 +0000)
committerKeir Fraser <keir@xen.org>
Fri, 19 Nov 2010 13:20:06 +0000 (13:20 +0000)
commitdb52a0196bd820d4a759dbd5e1a27d88a38fbdb6
tree90ab1d37bd3f7a3a48a7975f16ef76b20ee74f04
parentb2dfdf0c0eb3d88e5e6e4d3f5fdd6ea117261197
blktap2: fix synchronization in blktap_device_run_queue()

c/s 896 (use of blk_rq_map_sg()) made the problem worse, but from what
I can tell there had been races (ring and stats updates) before. If
that's not a correct observation, a perhaps better solution might be
to move the struct scatterlist array out of struct blktap (and make it
e.g. an on-stack variable, the problem being that
blktap_device_process_request() has a pretty large stack frame
already - shrinking this might be possible by moving e.g. the
struct blktap_grant_table and struct blkif_request blkif_req instances
the other way if the locking change here is the right thing to do).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
drivers/xen/blktap2/device.c