From: Christian Brauner Date: Wed, 6 May 2026 14:46:42 +0000 (+0200) Subject: vmspawn: reject --bind-volume= duplicates at parse time (#41961) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c03431107c2c7701e02d3809de9dba9e12d807a;p=thirdparty%2Fsystemd.git vmspawn: reject --bind-volume= duplicates at parse time (#41961) bind_volume_parse() does not look at peers, so passing the same PROVIDER:VOLUME twice on the command line silently produces two parsed entries in arg_bind_volumes. vmspawn_bind_volume_acquire() then builds two DriveInfo with identical d->id (":"). At boot, bridge_register_drive() puts d->id into the b->block_devices hashmap; the second insert returns -EEXIST and the user sees a bare "File exists" with no context for which volume is responsible. Reject the collision at the parse site with a linear scan over the existing array — n_items is small (one entry per --bind-volume on the command line), and a clear error message naming the offending volume is much more useful than the late EEXIST from the QMP setup loop. --- 5c03431107c2c7701e02d3809de9dba9e12d807a