Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933609AbaDINxz (ORCPT ); Wed, 9 Apr 2014 09:53:55 -0400 Received: from mail-ig0-f182.google.com ([209.85.213.182]:58077 "EHLO mail-ig0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933143AbaDINxw (ORCPT ); Wed, 9 Apr 2014 09:53:52 -0400 MIME-Version: 1.0 In-Reply-To: <20140409113904.GE4912@mwanda> References: <2039876.xlVvlD6iFL@daeseok-laptop.cloud.net> <20140409113904.GE4912@mwanda> Date: Wed, 9 Apr 2014 22:53:52 +0900 Message-ID: Subject: Re: [PATCH] staging: speakup: fix misuse of kstrtol() in handle_goto() From: DaeSeok Youn To: Dan Carpenter Cc: gregkh@linuxfoundation.org, sachin.kamat@linaro.org, devel@driverdev.osuosl.org, grygorii.strashko@ti.com, lisa@xenapiadmin.com, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2014-04-09 20:39 GMT+09:00, Dan Carpenter : > On Wed, Apr 09, 2014 at 07:45:46PM +0900, Daeseok Youn wrote: >> >> A string of goto_buf has a number followed by x or y. >> e.g. "3x" means move 3 lines down. >> The kstrtol() returns an error(-EINVAL) with this string so >> go_pos has unsigned a value of that error. >> And also "*cp" has not expected value. >> > > Good catch. This was introduced when we changed the simple_strtoul() to > kstrtol(). Thanks! :-) > > Reviewed-by: Dan Carpenter > > Did you find this bug by testing or through reading the code? Actually, I couldn't test. I have looked the code for checking sparse warnings and found this bug. Regards, Daeseok Youn > > regards, > dan carpenter > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/