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]
Date:	Thu, 7 Jul 2011 10:42:55 -0600
From:	Jonathan Corbet <corbet@....net>
To:	Hans Verkuil <hverkuil@...all.nl>
Cc:	"linux-kernel" <linux-kernel@...r.kernel.org>,
	"linux-media" <linux-media@...r.kernel.org>,
	linux-fsdevel@...r.kernel.org, viro@...iv.linux.org.uk
Subject: Re: [RFC PATCH] poll: add poll_requested_events() function

On Fri, 1 Jul 2011 15:37:30 +0200
Hans Verkuil <hverkuil@...all.nl> wrote:

> In some cases the poll() implementation in a driver has to do different
> things depending on the events the caller wants to poll for. An example is
> when a driver needs to start a DMA engine if the caller polls for POLLIN,
> but doesn't want to do that if POLLIN is not requested but instead only
> POLLOUT or POLLPRI is requested. This is something that can happen in the
> video4linux subsystem.

The change makes sense to me, FWIW.  One bit of trivia I noticed while
looking at it:

> @@ -796,7 +792,7 @@ static int do_poll(unsigned int nfds,  struct poll_list *list,
>  		 * All waiters have already been registered, so don't provide
>  		 * a poll_table to them on the next loop iteration.
>  		 */
> -		pt = NULL;
> +		pt->qproc = NULL;
>  		if (!count) {
>  			count = wait->error;
>  			if (signal_pending(current))

The comment at the beginning of this hunk is no longer accurate since the
poll_table is, indeed, still being supplied.  The previous comment in the
same function:

				/*
				 * Fish for events. If we found one, record it
				 * and kill the poll_table, so we don't
				 * needlessly register any other waiters after
				 * this. They'll get immediately deregistered
				 * when we break out and return.
				 */

Could also use tweaking.

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