Bug #6217
nfsauth_cache_get() should allocate/free maxlen for addr, not len
Start date:
2015-09-10
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:
Description
The nfsauth_cache_get() does this:
838 claddr = svc_getrpccaller(req->rq_xprt); 839 addr = *claddr; 840 addr.buf = kmem_alloc(addr.len, KM_SLEEP);
and this:
1227 1228 kmem_free(addr.buf, addr.len); 1229
(and similarly at some other places).
Properly, the maxlen (instead of len) should be used there.
Fortunately, the current implementation is harmless now, but to avoid confusion for future it would be nice to have this fixed.