From: Daniel Stodden Date: Fri, 30 Apr 2010 22:01:19 +0000 (+0000) Subject: blkfront: Lock blkfront_info when closing X-Git-Tag: v2.6.36-rc1~288^2~71 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b70f5fa043b318659c936d8c3c696250e6528944;p=pandora-kernel.git blkfront: Lock blkfront_info when closing The bdev .open/.release fops race against backend switches to Closing, handled by the XenBus thread. The original code attempted to serialize block device holders and xenbus only via bd_mutex. This is insufficient, the info->bd pointer may already be stale (or null) while xenbus tries to bump up the refcount. Protect blkfront_info with a dedicated mutex. Signed-off-by: Daniel Stodden Signed-off-by: Jeremy Fitzhardinge --- Reading git-diff-tree failed