RE: [PATCH net 1/8] net: enetc: fix the off-by-one issue in enetc_map_tx_buffs()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Wei Fang <wei.fang@xxxxxxx>
> Sent: Tuesday, February 18, 2025 11:18 AM
[...]
> > enetc_free_tx_frame() call on dma_err path is still needed for count 0
> > because it needs to free the skb.
> 
> First, the tx_swbd is not set when count is 0, so tx_swbd->skb is NULL when
> the error occurs.
> 
> Second, the skb is freed in enetc_start_xmit() not enetc_free_tx_frame().

Yeah, noticed too finally.
'do {} while()' is not ok on error path here.





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux