lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<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

Powered by Openwall GNU/*/Linux Powered by OpenVZ