can: bittiming: can_calc_bittiming(): add missing parameter to no-op function
[platform/kernel/linux-starfive.git] / kernel / sys.c
index 5fd54bf..88b31f0 100644 (file)
@@ -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;