Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1208167

[PATCH] mm: Change global memory state symbols to GPL-only

From Ben Hutchings <ben@decadent.org.uk>
Newsgroups linux.kernel
Subject [PATCH] mm: Change global memory state symbols to GPL-only
Date 2015-08-16 01:50 +0200
Message-ID <pXTn3-85P-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] mm: Change global memory state symbols to GPL-only Ben Hutchings <ben@decadent.org.uk> - 2015-08-16 01:50 +0200
  Re: [PATCH] mm: Change global memory state symbols to GPL-only Michal Hocko <mhocko@kernel.org> - 2015-08-17 16:00 +0200
    Re: [PATCH] mm: Change global memory state symbols to GPL-only Ben Hutchings <ben@decadent.org.uk> - 2015-08-17 17:00 +0200
      Re: [PATCH] mm: Change global memory state symbols to GPL-only Michal Hocko <mhocko@kernel.org> - 2015-08-17 17:20 +0200
        Re: [PATCH] mm: Change global memory state symbols to GPL-only Ben Hutchings <ben@decadent.org.uk> - 2015-08-17 19:00 +0200

csiph-web