Message ID | 20250102121018.868745-1-anumula@chelsio.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net] cxgb4: Avoid removal of uninserted tid | expand |
On Thu, Jan 02, 2025 at 05:40:18PM +0530, Anumula Murali Mohan Reddy wrote: > During ARP failure, tid is not inserted but _c4iw_free_ep() > attempts to remove tid which results in error. > This patch fixes the issue by avoiding removal of uninserted tid. > You need a fixes tag. Like here for example https://lore.kernel.org/netdev/CANn89iJP4unWmk2T36t1LiFrchy+DSGkbZWz_i42mb1eCDXyeg@mail.gmail.com/T/#m197e95ef4948a30732c1f6a046d3f0f7af163826 > Signed-off-by: Anumula Murali Mohan Reddy <anumula@chelsio.com> > Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com> > --- > drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c > index bc3af0054406..604dcfd49aa4 100644 > --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c > +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c > @@ -1799,7 +1799,10 @@ void cxgb4_remove_tid(struct tid_info *t, unsigned int chan, unsigned int tid, > struct adapter *adap = container_of(t, struct adapter, tids); > struct sk_buff *skb; > > - WARN_ON(tid_out_of_range(&adap->tids, tid)); > + if (tid_out_of_range(&adap->tids, tid)) { > + dev_err(adap->pdev_dev, "tid %d out of range\n", tid); > + return; > + } Fix looks fine, thanks Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> > > if (t->tid_tab[tid - adap->tids.tid_base]) { > t->tid_tab[tid - adap->tids.tid_base] = NULL; > -- > 2.39.3 >
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index bc3af0054406..604dcfd49aa4 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c @@ -1799,7 +1799,10 @@ void cxgb4_remove_tid(struct tid_info *t, unsigned int chan, unsigned int tid, struct adapter *adap = container_of(t, struct adapter, tids); struct sk_buff *skb; - WARN_ON(tid_out_of_range(&adap->tids, tid)); + if (tid_out_of_range(&adap->tids, tid)) { + dev_err(adap->pdev_dev, "tid %d out of range\n", tid); + return; + } if (t->tid_tab[tid - adap->tids.tid_base]) { t->tid_tab[tid - adap->tids.tid_base] = NULL;