Up to [cvs.NetBSD.org] / src / sys / kern
Request diff between arbitrary revisions
Default branch: MAIN
Current tag: uebayasi-xip-base1
Revision 1.72 / (download) - annotate - [select for diffs], Wed Aug 5 19:39:50 2009 UTC (14 years, 8 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9,
yamt-nfs-mp-base8,
yamt-nfs-mp-base7,
yamt-nfs-mp-base11,
yamt-nfs-mp-base10,
uebayasi-xip-base4,
uebayasi-xip-base3,
uebayasi-xip-base2,
uebayasi-xip-base1,
uebayasi-xip-base,
uebayasi-xip,
matt-premerge-20091211,
matt-mips64-premerge-20101231,
jym-xensuspend-nbase,
jruoho-x86intr-base
Branch point for: rmind-uvmplock,
jruoho-x86intr,
bouyer-quota2
Changes since 1.71: +15 -8
lines
Diff to previous 1.71 (colored)
lockf() passes its arguments through to fcntl() but is supposed to support -ve lengths (lock area before current offset). Nothing in libc or the kernel allowed for this, so some random part of the file would get locked (no idea which bits). Although this could probably be fixed in libc, the stubs for posix file locks for emulations could easily get into the kernel with -ve lengths. So fixing in the kernel avoids those problems. This also fixes PR/41620 (attempting to lock negative offsets) - which is what I was looking into!