[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/1] tools/hotplug: Scan xenstore once when attaching shared images files
Hi George, On Thursday, October 01, 2015 10:51:08 AM George Dunlap wrote: > > then > > - echo 'local' > > + echo "local $d" > > return > > fi > > fi > > @@ -90,13 +107,13 @@ check_sharing() > > do > > d=$(xenstore_read_default "$base_path/$dom/$dev/physical-device" "") > > > > - if [ "$d" = "$devmm" ] > > + if [ -n "$d" ] && [[ "$devmm" == *"$d,"* ]] > > Is there a risk here of aliasing? i.e., suppose that a device with > major-minor '11:1' that's already in use by a guest, and you're > checking to see if you can share device '1:1' with a different guest. > Won't this match, and (falsely) reject 1:1, even though it's not being > used by anyone else? > > Would it make more sense maybe to initialize devmm to ",", and then > search for *",$d,"*? Ah, thanks for catching that! I caught the "1:11" case, but somehow missed the "11:1" side. I'll address that, and your other comments and submit a V2 shortly. -Mike _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |