All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] um: ubd: fix command line handling of ubd
@ 2020-12-21  2:24 Hajime Tazaki
  2020-12-22 11:49 ` Christopher Obbard
  0 siblings, 1 reply; 5+ messages in thread
From: Hajime Tazaki @ 2020-12-21  2:24 UTC (permalink / raw)
  To: linux-um, jdike, richard, anton.ivanov; +Cc: Hajime Tazaki, Christopher Obbard

This commit fixes a regression to handle command line parameters of ubd.
With a simple line "./linux ubd0="./disk-ext4.img", it fails at
ubd_setup_common().  The commit adds additional checks to the variables
in order to properly parse the paremeters which previously worked.

Fixes: ef3ba87cb7c9 ("um: ubd: Set device serial attribute from
cmdline")
Cc: Christopher Obbard <chris.obbard@collabora.com>
Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
---
 arch/um/drivers/ubd_kern.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 13b1fe694b90..bd16b17ba4d6 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -375,11 +375,11 @@ static int ubd_setup_common(char *str, int *index_out, char **error_out)
 		file = NULL;
 
 	backing_file = strsep(&str, ",:");
-	if (*backing_file == '\0')
+	if (backing_file && *backing_file == '\0')
 		backing_file = NULL;
 
 	serial = strsep(&str, ",:");
-	if (*serial == '\0')
+	if (serial && *serial == '\0')
 		serial = NULL;
 
 	if (backing_file && ubd_dev->no_cow) {
-- 
2.17.2


_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] um: ubd: fix command line handling of ubd
  2020-12-21  2:24 [PATCH] um: ubd: fix command line handling of ubd Hajime Tazaki
@ 2020-12-22 11:49 ` Christopher Obbard
  2020-12-23 10:19   ` Richard Weinberger
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Obbard @ 2020-12-22 11:49 UTC (permalink / raw)
  To: Hajime Tazaki; +Cc: richard, jdike, linux-um, anton.ivanov

Hi Hajime,

Doh! Thanks for sorting out this regression!
 
On Monday, 21 December, 2020 02:24 GMT, Hajime Tazaki <thehajime@gmail.com> wrote: 
> This commit fixes a regression to handle command line parameters of ubd.
> With a simple line "./linux ubd0="./disk-ext4.img", it fails at
> ubd_setup_common().  The commit adds additional checks to the variables
> in order to properly parse the paremeters which previously worked.
> 
> Fixes: ef3ba87cb7c9 ("um: ubd: Set device serial attribute from
> cmdline")
> Cc: Christopher Obbard <chris.obbard@collabora.com>
> Signed-off-by: Hajime Tazaki <thehajime@gmail.com>

Acked-by: Christopher Obbard <chris.obbard@collabora.com>

> ---
>  arch/um/drivers/ubd_kern.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
> index 13b1fe694b90..bd16b17ba4d6 100644
> --- a/arch/um/drivers/ubd_kern.c
> +++ b/arch/um/drivers/ubd_kern.c
> @@ -375,11 +375,11 @@ static int ubd_setup_common(char *str, int *index_out, char **error_out)
>  		file = NULL;
>  
>  	backing_file = strsep(&str, ",:");
> -	if (*backing_file == '\0')
> +	if (backing_file && *backing_file == '\0')
>  		backing_file = NULL;
>  
>  	serial = strsep(&str, ",:");
> -	if (*serial == '\0')
> +	if (serial && *serial == '\0')
>  		serial = NULL;
>  
>  	if (backing_file && ubd_dev->no_cow) {
> -- 
> 2.17.2
>


_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] um: ubd: fix command line handling of ubd
  2020-12-22 11:49 ` Christopher Obbard
@ 2020-12-23 10:19   ` Richard Weinberger
  2021-01-04 10:56     ` Christopher Obbard
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Weinberger @ 2020-12-23 10:19 UTC (permalink / raw)
  To: Christopher Obbard
  Cc: Richard Weinberger, Jeff Dike, linux-um, Hajime Tazaki, Anton Ivanov

On Tue, Dec 22, 2020 at 12:49 PM Christopher Obbard
<chris.obbard@collabora.com> wrote:
>
> Hi Hajime,
>
> Doh! Thanks for sorting out this regression!
>
> On Monday, 21 December, 2020 02:24 GMT, Hajime Tazaki <thehajime@gmail.com> wrote:
> > This commit fixes a regression to handle command line parameters of ubd.
> > With a simple line "./linux ubd0="./disk-ext4.img", it fails at
> > ubd_setup_common().  The commit adds additional checks to the variables
> > in order to properly parse the paremeters which previously worked.
> >
> > Fixes: ef3ba87cb7c9 ("um: ubd: Set device serial attribute from
> > cmdline")
> > Cc: Christopher Obbard <chris.obbard@collabora.com>
> > Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
>
> Acked-by: Christopher Obbard <chris.obbard@collabora.com>

Applied, thx!

-- 
Thanks,
//richard

_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] um: ubd: fix command line handling of ubd
  2020-12-23 10:19   ` Richard Weinberger
@ 2021-01-04 10:56     ` Christopher Obbard
  2021-01-04 11:18       ` Richard Weinberger
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Obbard @ 2021-01-04 10:56 UTC (permalink / raw)
  To: Richard Weinberger, Richard Weinberger; +Cc: linux-um, Hajime Tazaki

Hi Richard,

On 23/12/2020 10:19, Richard Weinberger wrote:
> On Tue, Dec 22, 2020 at 12:49 PM Christopher Obbard
> <chris.obbard@collabora.com> wrote:
>>
>> Hi Hajime,
>>
>> Doh! Thanks for sorting out this regression!
>>
>> On Monday, 21 December, 2020 02:24 GMT, Hajime Tazaki <thehajime@gmail.com> wrote:
>>> This commit fixes a regression to handle command line parameters of ubd.
>>> With a simple line "./linux ubd0="./disk-ext4.img", it fails at
>>> ubd_setup_common().  The commit adds additional checks to the variables
>>> in order to properly parse the paremeters which previously worked.
>>>
>>> Fixes: ef3ba87cb7c9 ("um: ubd: Set device serial attribute from
>>> cmdline")
>>> Cc: Christopher Obbard <chris.obbard@collabora.com>
>>> Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
>>
>> Acked-by: Christopher Obbard <chris.obbard@collabora.com>
> 
> Applied, thx!
> 

Hope you don't mind the extra poke message from me, but it didn't seem 
like this patch was applied to 5.11-rc2 & I cannot see the patch under 
your tree https://git.kernel.org/pub/scm/linux/kernel/git/rw/uml.git/



Thanks!
Chris

_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] um: ubd: fix command line handling of ubd
  2021-01-04 10:56     ` Christopher Obbard
@ 2021-01-04 11:18       ` Richard Weinberger
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Weinberger @ 2021-01-04 11:18 UTC (permalink / raw)
  To: Christopher Obbard; +Cc: linux-um, Hajime Tazaki



----- Ursprüngliche Mail -----
> Von: "Christopher Obbard" <chris.obbard@collabora.com>
> An: "Richard Weinberger" <richard.weinberger@gmail.com>, "richard" <richard@nod.at>
> CC: "Hajime Tazaki" <thehajime@gmail.com>, "linux-um" <linux-um@lists.infradead.org>
> Gesendet: Montag, 4. Januar 2021 11:56:53
> Betreff: Re: [PATCH] um: ubd: fix command line handling of ubd

> Hi Richard,
> 
> On 23/12/2020 10:19, Richard Weinberger wrote:
>> On Tue, Dec 22, 2020 at 12:49 PM Christopher Obbard
>> <chris.obbard@collabora.com> wrote:
>>>
>>> Hi Hajime,
>>>
>>> Doh! Thanks for sorting out this regression!
>>>
>>> On Monday, 21 December, 2020 02:24 GMT, Hajime Tazaki <thehajime@gmail.com>
>>> wrote:
>>>> This commit fixes a regression to handle command line parameters of ubd.
>>>> With a simple line "./linux ubd0="./disk-ext4.img", it fails at
>>>> ubd_setup_common().  The commit adds additional checks to the variables
>>>> in order to properly parse the paremeters which previously worked.
>>>>
>>>> Fixes: ef3ba87cb7c9 ("um: ubd: Set device serial attribute from
>>>> cmdline")
>>>> Cc: Christopher Obbard <chris.obbard@collabora.com>
>>>> Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
>>>
>>> Acked-by: Christopher Obbard <chris.obbard@collabora.com>
>> 
>> Applied, thx!
>> 
> 
> Hope you don't mind the extra poke message from me, but it didn't seem
> like this patch was applied to 5.11-rc2 & I cannot see the patch under
> your tree https://git.kernel.org/pub/scm/linux/kernel/git/rw/uml.git/

It is in my patchwork bundle and marked as accepted:
https://patchwork.ozlabs.org/bundle/rw/uml-5.11-rc1-fixes/?series=&submitter=&state=*&q=&archive=
 
Xmas happened before I could push it out and do a PR.

Thanks,
//richard

_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-01-04 11:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-21  2:24 [PATCH] um: ubd: fix command line handling of ubd Hajime Tazaki
2020-12-22 11:49 ` Christopher Obbard
2020-12-23 10:19   ` Richard Weinberger
2021-01-04 10:56     ` Christopher Obbard
2021-01-04 11:18       ` Richard Weinberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.