All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] platform/x86/intel/ifs: Add missing destroy_work_on_stack()
@ 2024-11-05 12:07 Yuan Can
  2024-11-05 16:04 ` Ilpo Järvinen
  2024-11-05 20:31 ` Joseph, Jithu
  0 siblings, 2 replies; 3+ messages in thread
From: Yuan Can @ 2024-11-05 12:07 UTC (permalink / raw)
  To: jithu.joseph, ashok.raj.linux, tony.luck, hdegoede, ilpo.jarvinen,
	darcari, platform-driver-x86
  Cc: yuancan

This commit add missed destroy_work_on_stack() operations for
local_work.w in scan_chunks_sanity_check().

Fixes: 3279decb2c3c ("platform/x86/intel/ifs: Annotate work queue on stack so object debug does not complain")
Signed-off-by: Yuan Can <yuancan@huawei.com>
---
 drivers/platform/x86/intel/ifs/load.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/platform/x86/intel/ifs/load.c b/drivers/platform/x86/intel/ifs/load.c
index de54bd1a5970..2faeb1ffbd92 100644
--- a/drivers/platform/x86/intel/ifs/load.c
+++ b/drivers/platform/x86/intel/ifs/load.c
@@ -347,6 +347,7 @@ static int scan_chunks_sanity_check(struct device *dev)
 		INIT_WORK_ONSTACK(&local_work.w, copy_hashes_authenticate_chunks);
 		schedule_work_on(cpu, &local_work.w);
 		wait_for_completion(&ifs_done);
+		destroy_work_on_stack(&local_work.w);
 		if (ifsd->loading_error) {
 			ret = -EIO;
 			goto out;
-- 
2.17.1


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

* Re: [PATCH] platform/x86/intel/ifs: Add missing destroy_work_on_stack()
  2024-11-05 12:07 [PATCH] platform/x86/intel/ifs: Add missing destroy_work_on_stack() Yuan Can
@ 2024-11-05 16:04 ` Ilpo Järvinen
  2024-11-05 20:31 ` Joseph, Jithu
  1 sibling, 0 replies; 3+ messages in thread
From: Ilpo Järvinen @ 2024-11-05 16:04 UTC (permalink / raw)
  To: Yuan Can
  Cc: jithu.joseph, ashok.raj.linux, tony.luck, Hans de Goede, darcari,
	platform-driver-x86

On Tue, 5 Nov 2024, Yuan Can wrote:

> This commit add missed destroy_work_on_stack() operations for
> local_work.w in scan_chunks_sanity_check().

The commit 3279decb2c3c ("platform/x86/intel/ifs: Annotate work queue on 
stack so object debug does not complain") missed calling 
destroy_work_on_stack() for ...

-- 
 i.

> Fixes: 3279decb2c3c ("platform/x86/intel/ifs: Annotate work queue on stack so object debug does not complain")
> Signed-off-by: Yuan Can <yuancan@huawei.com>
> ---
>  drivers/platform/x86/intel/ifs/load.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/platform/x86/intel/ifs/load.c b/drivers/platform/x86/intel/ifs/load.c
> index de54bd1a5970..2faeb1ffbd92 100644
> --- a/drivers/platform/x86/intel/ifs/load.c
> +++ b/drivers/platform/x86/intel/ifs/load.c
> @@ -347,6 +347,7 @@ static int scan_chunks_sanity_check(struct device *dev)
>  		INIT_WORK_ONSTACK(&local_work.w, copy_hashes_authenticate_chunks);
>  		schedule_work_on(cpu, &local_work.w);
>  		wait_for_completion(&ifs_done);
> +		destroy_work_on_stack(&local_work.w);
>  		if (ifsd->loading_error) {
>  			ret = -EIO;
>  			goto out;
> 

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

* Re: [PATCH] platform/x86/intel/ifs: Add missing destroy_work_on_stack()
  2024-11-05 12:07 [PATCH] platform/x86/intel/ifs: Add missing destroy_work_on_stack() Yuan Can
  2024-11-05 16:04 ` Ilpo Järvinen
@ 2024-11-05 20:31 ` Joseph, Jithu
  1 sibling, 0 replies; 3+ messages in thread
From: Joseph, Jithu @ 2024-11-05 20:31 UTC (permalink / raw)
  To: Yuan Can
  Cc: ashok.raj.linux, tony.luck, hdegoede, ilpo.jarvinen, darcari,
	platform-driver-x86



On 11/5/2024 4:07 AM, Yuan Can wrote:
> This commit add missed destroy_work_on_stack() operations for
> local_work.w in scan_chunks_sanity_check().
> 

If you were seeing any specific warnings, might be helpful to mention that too in the commit

> Fixes: 3279decb2c3c ("platform/x86/intel/ifs: Annotate work queue on stack so object debug does not complain")
> Signed-off-by: Yuan Can <yuancan@huawei.com>
> ---
>  drivers/platform/x86/intel/ifs/load.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/platform/x86/intel/ifs/load.c b/drivers/platform/x86/intel/ifs/load.c
> index de54bd1a5970..2faeb1ffbd92 100644
> --- a/drivers/platform/x86/intel/ifs/load.c
> +++ b/drivers/platform/x86/intel/ifs/load.c
> @@ -347,6 +347,7 @@ static int scan_chunks_sanity_check(struct device *dev)
>  		INIT_WORK_ONSTACK(&local_work.w, copy_hashes_authenticate_chunks);
>  		schedule_work_on(cpu, &local_work.w);
>  		wait_for_completion(&ifs_done);
> +		destroy_work_on_stack(&local_work.w);
>  		if (ifsd->loading_error) {
>  			ret = -EIO;
>  			goto out;

The change looks good to me. 
(I see other users of INIT_WORK_ONSTACK having a corresponding destroy_xxx())

Reviewed-by: Jithu Joseph <jithu.joseph@intel.com>


Thanks
Jithu


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

end of thread, other threads:[~2024-11-05 20:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-05 12:07 [PATCH] platform/x86/intel/ifs: Add missing destroy_work_on_stack() Yuan Can
2024-11-05 16:04 ` Ilpo Järvinen
2024-11-05 20:31 ` Joseph, Jithu

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.