diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-10-29 11:44:16 +0300 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-10-29 11:37:42 -0400 |
commit | eb63192bb8cc0186265aad4f79fa4fd49c22b021 (patch) | |
tree | d3539e13f2abae0d979a09ddb4b14ff683ea7756 /net/sunrpc | |
parent | ccc6398ea5d58fdedc6caccba0216ab30739773b (diff) | |
download | op-kernel-dev-eb63192bb8cc0186265aad4f79fa4fd49c22b021.zip op-kernel-dev-eb63192bb8cc0186265aad4f79fa4fd49c22b021.tar.gz |
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>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/svc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index ca8a795..349c98f 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -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++; |