diff mbox series

[PATCHv2,1/2] kernel/workqueue: Make schedule_on_each_cpu as EXPORT_SYMBOL_GPL

Message ID 5afc2a0c4da65e71ccf24fe65396710d34fc662e.1629751104.git.riteshh@linux.ibm.com (mailing list archive)
State New
Headers show
Series [PATCHv2,1/2] kernel/workqueue: Make schedule_on_each_cpu as EXPORT_SYMBOL_GPL | expand

Commit Message

Ritesh Harjani Aug. 23, 2021, 8:42 p.m. UTC
Make schedule_on_each_cpu as EXPORT_SYMBOL_GPL

Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com>
---
[v1 -> v2]: Use EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL

 kernel/workqueue.c | 1 +
 1 file changed, 1 insertion(+)

--
2.31.1

Comments

Dennis Zhou Aug. 24, 2021, 2:06 a.m. UTC | #1
Hello,

On Tue, Aug 24, 2021 at 02:12:29AM +0530, Ritesh Harjani wrote:
> Make schedule_on_each_cpu as EXPORT_SYMBOL_GPL
> 
> Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com>
> ---
> [v1 -> v2]: Use EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL
> 
>  kernel/workqueue.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
> index f148eacda55a..993f8983186d 100644
> --- a/kernel/workqueue.c
> +++ b/kernel/workqueue.c
> @@ -3309,6 +3309,7 @@ int schedule_on_each_cpu(work_func_t func)
>  	free_percpu(works);
>  	return 0;
>  }
> +EXPORT_SYMBOL_GPL(schedule_on_each_cpu);
> 
>  /**
>   * execute_in_process_context - reliably execute the routine with user context
> --
> 2.31.1
> 

I think you missed the point of Christoph's comment. I agree with him
and don't think a test justifies exporting of this particular function.

Thanks,
Dennis
Ritesh Harjani Aug. 24, 2021, 4:24 a.m. UTC | #2
On 21/08/23 10:06PM, Dennis Zhou wrote:
> Hello,
>
> On Tue, Aug 24, 2021 at 02:12:29AM +0530, Ritesh Harjani wrote:
> > Make schedule_on_each_cpu as EXPORT_SYMBOL_GPL
> >
> > Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com>
> > ---
> > [v1 -> v2]: Use EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL
> >
> >  kernel/workqueue.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/kernel/workqueue.c b/kernel/workqueue.c
> > index f148eacda55a..993f8983186d 100644
> > --- a/kernel/workqueue.c
> > +++ b/kernel/workqueue.c
> > @@ -3309,6 +3309,7 @@ int schedule_on_each_cpu(work_func_t func)
> >  	free_percpu(works);
> >  	return 0;
> >  }
> > +EXPORT_SYMBOL_GPL(schedule_on_each_cpu);
> >
> >  /**
> >   * execute_in_process_context - reliably execute the routine with user context
> > --
> > 2.31.1
> >
>
> I think you missed the point of Christoph's comment. I agree with him
> and don't think a test justifies exporting of this particular function.

Got it. Based on the comments from 2nd patch, if in case this will be required
I can open code this. (I initially had this open coded, but then I found this).

-ritesh

>
> Thanks,
> Dennis
>
Vlastimil Babka Aug. 24, 2021, 11:12 a.m. UTC | #3
On 8/24/21 04:06, Dennis Zhou wrote:
> Hello,
> 
> On Tue, Aug 24, 2021 at 02:12:29AM +0530, Ritesh Harjani wrote:
>> Make schedule_on_each_cpu as EXPORT_SYMBOL_GPL
>> 
>> Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com>
>> ---
>> [v1 -> v2]: Use EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL
>> 
>>  kernel/workqueue.c | 1 +
>>  1 file changed, 1 insertion(+)
>> 
>> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
>> index f148eacda55a..993f8983186d 100644
>> --- a/kernel/workqueue.c
>> +++ b/kernel/workqueue.c
>> @@ -3309,6 +3309,7 @@ int schedule_on_each_cpu(work_func_t func)
>>  	free_percpu(works);
>>  	return 0;
>>  }
>> +EXPORT_SYMBOL_GPL(schedule_on_each_cpu);
>> 
>>  /**
>>   * execute_in_process_context - reliably execute the routine with user context
>> --
>> 2.31.1
>> 
> 
> I think you missed the point of Christoph's comment. I agree with him
> and don't think a test justifies exporting of this particular function.

Could symbol namespaces help in these cases? It feels wrong to limit in-tree
test modules this way.
https://www.kernel.org/doc/html/latest/core-api/symbol-namespaces.html

> Thanks,
> Dennis
>
diff mbox series

Patch

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index f148eacda55a..993f8983186d 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -3309,6 +3309,7 @@  int schedule_on_each_cpu(work_func_t func)
 	free_percpu(works);
 	return 0;
 }
+EXPORT_SYMBOL_GPL(schedule_on_each_cpu);

 /**
  * execute_in_process_context - reliably execute the routine with user context