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: <472EFD76.7000001@gmail.com>
Date:	Mon, 05 Nov 2007 12:24:38 +0100
From:	Jiri Slaby <jirislaby@...il.com>
To:	Jesper Nilsson <jesper.nilsson@...s.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	Mikael Starvik <mikael.starvik@...s.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] CRISv10 serial driver rewrite

On 11/05/2007 12:18 PM, Jesper Nilsson wrote:
> On Fri, Nov 02, 2007 at 11:39:09AM +0100, Jiri Slaby wrote:
>> On 11/02/2007 10:34 AM, Jesper Nilsson wrote:
>>> @@ -4434,7 +3941,7 @@ block_til_ready(struct tty_struct *tty, struct file * filp,
>>>  	if (tty_hung_up_p(filp) ||
>>>  	    (info->flags & ASYNC_CLOSING)) {
>>>  		if (info->flags & ASYNC_CLOSING)
>>> -			interruptible_sleep_on(&info->close_wait);
>>> +			wait_event_interruptible(info->close_wait, 0);
>> Aiee, this is nonsense, 0 will never be 1, only signal will stop this, use
>> completion instead.
> 
> True, I've changed it to use "!info->flags & ASYNC_CLOSING" condition
> for now, as this is a more non-intrusive patch.
> I will look at using completion later, at the same time as using

Aha, then the completion is a bad idea. Just
wait_event_interruptible(info->close_wait, !(info->flags & ASYNC_CLOSING));
as you proposed to use is fine (and you don't need the "if (info->flags &
ASYNC_CLOSING)" test one line above).

regards,
-- 
Jiri Slaby (jirislaby@...il.com)
Faculty of Informatics, Masaryk University
-
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