[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZJlwjhQT2wfO3Ukn@smile.fi.intel.com>
Date: Mon, 26 Jun 2023 14:03:42 +0300
From: "andy@...nel.org" <andy@...nel.org>
To: YE Chengfeng <cyeaa@...nect.ust.hk>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/2] gpiolib: cdev: Fix &lr->wait.lock deadlock issue
On Mon, Jun 26, 2023 at 10:39:56AM +0000, YE Chengfeng wrote:
> linereq_put_event is called from both interrupt context (e.g.,
When we refer to the functions we use func() format.
This applies to the entire commit message and to the other
patch in the series.
> edge_irq_thread) and process context (process_hw_ts_thread).
> Therefore, interrupt should be disabled before acquiring lock
> &lr->wait.lock inside linereq_put_event to avoid deadlock when
> the lock is held in process context and edge_irq_thread comes.
>
> Similarly, linereq_read_unlocked running in process context
> also acquies the same lock. It also need to disable interrupt
> otherwise deadlock could happen if the irq edge_irq_thread
> comes to execution while the lock is held.
>
> Fix the two potential deadlock issues by spin_lock_bh() and
> spin_lock_irq() separately.
...
So, I suggest to fix the commit messages and send a v2 as a real series
(--thread implied).
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists