Linux-Wireless Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] rsi: release skb if rsi_prepare_beacon fails
@ 2019-09-14  0:08 Navid Emamdoost
  2019-10-01  9:19 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Navid Emamdoost @ 2019-09-14  0:08 UTC (permalink / raw)
  To: unlisted-recipients:; (no To-header on input)
  Cc: emamd001, smccaman, kjlu, Navid Emamdoost, Amitkumar Karwar,
	Siva Rebbagondla, Kalle Valo, David S. Miller, linux-wireless,
	netdev, linux-kernel

In rsi_send_beacon, if rsi_prepare_beacon fails the allocated skb should
be released.

Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
---
 drivers/net/wireless/rsi/rsi_91x_mgmt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/rsi/rsi_91x_mgmt.c b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
index 6c7f26ef6476..9cc8a335d519 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
@@ -1756,6 +1756,7 @@ static int rsi_send_beacon(struct rsi_common *common)
 		skb_pull(skb, (64 - dword_align_bytes));
 	if (rsi_prepare_beacon(common, skb)) {
 		rsi_dbg(ERR_ZONE, "Failed to prepare beacon\n");
+		dev_kfree_skb(skb);
 		return -EINVAL;
 	}
 	skb_queue_tail(&common->tx_queue[MGMT_BEACON_Q], skb);
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] rsi: release skb if rsi_prepare_beacon fails
  2019-09-14  0:08 [PATCH] rsi: release skb if rsi_prepare_beacon fails Navid Emamdoost
@ 2019-10-01  9:19 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2019-10-01  9:19 UTC (permalink / raw)
  To: Navid Emamdoost
  Cc: unlisted-recipients:; (no To-header on input) emamd001, smccaman,
	kjlu, Navid Emamdoost, Amitkumar Karwar, Siva Rebbagondla,
	David S. Miller, linux-wireless, netdev, linux-kernel

Navid Emamdoost <navid.emamdoost@gmail.com> wrote:

> In rsi_send_beacon, if rsi_prepare_beacon fails the allocated skb should
> be released.
> 
> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>

Patch applied to wireless-drivers-next.git, thanks.

d563131ef23c rsi: release skb if rsi_prepare_beacon fails

-- 
https://patchwork.kernel.org/patch/11145515/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-14  0:08 [PATCH] rsi: release skb if rsi_prepare_beacon fails Navid Emamdoost
2019-10-01  9:19 ` Kalle Valo

Linux-Wireless Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-wireless/0 linux-wireless/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-wireless linux-wireless/ https://lore.kernel.org/linux-wireless \
		linux-wireless@vger.kernel.org linux-wireless@archiver.kernel.org
	public-inbox-index linux-wireless

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-wireless


AGPL code for this site: git clone https://public-inbox.org/ public-inbox