From mboxrd@z Thu Jan 1 00:00:00 1970 From: NeilBrown Subject: [PATCH 002 of 8] knfsd: rpc: fix server-side wrapping of krb5i replies Date: Mon, 7 May 2007 10:35:21 +1000 Message-ID: <1070507003521.24086@suse.de> References: <20070507103211.23855.patches@notabene> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: Neil Brown , "J. Bruce Fields" , nfs@lists.sourceforge.net, linux-kernel@vger.kernel.org, stable@kernel.org To: Andrew Morton Return-path: Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list2-new.sourceforge.net with esmtp (Exim 4.43) id 1HkrCZ-00050r-NI for nfs@lists.sourceforge.net; Sun, 06 May 2007 17:35:43 -0700 Received: from ns2.suse.de ([195.135.220.15] helo=mx2.suse.de) by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.44) id 1HkrCb-0002dw-VH for nfs@lists.sourceforge.net; Sun, 06 May 2007 17:35:46 -0700 List-Id: "Discussion of NFS under Linux development, interoperability, and testing." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: nfs-bounces@lists.sourceforge.net Errors-To: nfs-bounces@lists.sourceforge.net It's not necessarily correct to assume that the xdr_buf used to hold the server's reply must have page data whenever it has tail data. And there's no need for us to deal with that case separately anyway. Acked-by: "J. Bruce Fields" Signed-off-by: Neil Brown Cc: stable@kernel.org ### Diffstat output ./net/sunrpc/auth_gss/svcauth_gss.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff .prev/net/sunrpc/auth_gss/svcauth_gss.c ./net/sunrpc/auth_gss/svcauth_gss.c --- .prev/net/sunrpc/auth_gss/svcauth_gss.c 2007-05-07 10:30:18.000000000 +1000 +++ ./net/sunrpc/auth_gss/svcauth_gss.c 2007-05-07 10:30:38.000000000 +1000 @@ -1210,13 +1210,7 @@ svcauth_gss_wrap_resp_integ(struct svc_r if (xdr_buf_subsegment(resbuf, &integ_buf, integ_offset, integ_len)) BUG(); - if (resbuf->page_len == 0 - && resbuf->head[0].iov_len + RPC_MAX_AUTH_SIZE - < PAGE_SIZE) { - BUG_ON(resbuf->tail[0].iov_len); - /* Use head for everything */ - resv = &resbuf->head[0]; - } else if (resbuf->tail[0].iov_base == NULL) { + if (resbuf->tail[0].iov_base == NULL) { if (resbuf->head[0].iov_len + RPC_MAX_AUTH_SIZE > PAGE_SIZE) goto out_err; resbuf->tail[0].iov_base = resbuf->head[0].iov_base ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ NFS maillist - NFS@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752969AbXEGAfy (ORCPT ); Sun, 6 May 2007 20:35:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753000AbXEGAfx (ORCPT ); Sun, 6 May 2007 20:35:53 -0400 Received: from cantor2.suse.de ([195.135.220.15]:57776 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752905AbXEGAfo (ORCPT ); Sun, 6 May 2007 20:35:44 -0400 From: NeilBrown To: Andrew Morton Date: Mon, 7 May 2007 10:35:21 +1000 Message-Id: <1070507003521.24086@suse.de> X-face: [Gw_3E*Gng}4rRrKRYotwlE?.2|**#s9D Cc: Neil Brown Cc: stable@kernel.org Subject: [PATCH 002 of 8] knfsd: rpc: fix server-side wrapping of krb5i replies References: <20070507103211.23855.patches@notabene> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org It's not necessarily correct to assume that the xdr_buf used to hold the server's reply must have page data whenever it has tail data. And there's no need for us to deal with that case separately anyway. Acked-by: "J. Bruce Fields" Signed-off-by: Neil Brown Cc: stable@kernel.org ### Diffstat output ./net/sunrpc/auth_gss/svcauth_gss.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff .prev/net/sunrpc/auth_gss/svcauth_gss.c ./net/sunrpc/auth_gss/svcauth_gss.c --- .prev/net/sunrpc/auth_gss/svcauth_gss.c 2007-05-07 10:30:18.000000000 +1000 +++ ./net/sunrpc/auth_gss/svcauth_gss.c 2007-05-07 10:30:38.000000000 +1000 @@ -1210,13 +1210,7 @@ svcauth_gss_wrap_resp_integ(struct svc_r if (xdr_buf_subsegment(resbuf, &integ_buf, integ_offset, integ_len)) BUG(); - if (resbuf->page_len == 0 - && resbuf->head[0].iov_len + RPC_MAX_AUTH_SIZE - < PAGE_SIZE) { - BUG_ON(resbuf->tail[0].iov_len); - /* Use head for everything */ - resv = &resbuf->head[0]; - } else if (resbuf->tail[0].iov_base == NULL) { + if (resbuf->tail[0].iov_base == NULL) { if (resbuf->head[0].iov_len + RPC_MAX_AUTH_SIZE > PAGE_SIZE) goto out_err; resbuf->tail[0].iov_base = resbuf->head[0].iov_base