diff options
author | Felix Fietkau <[email protected]> | 2021-05-25 18:07:58 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2021-05-26 10:49:28 -0300 |
commit | 75ea44e356b5de8c817f821c9dd68ae329e82add (patch) | |
tree | 76651eb16926c90a6a61f9444f4130860ae540b8 /drivers/usb/cdns3/cdns3-debug.h | |
parent | a050a6d2b7e80ca52b2f4141eaf3420d201b72b3 (diff) |
perf jevents: Fix getting maximum number of fds
On some hosts, rlim.rlim_max can be returned as RLIM_INFINITY.
By casting it to int, it is interpreted as -1, which will cause get_maxfds
to return 0, causing "Invalid argument" errors in nftw() calls.
Fix this by casting the second argument of min() to rlim_t instead.
Fixes: 80eeb67fe577 ("perf jevents: Program to convert JSON file")
Signed-off-by: Felix Fietkau <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Sukadev Bhattiprolu <[email protected]>
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-debug.h')
0 files changed, 0 insertions, 0 deletions