[Bug 137145] [mbuf] Reference count computing isn't correct when more than one threads call function m_copypacket
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 15 Mar 2025 02:01:43 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=137145 --- Comment #9 from Gleb Smirnoff <glebius@FreeBSD.org> --- This conditional assignment had made several people to scratch their heads, but eventually every one agreed that it is safe. I'd be interested to see the 3 thread race that actually makes this code fail. The more you think on this race, the more you would think that the code that does it is not correct. By definition, if your *m->m_ext.ext_cnt is 1, then you OWN this mbuf, and nobody else should see it. So how does two other find it? Given that bug report is quite old, I'd prefer not to change any code unless submitter comes back and gives more information. btw, thanks for bring it up, Zhenlei. I totally missed it, and didn't know about its existence. -- You are receiving this mail because: You are the assignee for the bug.