linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Sascha Hauer <s.hauer@pengutronix.de>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Kalle Valo" <kvalo@kernel.org>,
	"Ilgaz Öcal" <ilgaz@ilgaz.gen.tr>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>
Subject: RE: [PATCH] wifi: rtw88: usb: kill and free rx urbs on probe failure
Date: Fri, 25 Aug 2023 01:13:08 +0000	[thread overview]
Message-ID: <8b4b4228bfd140119665417137a087ea@realtek.com> (raw)
In-Reply-To: <20230823075021.588596-1-s.hauer@pengutronix.de>



> -----Original Message-----
> From: Sascha Hauer <s.hauer@pengutronix.de>
> Sent: Wednesday, August 23, 2023 3:50 PM
> To: linux-wireless@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org; Ping-Ke Shih <pkshih@realtek.com>; Kalle Valo <kvalo@kernel.org>; Ilgaz
> Öcal <ilgaz@ilgaz.gen.tr>; kernel@pengutronix.de
> Subject: [PATCH] wifi: rtw88: usb: kill and free rx urbs on probe failure
> 
> 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")
> Cc: stable@vger.kernel.org
> Reported-by: Ilgaz Öcal <ilgaz@ilgaz.gen.tr>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Acked-by: Ping-Ke Shih <pkshih@realtek.com>


  parent reply	other threads:[~2023-08-25  1:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-23  7:50 [PATCH] wifi: rtw88: usb: kill and free rx urbs on probe failure Sascha Hauer
2023-08-23 10:14 ` Kalle Valo
2023-08-23 15:54 ` Larry Finger
2023-08-25  1:13 ` Ping-Ke Shih [this message]
2023-08-25 10:02 ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8b4b4228bfd140119665417137a087ea@realtek.com \
    --to=pkshih@realtek.com \
    --cc=ilgaz@ilgaz.gen.tr \
    --cc=kernel@pengutronix.de \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).