Remove overrun in svcauth_gss_validate.

The rpchdr buffer could be trivially overrun, given the allowed
MAX_AUTH_BYTES.  Allocation from the free store doesn't seem
preferable so long as we continue to enforce this limit..

Coverity CID 30347.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>

Correct fix for Coverity-detected overrun.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>

Add comment.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Set only aliased region of struct sockaddr_storage.

Coverity CID 30344.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Fix xp_lock, srec deadlock.

The xp_lock and srec locks were taken in the wrong order in
evchan_ureg_imp.

Coverity CID 30340.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Remove unused/prototype readv_vc and writev_vc.

These functions have been superceded by logic in svc_ioq.c.

Coverity CID 30334.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Extend nc_mtx critical section for clarity.

Coverity CID 30325.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Serialize gss data in authgss_refresh.

Coverity CID 30317.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Hold ops_lock while updating XP_RECV.

Coverity CID 30315.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Add missing break in svc_lookup.

This code is used only in generic servers (i.e., not Ganesha atm).

Coverity CID 30304.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Add missing break in svc_lookup.

Coverity CID 30300.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Don't leak a thrd wq mtx.

Coverity CID 30291.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Remove assign through NULL targaddr.

Coverity CID 30259.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Remove useless NULL check.

Coverity analysis proves that a nul nc_protofamily must cause a
crash.  In this case, it seems best to take it as an invariant.

Coverity CID 30258.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
NULL host is suspicious, but code allows it.

Coverity CID 30257.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Remove NULL check on auth (which may not be NULL).

Coverity CID 30255.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Remove check for NULL nconf->nc_netid.

The Coverity case proves that nc_netid cannot be NULL.

Coverity CID 30247.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Handle race-toinsert srec case.

Coverity CID 30246.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Check return code from __rpc_nconf2sockinfo.

Coverity CID 30231.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Discard return code from setsockopt.

The value being set is optional.

Coverity CID 30229.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Discard return code in raw xdr_replymsg err.

This happens only in raw, and only in the special case that
decoding failed.  The XDR_FREE must succeed.

Coverity CID 30228.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Discard return code from setsockopt.

Coverity CID 30225.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>