public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] platform/chrome: cros_ec: Fix panic notifier registration
       [not found] <CGME20230110221051eucas1p26888130e7de454995a00918456c99bdb@eucas1p2.samsung.com>
@ 2023-01-10 22:10 ` Marek Szyprowski
  2023-01-11  3:30   ` patchwork-bot+chrome-platform
  2023-01-13 21:20   ` patchwork-bot+chrome-platform
  0 siblings, 2 replies; 3+ messages in thread
From: Marek Szyprowski @ 2023-01-10 22:10 UTC (permalink / raw)
  To: chrome-platform, linux-kernel
  Cc: Marek Szyprowski, Benson Leung, Guenter Roeck, Tzung-Bi Shih,
	Prashant Malani, Rob Barnes, dtor

Initialize panic notifier to avoid the following lockdep warning:

--->8---
INFO: trying to register non-static key.
The code is fine but needs lockdep annotation, or maybe
you didn't initialize this object before use?
turning off the locking correctness validator.
CPU: 0 PID: 62 Comm: kworker/u16:1 Not tainted 6.2.0-rc3-next-20230110-00037-g7c2b0426386a #6112
Hardware name: Samsung Exynos (Flattened Device Tree)
Workqueue: events_unbound async_run_entry_fn
 unwind_backtrace from show_stack+0x10/0x14
 show_stack from dump_stack_lvl+0x58/0x70
 dump_stack_lvl from register_lock_class+0x998/0x9a8
 register_lock_class from __lock_acquire+0x6c/0x2a80
 __lock_acquire from lock_acquire+0x124/0x3f0
 lock_acquire from down_write+0x40/0xd8
 down_write from blocking_notifier_chain_register+0x28/0x58
 blocking_notifier_chain_register from cros_ec_debugfs_probe+0x324/0x3b4
 cros_ec_debugfs_probe from platform_probe+0x5c/0xb8
 platform_probe from really_probe+0xe0/0x414
 really_probe from __driver_probe_device+0x9c/0x200
 __driver_probe_device from driver_probe_device+0x30/0xc0
 driver_probe_device from __device_attach_driver+0xa8/0x120
 __device_attach_driver from bus_for_each_drv+0x7c/0xc0
 bus_for_each_drv from __device_attach_async_helper+0xa0/0xf4
 __device_attach_async_helper from async_run_entry_fn+0x40/0x154
 async_run_entry_fn from process_one_work+0x288/0x790
 process_one_work from worker_thread+0x44/0x504
 worker_thread from kthread+0xf0/0x124
 kthread from ret_from_fork+0x14/0x2c
Exception stack(0xf0a6dfb0 to 0xf0a6dff8)
...
------------[ cut here ]------------

Fixes: d90fa2c64d59 ("platform/chrome: cros_ec: Poll EC log on EC panic")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/platform/chrome/cros_ec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/platform/chrome/cros_ec.c b/drivers/platform/chrome/cros_ec.c
index ec733f683f34..c4345dafec57 100644
--- a/drivers/platform/chrome/cros_ec.c
+++ b/drivers/platform/chrome/cros_ec.c
@@ -182,6 +182,7 @@ int cros_ec_register(struct cros_ec_device *ec_dev)
 	int err = 0;
 
 	BLOCKING_INIT_NOTIFIER_HEAD(&ec_dev->event_notifier);
+	BLOCKING_INIT_NOTIFIER_HEAD(&ec_dev->panic_notifier);
 
 	ec_dev->max_request = sizeof(struct ec_params_hello);
 	ec_dev->max_response = sizeof(struct ec_response_get_protocol_info);
-- 
2.39.0


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

* Re: [PATCH] platform/chrome: cros_ec: Fix panic notifier registration
  2023-01-10 22:10 ` [PATCH] platform/chrome: cros_ec: Fix panic notifier registration Marek Szyprowski
@ 2023-01-11  3:30   ` patchwork-bot+chrome-platform
  2023-01-13 21:20   ` patchwork-bot+chrome-platform
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+chrome-platform @ 2023-01-11  3:30 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: chrome-platform, linux-kernel, bleung, groeck, tzungbi, pmalani,
	robbarnes, dtor

Hello:

This patch was applied to chrome-platform/linux.git (for-kernelci)
by Tzung-Bi Shih <tzungbi@kernel.org>:

On Tue, 10 Jan 2023 23:10:33 +0100 you wrote:
> Initialize panic notifier to avoid the following lockdep warning:
> 
> --->8---
> INFO: trying to register non-static key.
> The code is fine but needs lockdep annotation, or maybe
> you didn't initialize this object before use?
> turning off the locking correctness validator.
> CPU: 0 PID: 62 Comm: kworker/u16:1 Not tainted 6.2.0-rc3-next-20230110-00037-g7c2b0426386a #6112
> Hardware name: Samsung Exynos (Flattened Device Tree)
> Workqueue: events_unbound async_run_entry_fn
>  unwind_backtrace from show_stack+0x10/0x14
>  show_stack from dump_stack_lvl+0x58/0x70
>  dump_stack_lvl from register_lock_class+0x998/0x9a8
>  register_lock_class from __lock_acquire+0x6c/0x2a80
>  __lock_acquire from lock_acquire+0x124/0x3f0
>  lock_acquire from down_write+0x40/0xd8
>  down_write from blocking_notifier_chain_register+0x28/0x58
>  blocking_notifier_chain_register from cros_ec_debugfs_probe+0x324/0x3b4
>  cros_ec_debugfs_probe from platform_probe+0x5c/0xb8
>  platform_probe from really_probe+0xe0/0x414
>  really_probe from __driver_probe_device+0x9c/0x200
>  __driver_probe_device from driver_probe_device+0x30/0xc0
>  driver_probe_device from __device_attach_driver+0xa8/0x120
>  __device_attach_driver from bus_for_each_drv+0x7c/0xc0
>  bus_for_each_drv from __device_attach_async_helper+0xa0/0xf4
>  __device_attach_async_helper from async_run_entry_fn+0x40/0x154
>  async_run_entry_fn from process_one_work+0x288/0x790
>  process_one_work from worker_thread+0x44/0x504
>  worker_thread from kthread+0xf0/0x124
>  kthread from ret_from_fork+0x14/0x2c
> Exception stack(0xf0a6dfb0 to 0xf0a6dff8)
> ...
> 
> [...]

Here is the summary with links:
  - platform/chrome: cros_ec: Fix panic notifier registration
    https://git.kernel.org/chrome-platform/c/9e69b1b27b13

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

* Re: [PATCH] platform/chrome: cros_ec: Fix panic notifier registration
  2023-01-10 22:10 ` [PATCH] platform/chrome: cros_ec: Fix panic notifier registration Marek Szyprowski
  2023-01-11  3:30   ` patchwork-bot+chrome-platform
@ 2023-01-13 21:20   ` patchwork-bot+chrome-platform
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+chrome-platform @ 2023-01-13 21:20 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: chrome-platform, linux-kernel, bleung, groeck, tzungbi, pmalani,
	robbarnes, dtor

Hello:

This patch was applied to chrome-platform/linux.git (for-next)
by Tzung-Bi Shih <tzungbi@kernel.org>:

On Tue, 10 Jan 2023 23:10:33 +0100 you wrote:
> Initialize panic notifier to avoid the following lockdep warning:
> 
> --->8---
> INFO: trying to register non-static key.
> The code is fine but needs lockdep annotation, or maybe
> you didn't initialize this object before use?
> turning off the locking correctness validator.
> CPU: 0 PID: 62 Comm: kworker/u16:1 Not tainted 6.2.0-rc3-next-20230110-00037-g7c2b0426386a #6112
> Hardware name: Samsung Exynos (Flattened Device Tree)
> Workqueue: events_unbound async_run_entry_fn
>  unwind_backtrace from show_stack+0x10/0x14
>  show_stack from dump_stack_lvl+0x58/0x70
>  dump_stack_lvl from register_lock_class+0x998/0x9a8
>  register_lock_class from __lock_acquire+0x6c/0x2a80
>  __lock_acquire from lock_acquire+0x124/0x3f0
>  lock_acquire from down_write+0x40/0xd8
>  down_write from blocking_notifier_chain_register+0x28/0x58
>  blocking_notifier_chain_register from cros_ec_debugfs_probe+0x324/0x3b4
>  cros_ec_debugfs_probe from platform_probe+0x5c/0xb8
>  platform_probe from really_probe+0xe0/0x414
>  really_probe from __driver_probe_device+0x9c/0x200
>  __driver_probe_device from driver_probe_device+0x30/0xc0
>  driver_probe_device from __device_attach_driver+0xa8/0x120
>  __device_attach_driver from bus_for_each_drv+0x7c/0xc0
>  bus_for_each_drv from __device_attach_async_helper+0xa0/0xf4
>  __device_attach_async_helper from async_run_entry_fn+0x40/0x154
>  async_run_entry_fn from process_one_work+0x288/0x790
>  process_one_work from worker_thread+0x44/0x504
>  worker_thread from kthread+0xf0/0x124
>  kthread from ret_from_fork+0x14/0x2c
> Exception stack(0xf0a6dfb0 to 0xf0a6dff8)
> ...
> 
> [...]

Here is the summary with links:
  - platform/chrome: cros_ec: Fix panic notifier registration
    https://git.kernel.org/chrome-platform/c/9e69b1b27b13

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2023-01-13 21:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20230110221051eucas1p26888130e7de454995a00918456c99bdb@eucas1p2.samsung.com>
2023-01-10 22:10 ` [PATCH] platform/chrome: cros_ec: Fix panic notifier registration Marek Szyprowski
2023-01-11  3:30   ` patchwork-bot+chrome-platform
2023-01-13 21:20   ` patchwork-bot+chrome-platform

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