All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]  ww_mutex_lock/interruptible GPL-only exported w/wo CONFIG_DEBUG_LOCK_ALLOC
@ 2022-08-03  6:48 Foglietta, Roberto
  2022-08-03 13:57 ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Foglietta, Roberto @ 2022-08-03  6:48 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 465 bytes --]

Hi all,

 In attachment a patch to fix a symbol exportation mismatch

 ** Rationale **

 When CONFIG_DEBUG_LOCK_ALLOC is defined two symbols are exported as GPL-only otherwise public.

 https://elixir.bootlin.com/linux/v5.10.104/source/kernel/locking/mutex.c#L1191

 https://elixir.bootlin.com/linux/v5.10.104/source/kernel/locking/mutex.c#L1434

 Cheers,
--
Roberto A. Foglietta
GNU/Linux Senior Consultant
+49.176.274.75.661
+39.349.33.30.697


[-- Attachment #2: 0001-ww_mutex_lock-interruptible-GPL-only-exported-w-wo-C.patch --]
[-- Type: application/octet-stream, Size: 1218 bytes --]

From 260c207eaa0dff3c2cb1f19675d48d08fa186459 Mon Sep 17 00:00:00 2001
From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
Date: Wed, 3 Aug 2022 08:19:38 +0200
Subject: [PATCH] ww_mutex_lock/interruptible GPL-only exported w/wo
 CONFIG_DEBUG_LOCK_ALLOC

Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
---
 kernel/locking/mutex.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c
index d973fe6041bf..ae8546e470e5 100644
--- a/kernel/locking/mutex.c
+++ b/kernel/locking/mutex.c
@@ -1106,7 +1106,7 @@ ww_mutex_lock(struct ww_mutex *lock, struct ww_acquire_ctx *ctx)
 
 	return __ww_mutex_lock_slowpath(lock, ctx);
 }
-EXPORT_SYMBOL(ww_mutex_lock);
+EXPORT_SYMBOL_GPL(ww_mutex_lock);
 
 int __sched
 ww_mutex_lock_interruptible(struct ww_mutex *lock, struct ww_acquire_ctx *ctx)
@@ -1121,7 +1121,7 @@ ww_mutex_lock_interruptible(struct ww_mutex *lock, struct ww_acquire_ctx *ctx)
 
 	return __ww_mutex_lock_interruptible_slowpath(lock, ctx);
 }
-EXPORT_SYMBOL(ww_mutex_lock_interruptible);
+EXPORT_SYMBOL_GPL(ww_mutex_lock_interruptible);
 
 #endif /* !CONFIG_DEBUG_LOCK_ALLOC */
 #endif /* !CONFIG_PREEMPT_RT */
-- 
2.25.1


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

* Re: [PATCH]  ww_mutex_lock/interruptible GPL-only exported w/wo CONFIG_DEBUG_LOCK_ALLOC
  2022-08-03  6:48 [PATCH] ww_mutex_lock/interruptible GPL-only exported w/wo CONFIG_DEBUG_LOCK_ALLOC Foglietta, Roberto
@ 2022-08-03 13:57 ` Dan Carpenter
  2022-08-18  8:25   ` Foglietta, Roberto
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2022-08-03 13:57 UTC (permalink / raw)
  To: Foglietta, Roberto; +Cc: kernel-janitors

Hi Roberto,

Those were added in 040a0a371005 ("mutex: Add support for wound/wait
style locks").  There is no documentation, but it's possible it was
done deliberately because when you have debugging enabled that's linux
specific hence the GPL?

I wouldn't encourage you to send this as a first patch...

1) Patches need to be inline (not as attachment)
2) Need a subsystem prefix in the subject.
3) The Rationale needs to be in the commit message.
4) Send the patch to the people from ./scripts/get_maintainer.pl

regards,
dan carpenter


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

* RE: [PATCH]  ww_mutex_lock/interruptible GPL-only exported w/wo CONFIG_DEBUG_LOCK_ALLOC
  2022-08-03 13:57 ` Dan Carpenter
@ 2022-08-18  8:25   ` Foglietta, Roberto
  0 siblings, 0 replies; 3+ messages in thread
From: Foglietta, Roberto @ 2022-08-18  8:25 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: kernel-janitors

> -----Original Message-----
> From: Dan Carpenter <dan.carpenter@oracle.com>
> Sent: Mittwoch, 3. August 2022 15:57
> To: Foglietta, Roberto (ext) (DI FA CTR IPC PRC2)
> <roberto.foglietta.ext@siemens.com>
> Cc: kernel-janitors@vger.kernel.org
> Subject: Re: [PATCH] ww_mutex_lock/interruptible GPL-only exported w/wo
> CONFIG_DEBUG_LOCK_ALLOC
> 
> Hi Roberto,
> 
> Those were added in 040a0a371005 ("mutex: Add support for wound/wait style
> locks").  There is no documentation, but it's possible it was done deliberately
> because when you have debugging enabled that's linux specific hence the GPL?
> 

Thanks Dan, I received your mail. 😊,

Cheers, R-

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

end of thread, other threads:[~2022-08-18  8:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-03  6:48 [PATCH] ww_mutex_lock/interruptible GPL-only exported w/wo CONFIG_DEBUG_LOCK_ALLOC Foglietta, Roberto
2022-08-03 13:57 ` Dan Carpenter
2022-08-18  8:25   ` Foglietta, Roberto

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.