Bug 12953 - wrong limit on sysctl fs.lease-break-time
Summary: wrong limit on sysctl fs.lease-break-time
Status: RESOLVED CODE_FIX
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: File Locking (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Matthew Wilcox
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-27 12:58 UTC by Arne de Bruijn
Modified: 2009-03-27 13:25 UTC (History)
0 users

See Also:
Kernel Version:
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
patch (1.27 KB, patch)
2009-03-27 13:24 UTC, Matthew Wilcox
Details | Diff

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.

Note You need to log in before you can comment on or make changes to this bug.