From: Bob Liu Date: Fri, 19 Jun 2015 04:23:00 +0000 (-0400) Subject: drivers: xen-blkfront: only talk_to_blkback() when in XenbusStateInitialising X-Git-Tag: omap-for-v4.2/fixes-rc1^2~70^2~1^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9b54bb95176cd27f952cd9647849022c4c998d6;p=pandora-kernel.git drivers: xen-blkfront: only talk_to_blkback() when in XenbusStateInitialising Patch 69b91ede5cab843dcf345c28bd1f4b5a99dacd9b "drivers: xen-blkback: delay pending_req allocation to connect_ring" exposed an problem that Xen blkfront has. There is a race with XenStored and the drivers such that we can see two: vbd vbd-268440320: blkfront:blkback_changed to state 2. vbd vbd-268440320: blkfront:blkback_changed to state 2. vbd vbd-268440320: blkfront:blkback_changed to state 4. state changes to XenbusStateInitWait ('2'). The end result is that blkback_changed() receives two notify and calls twice setup_blkring(). While the backend driver may only get the first setup_blkring() which is wrong and reads out-dated (or reads them as they are being updated with new ring-ref values). The end result is that the ring ends up being incorrectly set. The other drivers in the tree have such checks already in. Reported-and-Tested-by: Robert Butera Signed-off-by: Bob Liu Signed-off-by: Konrad Rzeszutek Wilk --- Reading git-diff-tree failed