Bug 12953

Summary: wrong limit on sysctl fs.lease-break-time
Product: IO/Storage Reporter: Arne de Bruijn (kernelbt)
Component: File LockingAssignee: Matthew Wilcox (matthew)
Status: RESOLVED CODE_FIX    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: Subsystem:
Regression: Yes Bisected commit-id:
Attachments: patch

Description Arne de Bruijn 2009-03-27 12:58:32 UTC
In kernel 2.6.15 I was able to reduce lease-break-time to 5 seconds. In kernel 2.6.28 this fails with invalid argument:
# sysctl -w fs.lease-break-time=5
error: "Invalid argument" setting key "fs.lease-break-time"

kernel/sysctl.c shows lease-break-time is limited to a value from 0 to 2, and setting it to 2 does indeed work. This seems wrong, the default is 45.

I traced this to the following commit:
http://git.kernel.org/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=76fdbb25f963de5dc1e308325f0578a2f92b1c2d
(coredump masking: bound suid_dumpable sysctl)
which seems put a limit on the wrong sysctl.
Comment 1 Matthew Wilcox 2009-03-27 13:24:06 UTC
Created attachment 20701 [details]
patch
Comment 2 Matthew Wilcox 2009-03-27 13:25:41 UTC
Thanks for tracking down the exact commit that introduced the problem.  It made the above patch very easy to write.  I'll send it to the stable tree as well as Linus.