Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb63192b authored by Dan Carpenter's avatar Dan Carpenter Committed by J. Bruce Fields
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent ccc6398e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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++;