--- - branch: netbsd-8 date: Sun May 6 09:20:43 UTC 2018 files: - new: 1.172.6.4 old: 1.172.6.3 path: src/sys/kern/uipc_mbuf.c pathrev: src/sys/kern/uipc_mbuf.c@1.172.6.4 type: modified id: 20180506T092043Z.9e26941feb50a286c83dc038802db15729aaf733 log: "Pull up following revision(s) (requested by maxv in ticket #802):\n\n\tsys/kern/uipc_mbuf.c: revision 1.211 (via patch)\n\nModify m_defrag, so that it never frees the first mbuf of the chain. While\nhere use the given 'flags' argument, and not M_DONTWAIT.\n\nWe have a problem with several drivers: they poll an mbuf chain from their\nqueues and call m_defrag on them, but m_defrag could update the mbuf\npointer, so the mbuf in the queue is no longer valid. It is not easy to\nfix each driver, because doing pop+push will reorder the queue, and we\ndon't really want that to happen.\n\nThis problem was independently spotted by me, Kengo, Masanobu, and other\npeople too it seems (perhaps PR/53218).\nNow m_defrag leaves the first mbuf in place, and compresses the chain\nonly starting from the second mbuf in the chain.\n\nIt is important not to compress the first mbuf with hacks, because the\nstorage of this first mbuf may be shared with other mbufs.\n" module: src subject: 'CVS commit: [netbsd-8] src/sys/kern' unixtime: '1525598443' user: martin