summaryrefslogtreecommitdiff
path: root/sys/dev/ic/rtl81x9.c
diff options
context:
space:
mode:
authorBret Lambert <blambert@cvs.openbsd.org>2010-07-02 02:40:18 +0000
committerBret Lambert <blambert@cvs.openbsd.org>2010-07-02 02:40:18 +0000
commitbfc9493d9280a5a8ab43b8df30cd772c910140ba (patch)
tree32334a91bf10c89a8551f90fe6749d45476d9ad8 /sys/dev/ic/rtl81x9.c
parent364840df3893a5f720df05ee307b996c62195a07 (diff)
m_copyback can fail to allocate memory, but is a void fucntion so gymnastics
are required to detect that. Change the function to take a wait argument (used in nfs server, but M_NOWAIT everywhere else for now) and to return an error ok claudio@ henning@ krw@
Diffstat (limited to 'sys/dev/ic/rtl81x9.c')
-rw-r--r--sys/dev/ic/rtl81x9.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/rtl81x9.c b/sys/dev/ic/rtl81x9.c
index 5f636c712aa..3fe752fa6b3 100644
--- a/sys/dev/ic/rtl81x9.c
+++ b/sys/dev/ic/rtl81x9.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtl81x9.c,v 1.70 2010/05/19 15:27:35 oga Exp $ */
+/* $OpenBSD: rtl81x9.c,v 1.71 2010/07/02 02:40:16 blambert Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -655,7 +655,7 @@ rl_rxeof(struct rl_softc *sc)
m = m_devget(rxbufpos, wrap, ETHER_ALIGN, ifp, NULL);
if (m != NULL) {
m_copyback(m, wrap, total_len - wrap,
- sc->rl_cdata.rl_rx_buf);
+ sc->rl_cdata.rl_rx_buf, M_NOWAIT);
if (m->m_pkthdr.len < total_len) {
m_freem(m);
m = NULL;