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] [thread-next>] [day] [month] [year] [list]
Message-ID: <7eb6a4d80910251256w4ad8a77dg5a24618657b77a58@mail.gmail.com>
Date:	Sun, 25 Oct 2009 20:56:36 +0100
From:	Bart Hartgers <bart.hartgers@...il.com>
To:	Oliver Neukum <oliver@...kum.org>
Cc:	Greg Kroah-Hartman <gregkh@...e.de>, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/7] ark3116: (3rd try) Replace cmget

2009/10/25 Oliver Neukum <oliver@...kum.org>:
> Am Sonntag, 25. Oktober 2009 18:51:00 schrieb bart.hartgers@...il.com:
>> +       /* read modem status */
>> +       unsigned status = atomic_read(&priv->msr);
>> +       /* modem control is output */
>> +       unsigned ctrl = atomic_read(&priv->mcr);
>
> What is the sense of having two atomic variables?
> You can get races where one is changed but the other is not.
>
>        Regards
>                Oliver
>
>

Hi Oliver,

I don't think so. The two values are not really related.

These are two separate things: mcr (modem control reg) is ultimately
changed by whatever has the serial port open, msr (modem status
register) represents the status of the handshaking lines, and is
changed (via the interrupt urb callback) by hardware.

Groeten,
Bart

-- 
Bart Hartgers - New e-mail: bart.hartgers@...il.com
--
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