Source-Changes archive

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

CVS commit: [netbsd-11] src/sys/dev/ic



Module Name:    src
Committed By:   martin
Date:           Fri Oct  2 10:21:55 UTC 2026

Modified Files:
        src/sys/dev/ic [netbsd-11]: rtl8169.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #499):

        sys/dev/ic/rtl8169.c: revision 1.184

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.


To generate a diff of this commit:
cvs rdiff -u -r1.179.2.1 -r1.179.2.2 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