From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Subject: Re: [PATCH] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data,Re: [PATCH] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data Date: Mon, 10 Dec 2018 08:18:34 +0100 Message-ID: <20181210071834.GC7511@kroah.com> References: <20181209163245.GA25484@kroah.com> <20181209.115429.682021500318327981.davem@davemloft.net> <45684212-92ce-e771-08d8-c405a196a4fc@nebelwelt.net> <20181209.120621.950092094959433295.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: David Miller , netdev@vger.kernel.org, linux-usb@vger.kernel.org, bigeasy@linutronix.de, benquike@gmail.com To: Mathias Payer Return-path: Received: from mail.kernel.org ([198.145.29.99]:51822 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726292AbeLJHSi (ORCPT ); Mon, 10 Dec 2018 02:18:38 -0500 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Sun, Dec 09, 2018 at 09:17:58PM +0100, Mathias Payer wrote: > > The whole kernel is full of situations where an int is returned and if it's > > negative it's an error. Why is this location so different? > > > > Just check < 0 and be done with it. > > OK, whatever you prefer. My fault, I was tired and suggested the other way... > I've attached the updated patch. (Greg, please add your Signed-off-by). Patches can't be attached, I'll fix this up and resend, thanks. greg k-h