From patchwork Tue Sep 7 12:35:25 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 178112 Return-path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on void.printf.net X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.9 tests=RCVD_IN_DNSWL_LOW autolearn=disabled version=3.2.5 Envelope-to: chris@printf.net Delivery-date: Tue, 07 Sep 2010 13:36:56 +0100 Received: from lists.laptop.org ([18.85.2.145] helo=mail.laptop.org) by void.printf.net with esmtp (Exim 4.69) (envelope-from ) id 1OsxQ0-0004hd-Dc for chris@printf.net; Tue, 07 Sep 2010 13:36:56 +0100 Received: by mail.laptop.org (Postfix) id D663C249BA; Tue, 7 Sep 2010 08:35:49 -0400 (EDT) Delivered-To: cjb@laptop.org Received: from spam.laptop.org (spam.laptop.org [18.85.46.23]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.laptop.org (Postfix) with ESMTPS id 00C2E249DD for ; Tue, 7 Sep 2010 08:35:36 -0400 (EDT) X-ASG-Debug-ID: 1283862951-0b74f3150002-zHW3sV Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by spam.laptop.org with ESMTP id RDV1VHtpyIIyQuAF for ; Tue, 07 Sep 2010 08:35:51 -0400 (EDT) X-Barracuda-Envelope-From: linux-mmc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756681Ab0IGMfq (ORCPT ); Tue, 7 Sep 2010 08:35:46 -0400 Received: from mail-ew0-f46.google.com ([209.85.215.46]:51504 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756661Ab0IGMfh (ORCPT ); Tue, 7 Sep 2010 08:35:37 -0400 Received: by ewy23 with SMTP id 23so2288969ewy.19 for ; Tue, 07 Sep 2010 05:35:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references:in-reply-to:references; bh=NCbZfofRPcEWX/1cxmZ0zcb06oBbL4G9gUukKKdOhlY=; b=IUUlzEtZQG52ctKEFc2/IhbtrK3G6tcS2DviZeEy+vi4+yeBK1TGIWNhOgDetQpYAc gfrPJDGM1YDQ17Tk1+xZ7AbKy4FztwCb7hXORHjfzIurA9fo9L8d2mNsDxgr9/cocC+p NighaPL/ldxh3bH/yevHtNRPsUY0lVj9tS0xw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=OkdaVjCFsnNO36I/gCGUzNbYYvP9IqmqhCWxRxdBAXq6uPJfrCPo0JWrvQ4NGJij8h iPtZQmbhZhP+PtoB9RwSQxDnPzux/2bitADu+yq+WMyGlYgo7Pd1mq676lTWjltLwXfw 5k5lKU/th+uEmjK4cLhkMcO4P3eCdV0o6Z/iQ= Received: by 10.213.108.130 with SMTP id f2mr3064048ebp.72.1283862935463; Tue, 07 Sep 2010 05:35:35 -0700 (PDT) Received: from localhost.localdomain (starua.cc.colocall.com [62.149.23.157]) by mx.google.com with ESMTPS id a48sm9835454eei.1.2010.09.07.05.35.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 07 Sep 2010 05:35:34 -0700 (PDT) From: Andy Shevchenko To: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Hunter Adrian , Chris Ball , Andrew Morton , Andy Shevchenko X-ASG-Orig-Subj: [PATCHv6 2/3] mmc_test: change simple_strtol() to strict_strtol() Subject: [PATCHv6 2/3] mmc_test: change simple_strtol() to strict_strtol() Date: Tue, 7 Sep 2010 15:35:25 +0300 Message-Id: X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <09f59cd98b59bf521a5866ab58c216e0a0347a6c.1283862780.git.ext-andriy.shevchenko@nokia.com> References: <09f59cd98b59bf521a5866ab58c216e0a0347a6c.1283862780.git.ext-andriy.shevchenko@nokia.com> In-Reply-To: <09f59cd98b59bf521a5866ab58c216e0a0347a6c.1283862780.git.ext-andriy.shevchenko@nokia.com> References: <09f59cd98b59bf521a5866ab58c216e0a0347a6c.1283862780.git.ext-andriy.shevchenko@nokia.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Barracuda-Connect: vger.kernel.org[209.132.180.67] X-Barracuda-Start-Time: 1283862951 X-Barracuda-URL: http://18.85.46.23:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at laptop.org X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=5.5 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.40186 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c index cd8edf4..6bffb33 100644 --- a/drivers/mmc/card/mmc_test.c +++ b/drivers/mmc/card/mmc_test.c @@ -1937,9 +1937,10 @@ static ssize_t mmc_test_store(struct device *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)