Skip to contentSkip to conversation

sysctl: vm.drop_caches should be writable only

PATCH New Denis Cheng 1 participant 1 message Mar 19, 2008 Proc sysctl

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sysctl: vm.drop_caches should be writable only

This file's functionality is to tell the system to do a cache reclaiming, the possible value to write to it is only 1, 2 or 3, reading from it will get the last value written to it, that's meaingless.

---
Reference to 7e3e0360, which also changed some sysctl value from 0644 to 0200.

 kernel/sysctl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/sysctl.c +1 -1
index b2a2d68..f50926a 100644
@@ -980,7 +980,7 @@ static struct ctl_table vm_table[] = {
 		.procname	= "drop_caches",
 		.data		= &sysctl_drop_caches,
 		.maxlen		= sizeof(int),
-		.mode		= 0644,
+		.mode		= 0200,
 		.proc_handler	= drop_caches_sysctl_handler,
 		.strategy	= &sysctl_intvec,
 	},
Signature · 1 line
1.5.4.4