xen/hotplug.losetup.patch
Charles Arnold 4c73609012 - Upstream patches from Jan
22998-x86-get_page_from_l1e-retcode.patch
  22999-x86-mod_l1_entry-retcode.patch
  23000-x86-mod_l2_entry-retcode.patch
  23096-x86-hpet-no-cpumask_lock.patch
  23099-x86-rwlock-scalability.patch
  23103-x86-pirq-guest-eoi-check.patch
  23127-vtd-bios-settings.patch
  23153-x86-amd-clear-DramModEn.patch
  23154-x86-amd-iorr-no-rdwr.patch
  23199-amd-iommu-unmapped-intr-fault.patch
  23200-amd-iommu-intremap-sync.patch
  23228-x86-conditional-write_tsc.patch

- update xenalyze to revision 98
  * Unify setting of vcpu data type
  * Unify record size checks
  * Fix cr3_switch not to access hvm struct before it's initialized
- add xenalyze.gcc46.patch to fix unused-but-set-variable errors

- bnc#688473 - VUL-0: potential buffer overflow in tools
  cve-2011-1583-4.0.patch

- hotplug.losetup.patch
  correct dev:inode detection and use variable expansion

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=115
2011-05-03 17:51:18 +00:00

35 lines
1.4 KiB
Diff

Improve busy loop device detection after changeset 22773:02c0af2bf280
The intention is not to find the file to be mounted in the losetup -a
output. What matters are existing mounted files with the same dev:inode
as the new file. So the fix is to apply variable expansion which
happens only without double quotes. Otherwise $dev will contain
newlines for hardlinked files, as mentioned in the commit message from
the changeset above.
losetup -a does also truncate long filenames to 62 chars due to ioctl
limitations. This part is fixed with 2.6.37 where the filename can be
obtained from sysfs. As a result very long filenames will be missed.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
tools/hotplug/Linux/block | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: xen-4.1.0-testing/tools/hotplug/Linux/block
===================================================================
--- xen-4.1.0-testing.orig/tools/hotplug/Linux/block
+++ xen-4.1.0-testing/tools/hotplug/Linux/block
@@ -280,8 +280,8 @@ mount it read-write in a guest domain."
fi
shared_list=$(losetup -a |
- sed -n -e "s@^\([^:]\+\)\(:[[:blank:]]\[${dev}\]:${inode}[[:blank:]](${file})\)@\1@p" )
- for dev in "$shared_list"
+ sed -n -e "s@^\([^:]\+\)\(:[[:blank:]]\[${dev}\]:${inode}[[:blank:]](.*)\)@\1@p" )
+ for dev in $shared_list
do
if [ -n "$dev" ]
then