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: <473CDB91.8010808@imap.cc>
Date:	Fri, 16 Nov 2007 00:51:45 +0100
From:	Tilman Schmidt <tilman@...p.cc>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	linux-kernel@...r.kernel.org, gregkh@...e.de,
	linux-usb-devel@...ts.sourceforge.net, hjlipp@....de,
	kkeil@...e.de, i4ldeveloper@...tserv.isdn4linux.de
Subject: Re: [PATCH 3/4] bas_gigaset: suspend support (v2)

Am 15.11.2007 23:50 schrieb Andrew Morton:
>> ...
>>
>> +	if (atomic_read(&cs->hw.bas->basstate) & BS_SUSPEND) {
> 
> that's pretty peculiar.  We'd only expect to see atomics being used in
> conjunction with atomic_add/sub/inc/etc.  Here the driver is using an
> atomic_t as a state variable.  And here's the magic bit:
> 
> 	spin_lock_irqsave(&ucs->lock, flags);
> 	state = atomic_read(&ucs->basstate);
> 	atomic_set(&ucs->basstate, (state & ~clear) | set);
> 	spin_unlock_irqrestore(&ucs->lock, flags);
> 
> I'm suspecting that a plain old `int' would be more appropriate here.

You're right. That's a prehistoric leftover. That variable was
originally accessed using atomic_set_mask() and atomic_clear_mask()
which are unfortunately x86 platform specific.

I'll prepare a cleanup patch.

Thanks,
Tilman

-- 
Tilman Schmidt                          E-Mail: tilman@...p.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)


Download attachment "signature.asc" of type "application/pgp-signature" (254 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ