All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm,vmscan: Mark register_shrinker() as __must_check
@ 2017-11-21 12:02 Tetsuo Handa
  2017-11-21 21:40 ` Andrew Morton
  0 siblings, 1 reply; 18+ messages in thread
From: Tetsuo Handa @ 2017-11-21 12:02 UTC (permalink / raw)
  To: linux-mm, akpm; +Cc: Tetsuo Handa

There are users not checking for register_shrinker() failure.
Continuing with ignoring failure can lead to later oops at
unregister_shrinker().

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
---
 include/linux/shrinker.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/shrinker.h b/include/linux/shrinker.h
index 388ff29..a389491 100644
--- a/include/linux/shrinker.h
+++ b/include/linux/shrinker.h
@@ -75,6 +75,6 @@ struct shrinker {
 #define SHRINKER_NUMA_AWARE	(1 << 0)
 #define SHRINKER_MEMCG_AWARE	(1 << 1)
 
-extern int register_shrinker(struct shrinker *);
+extern __must_check int register_shrinker(struct shrinker *);
 extern void unregister_shrinker(struct shrinker *);
 #endif
-- 
1.8.3.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2017-11-23 11:05 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-21 12:02 [PATCH] mm,vmscan: Mark register_shrinker() as __must_check Tetsuo Handa
2017-11-21 21:40 ` Andrew Morton
2017-11-21 22:09   ` Tetsuo Handa
2017-11-22 10:53     ` Tetsuo Handa
2017-11-22 12:45       ` Michal Hocko
2017-11-22 13:06         ` Tetsuo Handa
2017-11-22 14:31           ` Paolo Bonzini
2017-11-22 14:36             ` Michal Hocko
2017-11-22 20:39       ` Dave Chinner
2017-11-23  6:34         ` Tetsuo Handa
2017-11-23  8:02           ` Michal Hocko
2017-11-23  9:21           ` Paolo Bonzini
2017-11-23  9:56             ` Tetsuo Handa
2017-11-23 10:02               ` Michal Hocko
2017-11-23 10:38                 ` Tetsuo Handa
2017-11-23 10:43               ` Paolo Bonzini
2017-11-23 11:03                 ` Tetsuo Handa
2017-11-22 12:33     ` Michal Hocko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.