public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kthread: unexport __kthread_should_park()
@ 2023-08-04  6:41 Greg Kroah-Hartman
  2023-08-04  8:39 ` Kees Cook
  0 siblings, 1 reply; 2+ messages in thread
From: Greg Kroah-Hartman @ 2023-08-04  6:41 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, John Stultz, Peter Zijlstra (Intel),
	Arve Hjønnevåg, Valentin Schneider, Andrew Morton,
	Christian Brauner (Microsoft), Mike Christie, Kees Cook,
	Nicholas Piggin, Zqiang, Prathu Baronia, Sami Tolvanen

There are no in-kernel users of __kthread_should_park() so mark it as
static and do not export it.

Cc: John Stultz <jstultz@google.com>
Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
Cc: "Arve Hjønnevåg" <arve@android.com>
Cc: Valentin Schneider <vschneid@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: "Christian Brauner (Microsoft)" <brauner@kernel.org>
Cc: Mike Christie <michael.christie@oracle.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Zqiang <qiang1.zhang@intel.com>
Cc: Prathu Baronia <quic_pbaronia@quicinc.com>
Cc: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 include/linux/kthread.h | 1 -
 kernel/kthread.c        | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/linux/kthread.h b/include/linux/kthread.h
index f1f95a71a4bc..2c30ade43bc8 100644
--- a/include/linux/kthread.h
+++ b/include/linux/kthread.h
@@ -88,7 +88,6 @@ void kthread_bind_mask(struct task_struct *k, const struct cpumask *mask);
 int kthread_stop(struct task_struct *k);
 bool kthread_should_stop(void);
 bool kthread_should_park(void);
-bool __kthread_should_park(struct task_struct *k);
 bool kthread_should_stop_or_park(void);
 bool kthread_freezable_should_stop(bool *was_frozen);
 void *kthread_func(struct task_struct *k);
diff --git a/kernel/kthread.c b/kernel/kthread.c
index 4fff7df17a68..1eea53050bab 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -159,11 +159,10 @@ bool kthread_should_stop(void)
 }
 EXPORT_SYMBOL(kthread_should_stop);
 
-bool __kthread_should_park(struct task_struct *k)
+static bool __kthread_should_park(struct task_struct *k)
 {
 	return test_bit(KTHREAD_SHOULD_PARK, &to_kthread(k)->flags);
 }
-EXPORT_SYMBOL_GPL(__kthread_should_park);
 
 /**
  * kthread_should_park - should this kthread park now?
-- 
2.41.0


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

* Re: [PATCH] kthread: unexport __kthread_should_park()
  2023-08-04  6:41 [PATCH] kthread: unexport __kthread_should_park() Greg Kroah-Hartman
@ 2023-08-04  8:39 ` Kees Cook
  0 siblings, 0 replies; 2+ messages in thread
From: Kees Cook @ 2023-08-04  8:39 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, John Stultz, Peter Zijlstra (Intel),
	Arve Hjønnevåg, Valentin Schneider, Andrew Morton,
	Christian Brauner (Microsoft), Mike Christie, Nicholas Piggin,
	Zqiang, Prathu Baronia, Sami Tolvanen

On Fri, Aug 04, 2023 at 08:41:51AM +0200, Greg Kroah-Hartman wrote:
> There are no in-kernel users of __kthread_should_park() so mark it as
> static and do not export it.
> 
> Cc: John Stultz <jstultz@google.com>
> Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
> Cc: "Arve Hjønnevåg" <arve@android.com>
> Cc: Valentin Schneider <vschneid@redhat.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: "Christian Brauner (Microsoft)" <brauner@kernel.org>
> Cc: Mike Christie <michael.christie@oracle.com>
> Cc: Kees Cook <keescook@chromium.org>
> Cc: Nicholas Piggin <npiggin@gmail.com>
> Cc: Zqiang <qiang1.zhang@intel.com>
> Cc: Prathu Baronia <quic_pbaronia@quicinc.com>
> Cc: Sami Tolvanen <samitolvanen@google.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Yeah. Seems like it got an EXPORT because it was duplicating the
neighboring functions?

Reviewed-by: Kees Cook <keescook@chromium.org>

-- 
Kees Cook

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

end of thread, other threads:[~2023-08-04  8:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-04  6:41 [PATCH] kthread: unexport __kthread_should_park() Greg Kroah-Hartman
2023-08-04  8:39 ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox