Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp2908647pxv; Sun, 25 Jul 2021 09:31:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMn0NA+pwnYEnWP0UMJgj0nCKwXy1WPb3mrYzT3EHpm9KLe07dINrnzU4I5SiFS4u40u/s X-Received: by 2002:a92:508:: with SMTP id q8mr10494349ile.89.1627230698268; Sun, 25 Jul 2021 09:31:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627230698; cv=none; d=google.com; s=arc-20160816; b=E6/yLmIBguMnjozvKeBn+ah8GkwT25Y2WXSW08zLMg17dyoWTAX4vjDdm902xdaPI/ 5TJQeL+rhG0MLdj62bLj4DJindJhYlBp2WI96BqNuQVIACgQtk/gb0LfQTQc9QpnMf3Z Xudh8+1dA8ADDJsz8B0RfFKJZqT9Hpa6wnQ1RqpHxxk7pxsg7yfU5Jo8qxyKx7hlB/Yh v3Y/nqFtv9GVpdcmbSEB4iGgzPbz6unx99/8htr6yklqQLy09hf5j2uWojl4r3761zUC YHbT3+yUpy37z2VPoxyjwTC6OBKKberzjIcXFtXIQJytqIgltr/i7A0wGzBjT6YyzV82 24pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=gpofj4eTDTgZJoFftCFCQ7/f2GT7NeMQyIITM1/H0es=; b=OvqMKEWubBX8MkMqZAMKMBEV3OPJwaEtjiPyAPenYyQUZYkxxL9U44N5GlQ8DlBGPl lb28AzRfXoKjDefdXPJG5YXuRqr7b7v3TscNlUy6DJYerpA3KYDOjtj9a8G28uFh0j6u 0GV+pRKmZmcH+hiDMO2IE0O0G9Chx3ap4KfkwRPFuOc8hkaGEgt+mFwVU6wB97iP9CqM n5T3UU9k1ShdpTq3ITYve2UUX75kmDmeK3I3eHp6D11BmFbzRuR1zVYqXtnlHY5ZKGlj PVWVnUudx3+PV6S4Y/+50ZPQQbojG8Abytr20xfOstAcYQLUouiBCjGXdBA6w3hL1NVr VjRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k14si38242749iol.64.2021.07.25.09.31.27; Sun, 25 Jul 2021 09:31:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230393AbhGYPuO (ORCPT + 99 others); Sun, 25 Jul 2021 11:50:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230378AbhGYPuO (ORCPT ); Sun, 25 Jul 2021 11:50:14 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 407C9C061760 for ; Sun, 25 Jul 2021 09:30:44 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m7h1V-0007Ue-NA; Sun, 25 Jul 2021 18:30:41 +0200 Received: from pengutronix.de (unknown [IPv6:2a03:f580:87bc:d400:4c93:5280:877:c958]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mkl-all@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id 4F3C2657694; Sun, 25 Jul 2021 16:30:40 +0000 (UTC) Date: Sun, 25 Jul 2021 18:30:39 +0200 From: Marc Kleine-Budde To: Yasushi SHOJI Cc: Pavel Skripkin , wg@grandegger.com, linux-can@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Yasushi SHOJI Subject: Re: [PATCH] net: can: add missing urb->transfer_dma initialization Message-ID: <20210725163039.kyugkdmyn5p3o5r2@pengutronix.de> References: <20210725094246.pkdpvl5aaaftur3a@pengutronix.de> <20210725103630.23864-1-paskripkin@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6c5tzy4pflvjriu6" Content-Disposition: inline In-Reply-To: X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --6c5tzy4pflvjriu6 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 25.07.2021 22:27:37, Yasushi SHOJI wrote: > Hi Pavel, >=20 > I've tested this patch on top of v5.14-rc2. All good. >=20 > Tested-by: Yasushi SHOJI >=20 > Some nitpicks. >=20 > On Sun, Jul 25, 2021 at 7:36 PM Pavel Skripkin wro= te: > > > > Yasushi reported, that his Microchip CAN Analyzer stopped working since > > commit 91c02557174b ("can: mcba_usb: fix memory leak in mcba_usb"). > > The problem was in missing urb->transfer_dma initialization. > > > > In my previous patch to this driver I refactored mcba_usb_start() code = to > > avoid leaking usb coherent buffers. To achive it, I passed local stack >=20 > achieve >=20 > > variable to usb_alloc_coherent() and then saved it to private array to > > correctly free all coherent buffers on ->close() call. But I forgot to > > inialize urb->transfer_dma with variable passed to usb_alloc_coherent(). >=20 > initialize Fixed while applying. Thanks, Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --6c5tzy4pflvjriu6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEK3kIWJt9yTYMP3ehqclaivrt76kFAmD9ka0ACgkQqclaivrt 76k0owf8D7/UgJq6FTxUfwa8X6GgsUGtuxduh6myuhV82vfV/Bq9YiGDoyIHp6ho asnWUi34JmPh3Qxfbmrb3If4GJmCjfENMbxdQCKXYpgPr/ED0b77VBKr/X+FkJN6 VEVpfu/lndw+xtrZE+o7uBM/F1TzAlcyOd8j8zsHrND8aUhnSXc7apxGeFdyYiev 3AjuwNZPn8LyArQVPptlB2uZPhQXzpajEYdxdmEwU5tKbg5td3RbR1iUECgQ8mg7 VbFOTDa2ivDuVyl/zcqg87McltmxfzxsCTxC4oqeatFTjKVPYNWFc6X5adWwQ1+d noIrZtR34OORwPkE9HUeR5/s6RTpsA== =tmG8 -----END PGP SIGNATURE----- --6c5tzy4pflvjriu6--