Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: haribabu.gattem@xilinx.com
Cc: Jay Buddhabhatti <jay.buddhabhatti@amd.com>,
	Michal Simek <michal.simek@amd.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [bug report] soc: xilinx: Fix for call trace due to the usage of smp_processor_id()
Date: Thu, 1 Feb 2024 15:20:04 +0300	[thread overview]
Message-ID: <52a41911-7c7d-4164-aeb7-aba5eddfeea9@moroto.mountain> (raw)

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

             reply	other threads:[~2024-02-01 12:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-01 12:20 Dan Carpenter [this message]
2024-02-27  9:55 ` [bug report] soc: xilinx: Fix for call trace due to the usage of smp_processor_id() 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52a41911-7c7d-4164-aeb7-aba5eddfeea9@moroto.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=haribabu.gattem@xilinx.com \
    --cc=jay.buddhabhatti@amd.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=michal.simek@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox