diff options
author | glebius <glebius@FreeBSD.org> | 2005-10-19 13:34:48 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2005-10-19 13:34:48 +0000 |
commit | 1767a8e54e1885b63ef8fc5ccdb9cb9ca7eced91 (patch) | |
tree | 4005cf4643f512f235033982ef3c74978db5fb19 /sys/dev | |
parent | 21f42e535fa6a4e118a72f5e8130dfff7456036a (diff) | |
download | FreeBSD-src-1767a8e54e1885b63ef8fc5ccdb9cb9ca7eced91.zip FreeBSD-src-1767a8e54e1885b63ef8fc5ccdb9cb9ca7eced91.tar.gz |
In the em_process_receive_interrupts() cycle check the IFF_DRV_RUNNING
flag. This fixes panic, when 'ifconfig em0 down' was called and it calls
em_stop() while the em_process_receive_interrupts() has temporarily
dropped the lock.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/em/if_em.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c index a114836..ed7bde0 100644 --- a/sys/dev/em/if_em.c +++ b/sys/dev/em/if_em.c @@ -2755,7 +2755,9 @@ em_process_receive_interrupts(struct adapter * adapter, int count) return; } - while ((current_desc->status & E1000_RXD_STAT_DD) && (count != 0)) { + while ((current_desc->status & E1000_RXD_STAT_DD) && + (count != 0) && + (ifp->if_drv_flags & IFF_DRV_RUNNING)) { struct mbuf *m = NULL; mp = adapter->rx_buffer_area[i].m_head; |