All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: stable@vger.kernel.org
Cc: Dedy Lansky <dlansky@codeaurora.org>,
	Maya Erez <merez@codeaurora.org>,
	Kalle Valo <kvalo@codeaurora.org>,
	Lee Jones <lee.jones@linaro.org>
Subject: [PATCH 4.19 05/13] wil6210: check rx_buff_mgmt before accessing it
Date: Fri,  3 Apr 2020 13:18:51 +0100	[thread overview]
Message-ID: <20200403121859.901838-6-lee.jones@linaro.org> (raw)
In-Reply-To: <20200403121859.901838-1-lee.jones@linaro.org>

From: Dedy Lansky <dlansky@codeaurora.org>

[ Upstream commit d6a553c0c61b0b0219764e4d4fc14e385085f374 ]

Make sure rx_buff_mgmt is initialized before accessing it.

Signed-off-by: Dedy Lansky <dlansky@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/net/wireless/ath/wil6210/txrx_edma.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/ath/wil6210/txrx_edma.c b/drivers/net/wireless/ath/wil6210/txrx_edma.c
index 5fa8d6ad66482..03d0e6c550b98 100644
--- a/drivers/net/wireless/ath/wil6210/txrx_edma.c
+++ b/drivers/net/wireless/ath/wil6210/txrx_edma.c
@@ -268,6 +268,9 @@ static void wil_move_all_rx_buff_to_free_list(struct wil6210_priv *wil,
 	struct list_head *active = &wil->rx_buff_mgmt.active;
 	dma_addr_t pa;
 
+	if (!wil->rx_buff_mgmt.buff_arr)
+		return;
+
 	while (!list_empty(active)) {
 		struct wil_rx_buff *rx_buff =
 			list_first_entry(active, struct wil_rx_buff, list);
-- 
2.25.1


  parent reply	other threads:[~2020-04-03 12:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-03 12:18 [PATCH 4.19 00/13] Backported fixes taken from Sony's Vendor tree Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 01/13] clk: qcom: rcg: Return failure for RCG update Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 02/13] drm/msm: stop abusing dma_map/unmap for cache Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 03/13] arm64: Fix size of __early_cpu_boot_status Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 04/13] drm_dp_mst_topology: fix broken drm_dp_sideband_parse_remote_dpcd_read() Lee Jones
2020-04-03 12:18 ` Lee Jones [this message]
2020-04-03 12:18 ` [PATCH 4.19 06/13] wil6210: ignore HALP ICR if already handled Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 07/13] wil6210: add general initialization/size checks Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 08/13] wil6210: make sure Rx ring sizes are correlated Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 09/13] rpmsg: glink: Remove chunk size word align warning Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 10/13] wil6210: remove reset file from debugfs Lee Jones
2020-04-11 11:47   ` Greg KH
2020-04-14  7:42     ` Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 11/13] perf/core: Reattach a misplaced comment Lee Jones
2020-04-03 12:26   ` Greg KH
2020-04-03 12:52     ` Lee Jones
2020-04-03 13:23       ` Alexander Shishkin
2020-04-11 11:49         ` Greg KH
2020-04-14  7:37           ` Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 12/13] mm/vmalloc.c: move 'area->pages' after if statement Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 13/13] usb: dwc3: don't set gadget->is_otg flag Lee Jones
2020-04-20 11:24 ` [PATCH 4.19 00/13] Backported fixes taken from Sony's Vendor tree Greg KH

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=20200403121859.901838-6-lee.jones@linaro.org \
    --to=lee.jones@linaro.org \
    --cc=dlansky@codeaurora.org \
    --cc=kvalo@codeaurora.org \
    --cc=merez@codeaurora.org \
    --cc=stable@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.