diff options
| author | NeilBrown <[email protected]> | 2021-09-01 23:30:37 +0000 |
|---|---|---|
| committer | Chuck Lever <[email protected]> | 2021-09-03 17:38:11 +0000 |
| commit | 0c217d5066c84f67cd672cf03ec8f682e5d013c2 (patch) | |
| tree | 042d081a4fa11ab491c43e3054bbe66886294aea /net/sunrpc/cache.c | |
| parent | SUNRPC: don't pause on incomplete allocation (diff) | |
| download | kernel-0c217d5066c84f67cd672cf03ec8f682e5d013c2.tar.gz kernel-0c217d5066c84f67cd672cf03ec8f682e5d013c2.zip | |
SUNRPC: improve error response to over-size gss credential
When the NFS server receives a large gss (kerberos) credential and tries
to pass it up to rpc.svcgssd (which is deprecated), it triggers an
infinite loop in cache_read().
cache_request() always returns -EAGAIN, and this causes a "goto again".
This patch:
- changes the error to -E2BIG to avoid the infinite loop, and
- generates a WARN_ONCE when rsi_request first sees an over-sized
credential. The warning suggests switching to gssproxy.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=196583
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>
Diffstat (limited to 'net/sunrpc/cache.c')
| -rw-r--r-- | net/sunrpc/cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 1a2c1c44bb00..59641803472c 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c @@ -803,7 +803,7 @@ static int cache_request(struct cache_detail *detail, detail->cache_request(detail, crq->item, &bp, &len); if (len < 0) - return -EAGAIN; + return -E2BIG; return PAGE_SIZE - len; } |
