From: J. Bruce Fields Date: Wed, 17 Mar 2010 17:02:48 +0000 (-0400) Subject: gss_krb5: Don't expect blocksize to always be 8 when calculating padding X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=54ec3d462f3c2a3fe48a7bd592160bee31360087;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git gss_krb5: Don't expect blocksize to always be 8 when calculating padding Signed-off-by: Steve Dickson Signed-off-by: Trond Myklebust --- diff --git a/net/sunrpc/auth_gss/gss_krb5_wrap.c b/net/sunrpc/auth_gss/gss_krb5_wrap.c index 496281fabb91..5d6c3b12ea70 100644 --- a/net/sunrpc/auth_gss/gss_krb5_wrap.c +++ b/net/sunrpc/auth_gss/gss_krb5_wrap.c @@ -12,10 +12,7 @@ static inline int gss_krb5_padding(int blocksize, int length) { - /* Most of the code is block-size independent but currently we - * use only 8: */ - BUG_ON(blocksize != 8); - return 8 - (length & 7); + return blocksize - (length % blocksize); } static inline void