mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
Add a check to know whether driver is still running after
reacquiring driver lock in Rx handler. re(4) drops a driver lock before passing received frame to upper stack and reacquire the lock. During the time window ioctl calls could be executed and if the ioctl was interface down request, driver will stop the controller and free allocated mbufs. After that when driver comes back to Rx handler again it does not know what was happend so it could access free mbufs which in turn cause panic. Reported by: Norbert Papke < npapk <> acm dot org > Tested by: Norbert Papke < npapk <> acm dot org >
This commit is contained in:
parent
bb08f03318
commit
5b6d1d9d08
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=198814
@ -1817,6 +1817,8 @@ re_rxeof(struct rl_softc *sc, int *rx_npktsp)
|
||||
|
||||
for (i = sc->rl_ldata.rl_rx_prodidx; maxpkt > 0;
|
||||
i = RL_RX_DESC_NXT(sc, i)) {
|
||||
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
|
||||
break;
|
||||
cur_rx = &sc->rl_ldata.rl_rx_list[i];
|
||||
rxstat = le32toh(cur_rx->rl_cmdstat);
|
||||
if ((rxstat & RL_RDESC_STAT_OWN) != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user