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]
Date:	Thu, 23 Apr 2015 11:11:02 -0600
From:	Jens Axboe <axboe@...nel.dk>
To:	Davidlohr Bueso <dave@...olabs.net>
CC:	Mike Miller <mike.miller@...com>, Don Brace <don.brace@...s.com>,
	iss_storagedev@...com, storagedev@...s.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cciss: Optimize scan_thread

On 04/23/2015 11:06 AM, Davidlohr Bueso wrote:
> On Thu, 2015-04-23 at 10:51 -0600, Jens Axboe wrote:
>> Not that it's wrong, but this is mostly some unneeded optimizations.
>> It's not like this is in a hot path.
>
> Most definitely small optimizations, I just happened to run into
> auditing schedule calls. Still no harm in applying.

Are you sure? What happens if scan_thread() races with pci removal? The 
list was non-empty, enter the loop. PCI removal removes the device from 
the scan list. Now we grab the lock in scan_thread(), and 
unconditionally attempt to remove an entry from scan_q. Maybe something 
protects us from this, maybe it doesn't.

So IOW, I don't like your lock optimization, it's a bad idea. The 
__set_current_state() change is definitely fine, though.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ