CVSROOT: /cvs Module name: src Changes by: a...@cvs.openbsd.org 2009/07/28 05:19:43
Modified files: sys/nfs : nfs_bio.c Log message: Using the buf pointer returned from incore is a really bad idea. Even if we know that someone safely holds B_BUSY and will not modify the buf (as was the case in here), we still need to be sure that the B_BUSY will not be released while we fiddle with the buf. In this case, it was not safe, since copyout can sleep and whoever was writing out the buf could finish the write and release the buf which could then get recycled or unmapped while we slept. Always acquire B_BUSY ourselves, even when it might give a minor performance penalty. thib@ ok