Browse Source

qcacld-3.0: Add check for valid last_skb before aggregation

In the FISA UDP aggregation path, flush may be initiated while trying to
add nbuf to end of the list. When flush happens, both head_skb and
last_skb will be set to NULL so make sure last_skb is valid before
adding nbuf to end of the list.

Change-Id: I473540a205c56f2fea3ffb82909cfec31c58a518
CRs-Fixed: 2783758
Saket Jha 4 years ago
parent
commit
43094a430b
1 changed files with 6 additions and 1 deletions
  1. 6 1
      core/dp/txrx3.0/dp_fisa_rx.c

+ 6 - 1
core/dp/txrx3.0/dp_fisa_rx.c

@@ -1094,7 +1094,12 @@ dp_rx_fisa_aggr_udp(struct dp_rx_fst *fisa_hdl,
 		 * This is 3rd skb for flow.
 		 * After head skb, 2nd skb in fraglist
 		 */
-		qdf_nbuf_set_next(fisa_flow->last_skb, nbuf);
+		if (fisa_flow->last_skb) {
+			qdf_nbuf_set_next(fisa_flow->last_skb, nbuf);
+		} else {
+			qdf_nbuf_free(nbuf);
+			return FISA_AGGR_DONE;
+		}
 	} else {
 		/* 1st skb after head skb
 		 * implement qdf wrapper set_ext_list