From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754803AbbIRRBQ (ORCPT ); Fri, 18 Sep 2015 13:01:16 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:44501 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754592AbbIRRBN (ORCPT ); Fri, 18 Sep 2015 13:01:13 -0400 Date: Fri, 18 Sep 2015 12:01:06 -0500 From: Felipe Balbi To: CC: , , Peter Chen , Greg Kroah-Hartman , Felipe Balbi , Andrzej Pietrasiewicz Subject: Re: [PATCH] usb: chipidea: udc: improve error handling on ep_queue and f_midi Message-ID: <20150918170106.GA7636@saruman.tx.rr.com> Reply-To: References: <1442594925-31131-1-git-send-email-eu@felipetonello.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FCuugMFkClbJLl1L" Content-Disposition: inline In-Reply-To: <1442594925-31131-1-git-send-email-eu@felipetonello.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 --FCuugMFkClbJLl1L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Fri, Sep 18, 2015 at 05:48:45PM +0100, eu@felipetonello.com wrote: > From: "Felipe F. Tonello" >=20 > _ep_queue() didn't check for errors when using add_td_to_list() > which can fail if dma_pool_alloc fails, thus causing a kernel > panic when lastnode->ptr is NULL. >=20 > Also f_midi is not checking weather the is an error on usb_ep_queue > request, ignoring potential problems, such as memory leaks. >=20 > Signed-off-by: Felipe F. Tonello > --- > drivers/usb/chipidea/udc.c | 26 +++++++++++++++++++------- > drivers/usb/gadget/function/f_midi.c | 11 +++++++++-- why are you patching f_midi.c in a chipidea patch ? Have a read at Documentation/SubmittingPatches, Documentation/SubmitChecklist --=20 balbi --FCuugMFkClbJLl1L Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJV/ENSAAoJEIaOsuA1yqREh60P/RrdbhCBt8oz7+iMwFzxCYrO xf7v0jvxihqHc/dVVc7PO4vC2iCsu8xwu3hCdY4/FHJZSL2qJVAHXhapYDzrO4Yf WLhg0xS+bmpj6f35W8dq6NebD380vbI2TgyAopcoQ3+DsbWDgBRZHHrow+DjOfDA 0B0CQESjr/u1TnHw5LFPXC5PkmbJ1wDQcCvK2Bap7P5r73Jm2PHg55eAluIdoerD 4yJ68tRK2RXFI4Jo2PeCyyA1+XjxbOLszOyxDngrE9aAGG2RcFLzeQsXtpMtlbJp 6/m9UYaFc6yxzudEKt7JOB/oQcsZxcOE8CwX+PCjuJ8T9J1KDvio3c9J7AQ9lJXU EMnIcdNw0lUO/ADT6C5Mgjbw6vb+kYTowUtu9MmHJ0iKtqzHLCN+FHSIOQ2zZDE2 mTPQi6iy1b2CO/RCysgbHEh/M/nJat6QJIEExWfmbZUKxFB6FDykhzn1HefXRCmg G3hUZXbA0x+9e8PWbq5EjSXtV8sDUiA62noH9L2O4ShK+acvdOStPXJV71thRfit ThLe0/0GCpTAbyi3+J8e82KsTvKI49bEyq2xUMnTnb9oO05IHVJfs1FOoJGQw+BR ryKulwmpops8fE9aML2QtcWRsrhJUn74nr25HMQPa13/VjxjSq5/BKDJ/Ds6tOWu V7MXtDeX3Ji1dRNLOcHf =WPNr -----END PGP SIGNATURE----- --FCuugMFkClbJLl1L--