public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Add lock to avoid race when ringing channel DB
@ 2023-09-13  8:47 Qiang Yu
  2023-09-13  8:47 ` [PATCH v2 1/2] bus: mhi: host: Add spinlock to protect WP access when queueing TREs Qiang Yu
  2023-09-13  8:47 ` [PATCH v2 2/2] bus: mhi: host: Take irqsave lock after TRE is generated Qiang Yu
  0 siblings, 2 replies; 16+ messages in thread
From: Qiang Yu @ 2023-09-13  8:47 UTC (permalink / raw)
  To: mani, quic_jhugo
  Cc: mhi, linux-arm-msm, linux-kernel, quic_cang, quic_mrana, Qiang Yu

1. We need a write lock in mhi_gen_tre otherwise there is race of the WP
used for ringing channel DB between mhi_queue and M0 transition.
2. We can not invoke local_bh_enable() when irqs are disabled, so move
read_lock_irqsave() under the mhi_gen_tre() since we add write_lock_bh() in
mhi_gen_tre().

v1 -> v2:
Added write_unlock_bh(&mhi_chan->lock) in mhi_gen_tre() before return
because of error process.

Bhaumik Bhatt (1):
  bus: mhi: host: Add spinlock to protect WP access when queueing TREs

Hemant Kumar (1):
  bus: mhi: host: Take irqsave lock after TRE is generated

 drivers/bus/mhi/host/main.c | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

-- 
2.7.4


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

end of thread, other threads:[~2023-11-07  8:00 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-13  8:47 [PATCH v2 0/2] Add lock to avoid race when ringing channel DB Qiang Yu
2023-09-13  8:47 ` [PATCH v2 1/2] bus: mhi: host: Add spinlock to protect WP access when queueing TREs Qiang Yu
2023-09-22 14:44   ` Jeffrey Hugo
2023-09-25  3:10     ` Qiang Yu
2023-09-29 15:22       ` Jeffrey Hugo
2023-10-16  8:46         ` Qiang Yu
2023-10-20 15:07           ` Jeffrey Hugo
2023-11-06  4:51             ` Manivannan Sadhasivam
2023-11-07  7:59               ` Qiang Yu
2023-11-06  4:41   ` Manivannan Sadhasivam
2023-11-07  7:19     ` Qiang Yu
2023-09-13  8:47 ` [PATCH v2 2/2] bus: mhi: host: Take irqsave lock after TRE is generated Qiang Yu
2023-09-22 14:50   ` Jeffrey Hugo
2023-09-25  4:08     ` Qiang Yu
2023-09-29 15:25       ` Jeffrey Hugo
2023-10-16  8:49         ` Qiang Yu

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