Allow blocksizes other than 8 when calculating padding Signed-off-by: Kevin Coffman --- net/sunrpc/auth_gss/gss_krb5_wrap.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff -up linux-2.6.29.noarch/net/sunrpc/auth_gss/gss_krb5_wrap.c.orig linux-2.6.29.noarch/net/sunrpc/auth_gss/gss_krb5_wrap.c --- linux-2.6.29.noarch/net/sunrpc/auth_gss/gss_krb5_wrap.c.orig 2009-04-30 15:21:50.629500000 -0400 +++ linux-2.6.29.noarch/net/sunrpc/auth_gss/gss_krb5_wrap.c 2009-04-30 15:25:14.160036000 -0400 @@ -13,10 +13,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 - 1)); } static inline void