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: <201010261240.47907.arnd@arndb.de>
Date:	Tue, 26 Oct 2010 12:40:47 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Paul Fulghum <paulkf@...rogate.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Greg KH <greg@...ah.com>
Subject: Re: [PATCH] n_hdlc fix read and write locking

On Tuesday 26 October 2010, Paul Fulghum wrote:
> On 10/25/2010 3:31 PM, Arnd Bergmann wrote:
> 
> > Would it be possible to express the same using
> > wait_event_interruptible()?
> 
> Yes if I embed an assignment in the event expression:
> 
> rc = wait_event_interruptible(&wait, (buf = get_buf()));
> if (!rc)
>         process_buf(buf);
> 
> Is that considered acceptable?

I'd do it if it makes the code more readable. We need the patch
for the stable release, so it really should be obvious not to
introduce new bugs. I could not fully understand the version
you posted, so if you can make it easier to understand by using
wait_event, please do so. If you think that putting the
assignment into the macro argument outweighs the advantage from
the wait_event, just keep your version.

	Arnd
--
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