dm-init: fix 2 incorrect use of kstrndup()
PATCH 1/1 dm-init: fix 2 incorrect use of kstrndup()
In drivers/md/dm-init.c, kstrndup() is incorrectly used twice.
It should be: char *kstrndup(const char *s, size_t max, gfp_t gfp);
---
drivers/md/dm-init.c +3 -3
@@ -140,8 +140,8 @@ static char __init *dm_parse_table_entry(struct dm_device *dev, char *str)return ERR_PTR (-EINVAL ); }/* target_args */ - dev->target_args_array[n] =kstrndup (field[3 ],GFP_KERNEL , -DM_MAX_STR_SIZE ); + dev->target_args_array[n] =kstrndup (field[3 ],DM_MAX_STR_SIZE , +GFP_KERNEL );if (!dev->target_args_array[n])return ERR_PTR (-ENOMEM );
@@ -275,7 +275,7 @@ static int __init dm_init_init(void)DMERR ("Argument is too big. Limit is %d\n" ,DM_MAX_STR_SIZE );return -EINVAL ; } - str =kstrndup (create,GFP_KERNEL ,DM_MAX_STR_SIZE ); + str =kstrndup (create,DM_MAX_STR_SIZE ,GFP_KERNEL );if (!str)return -ENOMEM ;
---
Quoted 3 lines · Gen Zhang
In
drivers/md/dm-init.c,kstrndup()is incorrectly used twice.It should be: char *kstrndup(const char *s,
size_tmax,gfp_tgfp);
Should the following be added to this patch?
device") # v5.1.
Cc: stable
Thanks,
Bart.
Quoted 7 lines · Bart Van Assche
Quoted 3 lines · Gen Zhang
In
drivers/md/dm-init.c,kstrndup()is incorrectly used twice.It should be: char *kstrndup(const char *s,
size_tmax,gfp_tgfp);Should the following be added to this patch?
Quoted 7 lines
Fixes 6bbc923dfcf5 ("dm: add support to directly boot to a mappeddevice") # v5.1.
Cc: stableThanks,
Bart.
Personally, I am not quite sure about this question, because I am not the maintainer of this part.
Thanks
Gen
Quoted 12 lines · Gen Zhang
Quoted 11 lines · Bart Van Assche
Quoted 3 lines · Gen Zhang
In
drivers/md/dm-init.c,kstrndup()is incorrectly used twice.It should be: char *kstrndup(const char *s,
size_tmax,gfp_tgfp);Should the following be added to this patch?
Fixes 6bbc923dfcf5 ("dm: add support to directly boot to a mappeddevice") # v5.1.
Cc: stable
Quoted 5 lines
Quoted 3 lines
Thanks,
Bart.
Personally, I am not quite sure about this question, because I am not the maintainer of this part.
Yes, it should have the tags Bart suggested.
I'll take care it.
Thanks,
Mike
Quoted 6 lines
Yes, it should have the tags Bart suggested.
I'll take care it.
Thanks,
Mike
Thanks for your reply, and please keep me informed if it is applied.
Thanks
Gen
Quoted 21 lines · Mike Snitzer
Quoted 12 lines · Gen Zhang
Quoted 11 lines · Bart Van Assche
Quoted 3 lines · Gen Zhang
In
drivers/md/dm-init.c,kstrndup()is incorrectly used twice.It should be: char *kstrndup(const char *s,
size_tmax,gfp_tgfp);Should the following be added to this patch?
Fixes 6bbc923dfcf5 ("dm: add support to directly boot to a mappeddevice") # v5.1.
Cc: stableQuoted 5 lines
Quoted 3 lines
Thanks,
Bart.
Personally, I am not quite sure about this question, because I am not the maintainer of this part.
Quoted 6 lines
Yes, it should have the tags Bart suggested.
I'll take care it.
Thanks,
Mike
Hi,
Is there any updates about this patch? I want to check if it is apllied beacause I have to write it down in my paper and the deadline is close.
Thanks
Gen
Quoted 26 lines · Gen Zhang
Quoted 25 lines · Mike Snitzer
Quoted 12 lines · Gen Zhang
Quoted 11 lines · Bart Van Assche
Quoted 3 lines · Gen Zhang
In
drivers/md/dm-init.c,kstrndup()is incorrectly used twice.It should be: char *kstrndup(const char *s,
size_tmax,gfp_tgfp);Should the following be added to this patch?
Fixes 6bbc923dfcf5 ("dm: add support to directly boot to a mappeddevice") # v5.1.
Cc: stableQuoted 5 lines
Quoted 3 lines
Thanks,
Bart.
Personally, I am not quite sure about this question, because I am not the maintainer of this part.
Yes, it should have the tags Bart suggested.
I'll take care it.
Quoted 8 lines
Quoted 2 lines
Thanks,
MikeHi,
Is there any updates about this patch? I want to check if it is apllied beacause I have to write it down in my paper and the deadline is close.Thanks
Gen
Could anyone look into this patch? It's not updated for about 20 days. And I am really on a deadline to get this patch applied.
Thanks
Gen