mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-24 22:55:35 +08:00
SUNRPC: off by one in BUG_ON()
The m->pool_to[] array has "maxpools" number of elements. It's allocated in svc_pool_map_alloc_arrays() which we called earlier in the function. This test should be >= instead of >. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
parent
ccc6398ea5
commit
eb63192bb8
@ -189,7 +189,7 @@ svc_pool_map_init_percpu(struct svc_pool_map *m)
|
||||
return err;
|
||||
|
||||
for_each_online_cpu(cpu) {
|
||||
BUG_ON(pidx > maxpools);
|
||||
BUG_ON(pidx >= maxpools);
|
||||
m->to_pool[cpu] = pidx;
|
||||
m->pool_to[pidx] = cpu;
|
||||
pidx++;
|
||||
|
Loading…
Reference in New Issue
Block a user