[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [dm-devel] [PATCH v3 2/3] init: boot to device-mapper targets without an initr*

On Thu, May 27, 2010 at 12:38 AM, Anselm Busse <abusse cs tu-berlin de> wrote:
>> An example dm-linear root with no uuid may look like:
>> root=/dev/dm-0  dm="lroot none 0, 0 4096 linear /dev/ubdb 0, 4096 4096 linear /dv/ubdc 0"
>> Once udev is started, /dev/dm-0 will become /dev/mapper/lroot.
> Hi,
> I'm having the problem that the device - for example - won't come available at "/dev/mapper/lroot" but at "/dev/mapper/lroot ". There is an additional space at the end of the name, which is...lets say not so good. The problem is exists already in the dm_setup_args.name field, so I think is a problem parsing the arguments.
> I'm new around here, so I don't know how things work. Should I look into the problem myself and post a fix, or will the author of the patch?

Hi Anselm!

I'm new around here too :) There is an off-by-one where it calls
strlcpy(..., len + 1).  I have a new patch to post but have been
traveling and haven't had a chance to get it posted.  I'll try to mail
it out today!

I think that since I have posted the patch but it hasn't yet been
picked up, the best thing (for me) was just to mail the list like you
did and let the author (me) know there is an issue in the patch, and
then see if they are responsive before posting your own patch.  But
maybe someone who isn't new here should respond :)

Needless to say, I'll post a new patch soon.  The fix is:

+       strlcpy(dm_setup_args.name, str, len + 1);  /* includes nul */
+       strlcpy(dm_setup_args.name, str, len);  /* includes nul */
because I've already incremented len in the previous line.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]