소스 검색

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>
J. Bruce Fields 16 년 전
부모
커밋
54ec3d462f
1개의 변경된 파일1개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 4
      net/sunrpc/auth_gss/gss_krb5_wrap.c

+ 1 - 4
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