From: J. Bruce Fields Date: Mon, 27 Sep 2010 20:22:30 +0000 (-0400) Subject: nfsd4: fix alloc_init_session BUILD_BUG_ON() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c23753dac1d21b39facd2ad3c7340dd275b3022f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git nfsd4: fix alloc_init_session BUILD_BUG_ON() Note we're allocating an array of nfsd4_slot *'s, not nfsd4_slot's. Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index d3f12dcc1696..e30579432863 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -657,7 +657,7 @@ alloc_init_session(struct svc_rqst *rqstp, struct nfs4_client *clp, if (status) goto out; - BUILD_BUG_ON(NFSD_MAX_SLOTS_PER_SESSION * sizeof(struct nfsd4_slot) + BUILD_BUG_ON(NFSD_MAX_SLOTS_PER_SESSION * sizeof(struct nfsd4_slot *) + sizeof(struct nfsd4_session) > PAGE_SIZE); status = nfserr_jukebox;