Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1290994 > unrolled thread

RE: [char-misc for v4.4] mei: fix fasync return value on error

Started by"Winkler, Tomas" <tomas.winkler@intel.com>
First post2015-12-14 10:20 +0100
Last post2015-12-14 10:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  RE: [char-misc for v4.4] mei: fix fasync return value on error "Winkler, Tomas" <tomas.winkler@intel.com> - 2015-12-14 10:20 +0100

#1290994 — RE: [char-misc for v4.4] mei: fix fasync return value on error

From"Winkler, Tomas" <tomas.winkler@intel.com>
Date2015-12-14 10:20 +0100
SubjectRE: [char-misc for v4.4] mei: fix fasync return value on error
Message-ID<qFxst-47d-5@gated-at.bofh.it>
> fasync should return a negative value on error
> and not poll mask POLLERR.
> 
> Cc: <stable@vger.kernel.org> # 4.3+
> Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
> ---
>  drivers/misc/mei/main.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c
> index b2f2486b3d75..677d0362f334 100644
> --- a/drivers/misc/mei/main.c
> +++ b/drivers/misc/mei/main.c
> @@ -657,7 +657,9 @@ out:
>   * @file: pointer to file structure
>   * @band: band bitmap
>   *
> - * Return: poll mask
> + * Return: negative on error,
> + *         0 if it did no changes,
> + *         and positive a process was added or deleted
>   */
>  static int mei_fasync(int fd, struct file *file, int band)
>  {
> @@ -665,7 +667,7 @@ static int mei_fasync(int fd, struct file *file, int band)
>  	struct mei_cl *cl = file->private_data;
> 
>  	if (!mei_cl_is_connected(cl))
> -		return POLLERR;
> +		return -ENODEV;
> 
>  	return fasync_helper(fd, file, band, &cl->ev_async);
>  }

Greg, I saw this patch wasn't applied in rc5, any comments on the patch?
Thanks
Tomas

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web