* [PATCH] staging: Note that simple_strtoul can't simply be replaced by kstrtoul
@ 2019-02-23 19:42 Samuel Thibault
2019-02-24 7:59 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Samuel Thibault @ 2019-02-23 19:42 UTC (permalink / raw)
To: w.d.hubbs, chris, kirk, gregkh, speakup, devel, linux-kernel
We often receive patches which erroneously try to use kstrtoul in these
places.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
drivers/staging/speakup/kobjects.c | 2 ++
drivers/staging/speakup/main.c | 1 +
drivers/staging/speakup/varhandlers.c | 1 +
3 files changed, 4 insertions(+)
--- a/drivers/staging/speakup/kobjects.c
+++ b/drivers/staging/speakup/kobjects.c
@@ -154,6 +154,7 @@ static ssize_t chars_chartab_store(struc
continue;
}
+ /* Do not replace with kstrtoul: here we need temp to be updated */
index = simple_strtoul(cp, &temp, 10);
if (index > 255) {
rejected++;
@@ -787,6 +788,7 @@ static ssize_t message_store_helper(cons
continue;
}
+ /* Do not replace with kstrtoul: here we need temp to be updated */
index = simple_strtoul(cp, &temp, 10);
while ((temp < linefeed) && (*temp == ' ' || *temp == '\t'))
--- a/drivers/staging/speakup/main.c
+++ b/drivers/staging/speakup/main.c
@@ -1979,6 +1979,7 @@ oops:
return 1;
}
+ /* Do not replace with kstrtoul: here we need cp to be updated */
goto_pos = simple_strtoul(goto_buf, &cp, 10);
if (*cp == 'x') {
--- a/drivers/staging/speakup/varhandlers.c
+++ b/drivers/staging/speakup/varhandlers.c
@@ -328,6 +328,7 @@ char *spk_s2uchar(char *start, char *des
{
int val;
+ /* Do not replace with kstrtoul: here we need start to be updated */
val = simple_strtoul(skip_spaces(start), &start, 10);
if (*start == ',')
start++;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: Note that simple_strtoul can't simply be replaced by kstrtoul
2019-02-23 19:42 [PATCH] staging: Note that simple_strtoul can't simply be replaced by kstrtoul Samuel Thibault
@ 2019-02-24 7:59 ` Greg KH
2019-02-24 19:38 ` Samuel Thibault
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2019-02-24 7:59 UTC (permalink / raw)
To: Samuel Thibault, w.d.hubbs, chris, kirk, speakup, devel, linux-kernel
On Sat, Feb 23, 2019 at 08:42:19PM +0100, Samuel Thibault wrote:
> We often receive patches which erroneously try to use kstrtoul in these
> places.
>
> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Awe, it's fun to try to see people do this and not really think about
the consequences :)
Anyway, seriously, thanks for this, I'll go queue it up later today...
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: Note that simple_strtoul can't simply be replaced by kstrtoul
2019-02-24 7:59 ` Greg KH
@ 2019-02-24 19:38 ` Samuel Thibault
0 siblings, 0 replies; 3+ messages in thread
From: Samuel Thibault @ 2019-02-24 19:38 UTC (permalink / raw)
To: Greg KH; +Cc: w.d.hubbs, chris, kirk, speakup, devel, linux-kernel
Greg KH, le dim. 24 févr. 2019 08:59:21 +0100, a ecrit:
> On Sat, Feb 23, 2019 at 08:42:19PM +0100, Samuel Thibault wrote:
> > We often receive patches which erroneously try to use kstrtoul in these
> > places.
> >
> > Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
>
> Awe, it's fun to try to see people do this and not really think about
> the consequences :)
Sure :)
But I have to say I'm a bit scared one of these could pass through :)
> Anyway, seriously, thanks for this, I'll go queue it up later today...
Thanks!
Samuel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-02-24 19:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-23 19:42 [PATCH] staging: Note that simple_strtoul can't simply be replaced by kstrtoul Samuel Thibault
2019-02-24 7:59 ` Greg KH
2019-02-24 19:38 ` Samuel Thibault
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.