diff options
author | Marco Pfatschbacher <mpf@cvs.openbsd.org> | 2008-09-24 08:41:30 +0000 |
---|---|---|
committer | Marco Pfatschbacher <mpf@cvs.openbsd.org> | 2008-09-24 08:41:30 +0000 |
commit | 9950344f559ad543b21f3c9ee5d06f0982084149 (patch) | |
tree | d191fe99bb9411320a72fbccf1f3c129bb4a5847 /sys/dev | |
parent | d2e40e40bf35f9cabbb08caa7784db7843e22ffe (diff) |
Fix a vr(4) panic that occurs under high load.
If the RX path runs into an out of mbuf scenario, the code
will leave the RX chain with a NULL'd mbuf-slot.
We now always reassign a valid mbuf, even if m_devget() fails.
OK brad@, thib@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_vr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index ae57786c965..27115075d12 100644 --- a/sys/dev/pci/if_vr.c +++ b/sys/dev/pci/if_vr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vr.c,v 1.76 2008/09/10 14:01:23 blambert Exp $ */ +/* $OpenBSD: if_vr.c,v 1.77 2008/09/24 08:41:29 mpf Exp $ */ /* * Copyright (c) 1997, 1998 @@ -808,7 +808,8 @@ vr_rxeof(struct vr_softc *sc) { m0 = m_devget(mtod(m, caddr_t) - ETHER_ALIGN, total_len + ETHER_ALIGN, 0, ifp, NULL); - if (m0 == NULL || vr_alloc_mbuf(sc, cur_rx, m)) { + vr_alloc_mbuf(sc, cur_rx, m); + if (m0 == NULL) { ifp->if_ierrors++; continue; } |