From: Ben Hutchings <ben@decadent.org.uk>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] mm: Change global memory state symbols to GPL-only
Date: Sun, 16 Aug 2015 01:42:27 +0200 [thread overview]
Message-ID: <1439682147.10857.99.camel@decadent.org.uk> (raw)
[-- Attachment #1: Type: text/plain, Size: 1432 bytes --]
Proprietary modules should not be able to touch vm_stat or participate
in shrinking.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
mm/vmscan.c | 4 ++--
mm/vmstat.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 8286938..e6e7449 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -247,7 +247,7 @@ int register_shrinker(struct shrinker *shrinker)
up_write(&shrinker_rwsem);
return 0;
}
-EXPORT_SYMBOL(register_shrinker);
+EXPORT_SYMBOL_GPL(register_shrinker);
/*
* Remove one
@@ -259,7 +259,7 @@ void unregister_shrinker(struct shrinker *shrinker)
up_write(&shrinker_rwsem);
kfree(shrinker->nr_deferred);
}
-EXPORT_SYMBOL(unregister_shrinker);
+EXPORT_SYMBOL_GPL(unregister_shrinker);
#define SHRINK_BATCH 128
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 4f5cd97..6d3f8f4 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -87,7 +87,7 @@ void vm_events_fold_cpu(int cpu)
* vm_stat contains the global counters
*/
atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS] __cacheline_aligned_in_smp;
-EXPORT_SYMBOL(vm_stat);
+EXPORT_SYMBOL_GPL(vm_stat);
#ifdef CONFIG_SMP
--
Ben Hutchings
[W]e found...that it wasn't as easy to get programs right as we had thought.
... I realized that a large part of my life from then on was going to be spent
in finding mistakes in my own programs. - Maurice Wilkes, 1949
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
next reply other threads:[~2015-08-15 23:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-15 23:42 Ben Hutchings [this message]
2015-08-17 13:54 ` Michal Hocko
2015-08-17 14:56 ` Ben Hutchings
2015-08-17 15:11 ` Michal Hocko
2015-08-17 16:51 ` Ben Hutchings
2015-09-01 1:24 Richard Yao
2015-09-01 2:51 ` Dave Chinner
2015-09-01 13:21 ` Ben Hutchings
2015-09-01 17:29 ` Richard Yao
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=1439682147.10857.99.camel@decadent.org.uk \
--to=ben@decadent.org.uk \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.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
Powered by JetHome