From b70f5fa043b318659c936d8c3c696250e6528944 Mon Sep 17 00:00:00 2001 From: Daniel Stodden Date: Fri, 30 Apr 2010 22:01:19 +0000 Subject: [PATCH] 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-format-patch failed