[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3805400b-bf91-468a-8dac-4699b41cd5f6@kernel.org>
Date: Tue, 30 Sep 2025 06:01:35 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Hugo Villeneuve <hugo@...ovil.com>
Cc: gregkh@...uxfoundation.org, fvallee@...rea.fr,
linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
Hugo Villeneuve <hvilleneuve@...onoff.com>
Subject: Re: [PATCH 05/15] serial: sc16is7xx: use guards for simple mutex
locks
On 30. 09. 25, 2:27, Hugo Villeneuve wrote:
>>> @@ -943,9 +937,8 @@ static void sc16is7xx_ms_proc(struct kthread_work *ws)
>>> struct sc16is7xx_port *s = dev_get_drvdata(one->port.dev);
>>>
>>> if (one->port.state) {
>>> - mutex_lock(&one->lock);
>>> + guard(mutex)(&one->lock);
>>> sc16is7xx_update_mlines(one);
>>> - mutex_unlock(&one->lock);
>>>
>>> kthread_queue_delayed_work(&s->kworker, &one->ms_work, HZ);
>>
>> Now the lock is held till here. R U sure it is OK?
>
> Now that you mention it, I am sure its not OK :)
>
> I will restore this one to the original lock/unlock code in V2.
Or use a scoped lock ;).
--
js
suse labs
Powered by blists - more mailing lists