lkml.org 
[lkml]   [2020]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.4 225/266] nfsd: safer handling of corrupted c_type
    Date
    From: "J. Bruce Fields" <bfields@redhat.com>

    [ Upstream commit c25bf185e57213b54ea0d632ac04907310993433 ]

    This can only happen if there's a bug somewhere, so let's make it a WARN
    not a printk. Also, I think it's safest to ignore the corruption rather
    than trying to fix it by removing a cache entry.

    Signed-off-by: J. Bruce Fields <bfields@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    fs/nfsd/nfscache.c | 3 +--
    1 file changed, 1 insertion(+), 2 deletions(-)

    diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c
    index 0c10bfea039e..4a258065188e 100644
    --- a/fs/nfsd/nfscache.c
    +++ b/fs/nfsd/nfscache.c
    @@ -469,8 +469,7 @@ nfsd_cache_lookup(struct svc_rqst *rqstp)
    rtn = RC_REPLY;
    break;
    default:
    - printk(KERN_WARNING "nfsd: bad repcache type %d\n", rp->c_type);
    - nfsd_reply_cache_free_locked(b, rp, nn);
    + WARN_ONCE(1, "nfsd: bad repcache type %d\n", rp->c_type);
    }

    goto out;
    --
    2.25.1
    \
     
     \ /
      Last update: 2020-06-18 04:27    [W:4.272 / U:0.168 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site