summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2010-03-17 18:02:48 +0100
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-05-14 21:09:15 +0200
commit54ec3d462f3c2a3fe48a7bd592160bee31360087 (patch)
tree4ae0027a9d40daed5d63b973c2f2895ddae45766
parentgss_krb5: Added and improved code comments (diff)
downloadlinux-54ec3d462f3c2a3fe48a7bd592160bee31360087.tar.xz
linux-54ec3d462f3c2a3fe48a7bd592160bee31360087.zip
gss_krb5: Don't expect blocksize to always be 8 when calculating padding
Signed-off-by: Steve Dickson <steved@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r--net/sunrpc/auth_gss/gss_krb5_wrap.c5
1 files changed, 1 insertions, 4 deletions
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