Re: [PATCH] kernel/perf: correct return code of rb_alloc_aux() if !has_aux(ev)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hendrik Brueckner <brueckner@xxxxxxxxxxxxxxxxxx> writes:

> If the event for which an AUX area is about to be allocated, does
> not support setting up an AUX area, rb_alloc_aux() return -ENOTSUPP.
>
> This error condition is being returned unfiltered to the user space,
> and, for example, the perf tools fails with:
>
>   failed to mmap with 524 (INTERNAL ERROR: strerror_r(524, 0x3fff497a1c8, 512)=22)
>
> This error can be easily seen with "perf record -m 128,256 -e cpu-clock".
>
> The 524 error code maps to -ENOTSUPP (in rb_alloc_aux()). The -ENOTSUPP
> error code shall be only used within the kernel.  So the correct error
> code would then be -EOPNOTSUPP.
>
> With this commit, the perf tool then reports:
>
>   failed to mmap with 95 (Operation not supported)
>
> which is more clear.

Acked-by: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>

Curious as to why does the tool allow this.

Regards,
--
Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux