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-next>] [day] [month] [year] [list]
Date:	Thu, 15 Nov 2007 14:50:22 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Tilman Schmidt <tilman@...p.cc>
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)

On Tue, 13 Nov 2007 18:30:30 +0100 (CET)
Tilman Schmidt <tilman@...p.cc> wrote:

> From: Tilman Schmidt <tilman@...p.cc>
> 
> This patch adds basic suspend/resume support to the bas_gigaset ISDN
> driver for the Siemens Gigaset SX255 series of ISDN DECT bases.
> 
> Only the USB aspects are handled so far; the ISDN subsystem is not
> notified  in any way, for lack of information about how to do that.
> The driver will refuse to suspend if a connection is active.
> 
> ...
>
> +	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.
-
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