mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Denis Cheng <crquan@gmail.com>
To: Ingo Molnar <mingo@elte.hu>,
	Linus Torvalds <torvalds@woody.linux-foundation.org>
Cc: Dave Jones <davej@redhat.com>, linux-kernel@vger.kernel.org
Subject: [PATCH] sysctl: vm.drop_caches should be writable only
Date: Wed, 19 Mar 2008 19:19:02 +0800	[thread overview]
Message-ID: <1205925542-14459-1-git-send-email-crquan@gmail.com> (raw)

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.

Signed-off-by: Denis Cheng <crquan@gmail.com>
---
Reference to 7e3e0360, which also changed some sysctl value from 0644 to 0200.

 kernel/sysctl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index b2a2d68..f50926a 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -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,
 	},
-- 
1.5.4.4


                 reply	other threads:[~2008-03-19 21:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1205925542-14459-1-git-send-email-crquan@gmail.com \
    --to=crquan@gmail.com \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@woody.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®