Source-Changes archive

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

CVS commit: src/sys/dev/ic



Module Name:    src
Committed By:   tsutsui
Date:           Wed Sep 23 19:15:25 UTC 2026

Modified Files:
        src/sys/dev/ic: rtl8169.c

Log Message:
re(4): fix mangled TX queue on DMA map loading errors

Do not advance the TX queue producer index when bus_dmamap_load_mbuf()
fails.

The producer index must advance only after a packet has been
successfully committed to a TX queue entry.  Advancing it on a
map loading error leaves a hole in re_txq[], while re_txq_free()
still counts only successfully queued packets.

re_txeof() assumes that all outstanding TX queue entries from
re_txq_considx are contiguous, so such a hole can make it process
an unused entry and corrupt the TX queue accounting.

This bug was introduced by my re_encap() -> re_start() refactoring
in rev. 1.59 back in 2006.  Sorry it took ~20 years to notice it.

Should be pulled up to netbsd-11 and netbsd-10.


To generate a diff of this commit:
cvs rdiff -u -r1.183 -r1.184 src/sys/dev/ic/rtl8169.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index