Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] soc: xilinx: Fix for call trace due to the usage of smp_processor_id()
@ 2024-02-01 12:20 Dan Carpenter
  2024-02-27  9:55 ` Buddhabhatti, Jay
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Carpenter @ 2024-02-01 12:20 UTC (permalink / raw)
  To: haribabu.gattem; +Cc: Jay Buddhabhatti, Michal Simek, linux-arm-kernel

Hello HariBabu Gattem,

The patch daed80ed0758: "soc: xilinx: Fix for call trace due to the
usage of smp_processor_id()" from Oct 26, 2023 (linux-next), leads to
the following Smatch static checker warning:

	kernel/irq/manage.c:2614 __request_percpu_irq()
	warn: sleeping in atomic context

drivers/soc/xilinx/xlnx_event_manager.c
   610          cpu = get_cpu();
                ^^^^^^^^^^^^^^^
The patch adds get_cpu() which disables preemption.

   611          per_cpu(cpu_number1, cpu) = cpu;
   612          ret = request_percpu_irq(virq_sgi, xlnx_event_handler, "xlnx_event_mgmt",
                      ^^^^^^^^^^^^^^^^^^
request_percpu_irq() does a sleeping allocation so it's a sleeping in
atomic bug.

   613                                   &cpu_number1);
   614          put_cpu();

regards,
dan carpenter

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2024-03-01 11:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-01 12:20 [bug report] soc: xilinx: Fix for call trace due to the usage of smp_processor_id() Dan Carpenter
2024-02-27  9:55 ` Buddhabhatti, Jay
2024-02-27 10:10   ` Jain, Ronak
2024-02-27 11:36     ` Dan Carpenter
2024-02-29  8:39       ` Jain, Ronak
2024-03-01  7:53         ` Dan Carpenter
2024-03-01 11:44           ` Jain, Ronak

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