mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
mm: fix dirty_bytes/dirty_background_bytes sysctls on 64bit arches
We need to pass an unsigned long as the minimum, because it gets casted to an unsigned long in the sysctl handler. If we pass an int, we'll access four more bytes on 64bit arches, resulting in a random minimum value. [[email protected]: fix type of `old_bytes'] Signed-off-by: Sven Wegener <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Dave Chinner <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: David Rientjes <[email protected]> Signed-off-by: David Rientjes <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
35887b1cf7
commit
fc3501d411
2 changed files with 4 additions and 3 deletions
|
|
@ -209,7 +209,7 @@ int dirty_bytes_handler(struct ctl_table *table, int write,
|
|||
struct file *filp, void __user *buffer, size_t *lenp,
|
||||
loff_t *ppos)
|
||||
{
|
||||
int old_bytes = vm_dirty_bytes;
|
||||
unsigned long old_bytes = vm_dirty_bytes;
|
||||
int ret;
|
||||
|
||||
ret = proc_doulongvec_minmax(table, write, filp, buffer, lenp, ppos);
|
||||
|
|
|
|||
Loading…
Reference in a new issue