diff options
| author | Thomas Zimmermann <[email protected]> | 2023-01-31 14:18:33 +0100 |
|---|---|---|
| committer | Thomas Zimmermann <[email protected]> | 2023-01-31 14:18:33 +0100 |
| commit | df5bf3b942a8d344bd9cbbe6ac31c9a2ea1557a4 (patch) | |
| tree | bfbcbe56b9f4f8b1e44242b80800a68b2ae5b2d6 /kernel/sys.c | |
| parent | 532a38292c7213aa6d950e6a1b86659d08b5aa67 (diff) | |
| parent | aebd8f0c6f8280ba35bc989f4a9ea47469d3589a (diff) | |
Merge drm/drm-next into drm-misc-next
Backmerging to get v6.2-rc6.
Signed-off-by: Thomas Zimmermann <[email protected]>
Diffstat (limited to 'kernel/sys.c')
| -rw-r--r-- | kernel/sys.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index 5fd54bf0e886..88b31f096fb2 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -1442,6 +1442,8 @@ static int do_prlimit(struct task_struct *tsk, unsigned int resource, if (resource >= RLIM_NLIMITS) return -EINVAL; + resource = array_index_nospec(resource, RLIM_NLIMITS); + if (new_rlim) { if (new_rlim->rlim_cur > new_rlim->rlim_max) return -EINVAL; |