According to the comments, this was how it's been done years ago, but apparently took an xbt pointer from elsewhere back then. The code was removed because of consistency issues: cancellation wont't roll back the saved xbdev->state. Still, unsolicited writes to the state field remain an issue, especially if device shutdown takes thread synchronization, and subtle races cause accidental recreation of the device node. Fixed by reintroducing the transaction. An internal one is sufficient, so the xbdev->state value remains consistent. Also fixes the original hack to prevent infinite recursion. Instead of bailing out on the first attempt to switch to Closing, checks call depth now. Signed-off-by: Daniel Stodden <daniel.stodden@xxxxxxxxxx>
Attachment:
xenbus-switch-transaction.diff
Description: Text Data
_______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
| Previous by Date: | [Xen-devel] [PATCH 03 of 10] blkfront: Fix gendisk leak , Daniel Stodden |
|---|---|
| Next by Date: | [Xen-devel] [PATCH 02 of 10] blkfront: Fix backtrace in del_gendisk , Daniel Stodden |
| Previous by Thread: | [Xen-devel] [PATCH 03 of 10] blkfront: Fix gendisk leak , Daniel Stodden |
| Next by Thread: | [Xen-devel] [PATCH 02 of 10] blkfront: Fix backtrace in del_gendisk , Daniel Stodden |
| Indexes: | [Date] [Thread] [Top] [All Lists] |