diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-02-09 21:36:11 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-02-09 21:36:11 +0000 |
commit | 86113140779ab090e181a38986bc34b6e8235031 (patch) | |
tree | c8850ddc012fb435d6cc8efdf5d97b7a4c58fd69 | |
parent | 8cf76b315ec7ab43f92f951f1f65090d612b2d08 (diff) |
Don't panic if m_copyback() is working on a M_READONLY() mbuf. The old version
did not care either and with this packets from drivers with external buffers
(e.g. wpi(4)) would trigger this panic through pf(4).
Found the hard way by Tim van der Molen tbvdm (at) xs4all (dot) nl
-rw-r--r-- | sys/kern/uipc_mbuf.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index bb41329f098..200ec1dfa3c 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_mbuf.c,v 1.117 2009/02/04 20:02:11 claudio Exp $ */ +/* $OpenBSD: uipc_mbuf.c,v 1.118 2009/02/09 21:36:10 claudio Exp $ */ /* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */ /* @@ -739,8 +739,6 @@ m_copyback(struct mbuf *m0, int off, int len, const void *_cp) m = m->m_next; } while (len > 0) { - if (M_READONLY(m)) - panic("m_copyback called on a readonly cluster"); /* extend last packet to be filled fully */ if (m->m_next == NULL && (len > m->m_len - off)) m->m_len += min(len - (m->m_len - off), |