From: "Love, Robert W" Subject: Re: New Defects based on recent changes in Kernel code found by Coverity Scan Date: Thu, 5 Jul 2012 15:12:21 +0000 Message-ID: <4FF5AECA.40801@intel.com> References: <829BE905228AE14A9AE1A46E6F2E371605538D039D@VA3DIAXVS891.RED001.local> <20120703152739.ea7df9e6.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Cc: Scan Subscription , "linux-kernel@vger.kernel.org" , "linux-scsi@vger.kernel.org" , Chris Mason , Bing Zhao , Andrew Vasquez , Theodore Ts'o , "linux-ext4@vger.kernel.org" , Mattia Dongili , Matthew Garrett To: Andrew Morton Return-path: Received: from mga02.intel.com ([134.134.136.20]:40485 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752900Ab2GEPMa convert rfc822-to-8bit (ORCPT ); Thu, 5 Jul 2012 11:12:30 -0400 In-Reply-To: <20120703152739.ea7df9e6.akpm@linux-foundation.org> Content-Language: en-US Content-ID: Sender: linux-ext4-owner@vger.kernel.org List-ID: On 7/3/2012 3:27 PM, Andrew Morton wrote: > On Thu, 28 Jun 2012 11:32:09 -0700 > Scan Subscription wrote: > > ____________________________________________________________________________________________________________ > CID 703581 - NO_EFFECT Unsigned compared against 0 - This less-than-zero comparison of an unsigned value is never true. "*val < 0UL". > > drivers/scsi/fcoe/fcoe_sysfs.c:105 > 100 static int fcoe_str_to_dev_loss(const char *buf, unsigned long *val) > 101 { > 102 int ret; > 103 > 104 ret = kstrtoul(buf, 0, val); >>>>> CID 703581: Unsigned compared against 0 (NO_EFFECT) This less-than-zero comparison of an unsigned value is never true. "*val < 0UL". >> 105 if (ret || *val < 0) >> 106 return -EINVAL; >> 107 /* >> 108 * Check for overflow; dev_loss_tmo is u32 >> Patch posted to linux-scsi. Thanks, //Rob