Re: [PATCH RFC v1 1/4] perf: Introduce extended syscall error reporting

From: Peter Zijlstra
Date: Wed Aug 05 2015 - 12:10:26 EST


On Fri, Jul 24, 2015 at 02:45:56PM +0300, Alexander Shishkin wrote:

> @@ -3890,7 +3958,7 @@ perf_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
> ret = perf_read_hw(event, buf, count);
> perf_event_ctx_unlock(event, ctx);
>
> - return ret;
> + return perf_error_report(&event->attr, ret);
> }
>
> static unsigned int perf_poll(struct file *file, poll_table *wait)
> @@ -4103,7 +4171,7 @@ static long perf_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
> ret = _perf_ioctl(event, cmd, arg);
> perf_event_ctx_unlock(event, ctx);
>
> - return ret;
> + return perf_error_report(&event->attr, ret);
> }
>
> #ifdef CONFIG_COMPAT

Oooh, shiny.. So not only does it work for SYSCALL time fails, it keeps
the pointer about and reports all subsequent fails in there too.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/