From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932077AbbFIDOY (ORCPT ); Mon, 8 Jun 2015 23:14:24 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:50216 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752506AbbFIDON (ORCPT ); Mon, 8 Jun 2015 23:14:13 -0400 Date: Mon, 8 Jun 2015 22:11:44 -0500 From: Felipe Balbi To: Greg Kroah-Hartman CC: Laurent Pinchart , Colin King , Felipe Balbi , Sudeep Holla , Valentin Rothberg , , Subject: Re: [PATCH][V3] usb: isp1760: check for null return from kzalloc Message-ID: <20150609031144.GB12655@saruman.tx.rr.com> Reply-To: References: <1433268313-23423-1-git-send-email-colin.king@canonical.com> <2210713.bNgAhNmNaU@avalon> <20150608212206.GA16448@kroah.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gatW/ieO32f1wygP" Content-Disposition: inline In-Reply-To: <20150608212206.GA16448@kroah.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --gatW/ieO32f1wygP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 08, 2015 at 02:22:06PM -0700, Greg Kroah-Hartman wrote: > On Wed, Jun 03, 2015 at 03:43:23AM +0300, Laurent Pinchart wrote: > > Hi Colin, > >=20 > > Thank you for the patch. > >=20 > > On Tuesday 02 June 2015 19:05:13 Colin King wrote: > > > From: Colin Ian King > > >=20 > > > isp1760_ep_alloc_request allocates a structure with kzalloc without c= hecking > > > for NULL and then returns a pointer to one of the structure fields. A= s the > > > field happens to be the first in the structure the caller can properly > > > check for NULL, but this is risky if the structure layout is changed = later. > > > Add an explicit NULL check for the kzalloc return value > > >=20 > > > Detected with smatch static analysis: > > >=20 > > > drivers/usb/isp1760/isp1760-udc.c:816 isp1760_ep_alloc_request() > > > error: potential null dereference 'req'. (kzalloc returns null) > > >=20 > > > [ thanks to Laurent Pinchart for improved commit message ] > > >=20 > > > Signed-off-by: Colin Ian King > >=20 > > Acked-by: Laurent Pinchart > >=20 > > Felipe, I expect you to pick this up, please let me know if there's any= issue. >=20 > I'll just take it directly, thanks. that works too, dropping from my queue. --=20 balbi --gatW/ieO32f1wygP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVdllwAAoJEIaOsuA1yqREXs4P/3XrvBcY8cOYUqY+DddrZlTc wmTtsZWvAgcAL5/2LP2cBWgYN7VSzmDfYQwXOXtrMbekCyMcRah5CNEjUSvB4Y9v d0BlaUKfewRggwgr2FaVIJ1y82g1SWzXte3y+eQkUDWJzu2hcGA9Aq+8tYOiv3ak P/9/Rv/m3d71NhN7a0M0motoV+e2nh3wxGrpXdZGAkh1vA0f9YxpFzOp2lRL30xQ fv7ojS5lLZrv/cSgb1wnUSqSYS0BFIRgPa4UJBKvE8Onf9mGRS2qQSFxA2TDea4W dPVLOFgFMn6dvce1hchVoayWvOvTo+erVmLsktc7RVyAs1Hc7ORs3n5NBkUoV/Mq KtjyK5mrIuPuYnXL70Zz1OEAKOFLH83Pw9U+zSFHNFQ3fWe+CPEaYVYs76pM/SZ7 9A7KLjZ2HnLw4tZ8INPF1Za+yPRM7NdYXdrPYs/OcVAoe8YiajynqpW/vlePfNnF we2Te9PDwB8p5UAhmuTYxVY0st2hNJmf8D47JjUWkbqgzFMpv9szDU2D/oIWIUxg ObJXn02vrjOlWC3UB6YUel5ENdiXHEel6s/Nh9Ilgoao/rWOrT81JtUAm9y86kpv VPkuziCdA1og+0ALpiHhM9HMSF7WnCs147fOHKjeIh15b03O/+fKROY1jwbnWYor ONyp+OiQQVKLVK+k/f3m =GuEF -----END PGP SIGNATURE----- --gatW/ieO32f1wygP--