From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57896EE49B5 for ; Wed, 23 Aug 2023 10:14:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232626AbjHWKO1 (ORCPT ); Wed, 23 Aug 2023 06:14:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233118AbjHWKOS (ORCPT ); Wed, 23 Aug 2023 06:14:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 293B4E62; Wed, 23 Aug 2023 03:14:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B440265EE8; Wed, 23 Aug 2023 10:14:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97E8CC433C8; Wed, 23 Aug 2023 10:14:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692785653; bh=T1mQJXJIX5ikkwJQ9CV0e3ioAe53oBJdQkfOUjV1+tE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ugCFy6PHgpeno5INSU/6PDZ3XoZaejkHEVAJUYH01I3+f4URBO6hMYuKqlbtajBw9 3IWCo7sqHGjo1cj0afHmJuh2XeSpOOvaoFGkQzQS9Ex2AljH8zdEoUPotHXgIoDVpz HABoyuQSiL6m3dOLg1a73/jgvFfsFjDAg+9/4pmRZUWHTalg77/1gNwJeskRaKbY/q 0L7/dg3+4Gjl4Toz7wl0j2YdiYpTYLJ4ldhDTujPlwGn3i3eh5ZC/JETKHFqMwifdv Hr9kNbqtgpvhbmqvU3CyfnGCzMTdlGH+bB2ZoLNlKbBBls6K8ih4raemrHwbP9+HpQ 0YlvbqgvTbaHQ== From: Kalle Valo To: Sascha Hauer Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Ping-Ke Shih , Ilgaz =?utf-8?Q?=C3=96cal?= , kernel@pengutronix.de Subject: Re: [PATCH] wifi: rtw88: usb: kill and free rx urbs on probe failure References: <20230823075021.588596-1-s.hauer@pengutronix.de> Date: Wed, 23 Aug 2023 13:14:10 +0300 In-Reply-To: <20230823075021.588596-1-s.hauer@pengutronix.de> (Sascha Hauer's message of "Wed, 23 Aug 2023 09:50:21 +0200") Message-ID: <87ttsqgj65.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Sascha Hauer writes: > After rtw_usb_alloc_rx_bufs() has been called rx urbs have been > allocated and must be freed in the error path. After rtw_usb_init_rx() > has been called they are submitted, so they also must be killed. > > Add these forgotten steps to the probe error path. > > Besides the lost memory this also fixes a problem when the driver > fails to download the firmware in rtw_chip_info_setup(). In this > case it can happen that the completion of the rx urbs handler runs > at a time when we already freed our data structures resulting in > a kernel crash. > > fixes: a82dfd33d1237 ("wifi: rtw88: Add common USB chip support") This should be: Fixes: a82dfd33d123 ("wifi: rtw88: Add common USB chip support") I can fix that, no need to resend because of this. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches