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: <20130619161456.GC9176@redhat.com>
Date:	Wed, 19 Jun 2013 18:14:56 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Andrew Morton <akpm@...ux-foundation.org>,
	Samuel Ortiz <samuel@...tiz.org>
Cc:	Daniel Vetter <daniel.vetter@...ll.ch>,
	Dave Jones <davej@...hat.com>,
	David Howells <dhowells@...hat.com>,
	Imre Deak <imre.deak@...el.com>, Jens Axboe <axboe@...nel.dk>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Lukas Czerner <lczerner@...hat.com>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Tejun Heo <tj@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] wait: introduce wait_event_common(wq, condition,
	state, timeout)

On 06/18, Andrew Morton wrote:
>
> On Thu, 6 Jun 2013 22:03:16 +0200 Oleg Nesterov <oleg@...hat.com> wrote:
> > -#define __wait_event_interruptible(wq, condition, ret)
> > +#define __wait_event_interruptible(wq, condition)
>
> net/irda/af_irda.c:2568:13: error: macro "__wait_event_interruptible" passed 3 arguments, but takes just 2

Aaah. Thanks.

> waddup with that?

Will read "man grep" again.

> __wait_event_interruptible() has several callsites.  I think I'll go
> zap and await v2 ;)

Yes, will do, thanks.

And note that one of the reasons for this patch was to make
wait_event_interruptible() and __wait_event_interruptible()
interchangeable, like wait_event() and __wait_event().
irda_getsockopt() uses __wait* exactly because it has already
checked the condition.



Samuel, will you agree with the patch below?

Yes, this adds the unnecessary check. We will remove it later,
after we change wait_event* macros, just

	- err = wait_event_interruptible(...);
	+ err = __wait_event_interruptible(...);

Otherwise, this patch should also change af_irda.c (and probably
other callers), not good.

Oleg.

--- x/net/irda/af_irda.c
+++ x/net/irda/af_irda.c
@@ -2563,9 +2563,8 @@ bed:
 				  jiffies + msecs_to_jiffies(val));
 
 			/* Wait for IR-LMP to call us back */
-			__wait_event_interruptible(self->query_wait,
-			      (self->cachedaddr != 0 || self->errno == -ETIME),
-						   err);
+			err = wait_event_interruptible(self->query_wait,
+			      (self->cachedaddr != 0 || self->errno == -ETIME));
 
 			/* If watchdog is still activated, kill it! */
 			del_timer(&(self->watchdog));

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