]> git.baikalelectronics.ru Git - kernel.git/commit
bus: fsl-mc-msi: Fix MSI descriptor mutex lock for msi_first_desc()
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Tue, 12 Apr 2022 07:56:36 +0000 (16:56 +0900)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 27 Apr 2022 17:42:32 +0000 (19:42 +0200)
commit4681b3254c9a7bdcba9db082fa942bae03ce49f7
tree14647ec9a5c8e047d8aeb8a4cccc7074412269c4
parent7c464de09a7344a2cfcff7733684bbcf4ce79cc5
bus: fsl-mc-msi: Fix MSI descriptor mutex lock for msi_first_desc()

Commit a026be8dbacf introduced a call to the helper function
msi_first_desc(), which needs MSI descriptor mutex lock before
call. However, the required mutex lock was not added. This results in
lockdep assertion:

 WARNING: CPU: 4 PID: 119 at kernel/irq/msi.c:274 msi_first_desc+0xd0/0x10c
  msi_first_desc+0xd0/0x10c
  fsl_mc_msi_domain_alloc_irqs+0x7c/0xc0
  fsl_mc_populate_irq_pool+0x80/0x3cc

Fix this by adding the mutex lock and unlock around the function call.

Fixes: a026be8dbacf ("bus: fsl-mc-msi: Simplify MSI descriptor handling")
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20220412075636.755454-1-shinichiro.kawasaki@wdc.com
drivers/bus/fsl-mc/fsl-mc-msi.c