The patch titled
     mmc_test: change simple_strtol() to strict_strtol()
has been added to the -mm tree.  Its filename is
     mmc_test-change-simple_strtol-to-strict_strtol.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: mmc_test: change simple_strtol() to strict_strtol()
From: Andy Shevchenko <[email protected]>

It's better to use strict_strtol() to convert user's input and strictly check
it. At least it forbids to interpret wrong input as a 0 and prevents to run all
tests.

Signed-off-by: Andy Shevchenko <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 drivers/mmc/card/mmc_test.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff -puN 
drivers/mmc/card/mmc_test.c~mmc_test-change-simple_strtol-to-strict_strtol 
drivers/mmc/card/mmc_test.c
--- a/drivers/mmc/card/mmc_test.c~mmc_test-change-simple_strtol-to-strict_strtol
+++ a/drivers/mmc/card/mmc_test.c
@@ -1937,9 +1937,10 @@ static ssize_t mmc_test_store(struct dev
 {
        struct mmc_card *card = mmc_dev_to_card(dev);
        struct mmc_test_card *test;
-       int testcase;
+       long testcase;
 
-       testcase = simple_strtol(buf, NULL, 10);
+       if (strict_strtol(buf, 10, &testcase))
+               return -EINVAL;
 
        test = kzalloc(sizeof(struct mmc_test_card), GFP_KERNEL);
        if (!test)
_

Patches currently in -mm which might be from [email protected] are

linux-next.patch
lib-bitmapc-use-hex_to_bin.patch
mmc-make-dev_to_mmc_card-macro-public.patch
mmc-rename-dev_to_mmc_card-to-mmc_dev_to_card.patch
mmc_test-use-api-to-check-card-type.patch
mmc_test-change-simple_strtol-to-strict_strtol.patch
mmc_test-collect-data-and-show-it-via-sysfs-by-demand.patch

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to