rpms/kernel/devel kernel.spec, 1.8, 1.9 linux-2.6-compile-fixes.patch, 1.150, 1.151

Dave Jones (davej) fedora-extras-commits at redhat.com
Sun Jul 15 20:18:55 UTC 2007


Author: davej

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22100

Modified Files:
	kernel.spec linux-2.6-compile-fixes.patch 
Log Message:
go with preferred fix from NFS maintainers


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- kernel.spec	15 Jul 2007 20:15:07 -0000	1.8
+++ kernel.spec	15 Jul 2007 20:18:23 -0000	1.9
@@ -1228,7 +1228,7 @@
 #
 # misc small stuff to make things compile or otherwise improve performance
 #
-#ApplyPatch linux-2.6-compile-fixes.patch
+ApplyPatch linux-2.6-compile-fixes.patch
 
 # core dump enhancement
 ApplyPatch linux-2.6-elf-core-sysctl.patch

linux-2.6-compile-fixes.patch:

Index: linux-2.6-compile-fixes.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-compile-fixes.patch,v
retrieving revision 1.150
retrieving revision 1.151
diff -u -r1.150 -r1.151
--- linux-2.6-compile-fixes.patch	15 Jul 2007 20:15:39 -0000	1.150
+++ linux-2.6-compile-fixes.patch	15 Jul 2007 20:18:23 -0000	1.151
@@ -8,13 +8,240 @@
 net/sunrpc/auth_gss/auth_gss.c:1002: error: implicit declaration of function 'lock_kernel'
 net/sunrpc/auth_gss/auth_gss.c:1004: error: implicit declaration of function 'unlock_kernel'
 
---- linux-2.6.22.noarch/net/sunrpc/auth_gss/auth_gss.c~	2007-07-15 16:14:44.000000000 -0400
-+++ linux-2.6.22.noarch/net/sunrpc/auth_gss/auth_gss.c	2007-07-15 16:14:52.000000000 -0400
-@@ -52,6 +52,7 @@
- #include <linux/workqueue.h>
- #include <linux/sunrpc/rpc_pipe_fs.h>
- #include <linux/sunrpc/gss_api.h>
+
+From davej  Sat Jul 14 13:08:20 2007
+Return-path: <linux-kernel-owner+davej=40kernelslacker.org-S1759976AbXGNRDd at vger.kernel.org>
+X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on
+	gelk.kernelslacker.org
+X-Spam-Level: 
+X-Spam-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham
+	version=3.2.1
+Envelope-to: davej at kernelslacker.org
+Delivery-date: Sat, 14 Jul 2007 18:03:42 +0100
+Received: from testure.choralone.org [194.9.77.134]
+	by gelk.kernelslacker.org with IMAP (fetchmail-6.3.7)
+	for <davej at localhost> (single-drop); Sat, 14 Jul 2007 13:08:20 -0400 (EDT)
+Received: from vger.kernel.org ([209.132.176.167])
+	by testure.choralone.org with esmtp (Exim 4.67)
+	(envelope-from <linux-kernel-owner+davej=40kernelslacker.org-S1759976AbXGNRDd at vger.kernel.org>)
+	id 1I9l1y-0001zg-BC
+	for davej at kernelslacker.org; Sat, 14 Jul 2007 18:03:42 +0100
+Received: (majordomo at vger.kernel.org) by vger.kernel.org via listexpand
+	id S1759976AbXGNRDd (ORCPT <rfc822;davej at kernelslacker.org>);
+	Sat, 14 Jul 2007 13:03:33 -0400
+Received: (majordomo at vger.kernel.org) by vger.kernel.org id S1756871AbXGNRDY
+	(ORCPT <rfc822;linux-kernel-outgoing>);
+	Sat, 14 Jul 2007 13:03:24 -0400
+Received: from mx2.netapp.com ([216.240.18.37]:1452 "EHLO mx2.netapp.com"
+	rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+	id S1756771AbXGNRDX (ORCPT <rfc822;linux-kernel at vger.kernel.org>);
+	Sat, 14 Jul 2007 13:03:23 -0400
+X-Greylist: delayed 582 seconds by postgrey-1.27 at vger.kernel.org; Sat, 14 Jul 2007 13:03:22 EDT
+X-IronPort-AV: E=Sophos;i="4.16,539,1175497200"; 
+   d="scan'208";a="81951363"
+Received: from smtp1.corp.netapp.com ([10.57.156.124])
+  by mx2-out.netapp.com with ESMTP; 14 Jul 2007 09:53:39 -0700
+Received: from svlexrs01.hq.netapp.com (svlexrs01.corp.netapp.com [10.57.156.158])
+	by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id l6EGrb0C028183;
+	Sat, 14 Jul 2007 09:53:37 -0700 (PDT)
+Received: from exsvlrb02.hq.netapp.com ([10.56.8.63]) by svlexrs01.hq.netapp.com with Microsoft SMTPSVC(6.0.3790.1830);
+	 Sat, 14 Jul 2007 09:53:37 -0700
+Received: from exsvl03.hq.netapp.com ([10.56.8.64]) by exsvlrb02.hq.netapp.com with Microsoft SMTPSVC(6.0.3790.1830);
+	 Sat, 14 Jul 2007 09:53:36 -0700
+Received: from 10.58.53.86 ([10.58.53.86]) by exsvl03.hq.netapp.com ([10.56.8.64]) with Microsoft Exchange Server HTTP-DAV ;
+ Sat, 14 Jul 2007 16:53:36 +0000
+Received: from heimdal.trondhjem.org by exsvl03.hq.netapp.com; 14 Jul 2007 12:53:35 -0400
+Subject: Re: new 2.6.22-git5 warnings
+From:	Trond Myklebust <Trond.Myklebust at netapp.com>
+To:	Randy Dunlap <randy.dunlap at oracle.com>
+Cc:	lkml <linux-kernel at vger.kernel.org>, bfields at citi.umich.edu
+In-Reply-To: <20070714083754.2c3f1d0a.randy.dunlap at oracle.com>
+References: <20070714083754.2c3f1d0a.randy.dunlap at oracle.com>
+Content-Type: multipart/mixed; boundary="=-9pi3/AD788TKpM8YFwiu"
+Organization: Network Appliance Inc
+Date:	Sat, 14 Jul 2007 12:53:35 -0400
+Message-Id: <1184432015.20296.1.camel at heimdal.trondhjem.org>
+Mime-Version: 1.0
+X-Mailer: Evolution 2.10.1 
+X-OriginalArrivalTime: 14 Jul 2007 16:53:36.0746 (UTC) FILETIME=[856E7CA0:01C7C637]
+Sender:	linux-kernel-owner at vger.kernel.org
+Precedence: bulk
+X-Mailing-List:	linux-kernel at vger.kernel.org
+Status: RO
+Content-Length: 8052
+Lines: 231
+
+
+On Sat, 2007-07-14 at 08:37 -0700, Randy Dunlap wrote:
+> 
+> net/sunrpc/auth_gss/auth_gss.c:1002: warning: implicit declaration of function 'lock_kernel'
+> net/sunrpc/auth_gss/auth_gss.c:1004: warning: implicit declaration of function 'unlock_kernel'
+> 
+> 
+> allmodconfig or allyesconfig on x86_64.
+
+Yup. Sorry about that. Bruce has proposed a cleanup which should also
+fix this problem. See attachment
+
+Cheers
+  Trond
+
+
+From: J. Bruce Fields <bfields at citi.umich.edu>
+
+Since every invocation of xdr encode or decode functions takes the BKL now,
+there's a lot of redundant lock_kernel/unlock_kernel pairs that we can pull out
+into a common function.
+
+Signed-off-by: J. Bruce Fields <bfields at citi.umich.edu>
+---
+ include/linux/sunrpc/xdr.h     |   16 ++++++++++++++++
+ net/sunrpc/auth.c              |   12 ++----------
+ net/sunrpc/auth_gss/auth_gss.c |   20 +++++---------------
+ 3 files changed, 23 insertions(+), 25 deletions(-)
+
+> It's fine to keep it as a separate patch, but you're going to have to do
+> something about the name: do_xdrproc() breaks with the standard sunrpc
+> namespace conventions. How about naming it rpc_call_xdrproc().
+
+Sounds fine.  Here's take two, with the new name and an additional
+comment.
+
+--b.
+
+diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h
+index 9e340fa..c6b53d1 100644
+--- a/include/linux/sunrpc/xdr.h
++++ b/include/linux/sunrpc/xdr.h
+@@ -12,6 +12,7 @@
+ #include <linux/uio.h>
+ #include <asm/byteorder.h>
+ #include <linux/scatterlist.h>
 +#include <linux/smp_lock.h>
- #include <asm/uaccess.h>
  
- static const struct rpc_authops authgss_ops;
+ /*
+  * Buffer adjustment
+@@ -36,6 +37,21 @@ struct xdr_netobj {
+ typedef int	(*kxdrproc_t)(void *rqstp, __be32 *data, void *obj);
+ 
+ /*
++ * We're still requiring the BKL in the xdr code until it's been
++ * more carefully audited, at which point this wrapper will become
++ * unnecessary.
++ */
++static inline int rpc_call_xdrproc(kxdrproc_t xdrproc, void *rqstp, __be32 *data, void *obj)
++{
++	int ret;
++
++	lock_kernel();
++	ret = xdrproc(rqstp, data, obj);
++	unlock_kernel();
++	return ret;
++}
++
++/*
+  * Basic structure for transmission/reception of a client XDR message.
+  * Features a header (for a linear buffer containing RPC headers
+  * and the data payload for short messages), and then an array of
+diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c
+index e04da66..cd31cbd 100644
+--- a/net/sunrpc/auth.c
++++ b/net/sunrpc/auth.c
+@@ -359,17 +359,13 @@ rpcauth_wrap_req(struct rpc_task *task, kxdrproc_t encode, void *rqstp,
+ 		__be32 *data, void *obj)
+ {
+ 	struct rpc_cred *cred = task->tk_msg.rpc_cred;
+-	int ret;
+ 
+ 	dprintk("RPC: %5u using %s cred %p to wrap rpc data\n",
+ 			task->tk_pid, cred->cr_ops->cr_name, cred);
+ 	if (cred->cr_ops->crwrap_req)
+ 		return cred->cr_ops->crwrap_req(task, encode, rqstp, data, obj);
+ 	/* By default, we encode the arguments normally. */
+-	lock_kernel();
+-	ret = encode(rqstp, data, obj);
+-	unlock_kernel();
+-	return ret;
++	return rpc_call_xdrproc(encode, rqstp, data, obj);
+ }
+ 
+ int
+@@ -377,7 +373,6 @@ rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp,
+ 		__be32 *data, void *obj)
+ {
+ 	struct rpc_cred *cred = task->tk_msg.rpc_cred;
+-	int ret;
+ 
+ 	dprintk("RPC: %5u using %s cred %p to unwrap rpc data\n",
+ 			task->tk_pid, cred->cr_ops->cr_name, cred);
+@@ -385,10 +380,7 @@ rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp,
+ 		return cred->cr_ops->crunwrap_resp(task, decode, rqstp,
+ 						   data, obj);
+ 	/* By default, we decode the arguments normally. */
+-	lock_kernel();
+-	ret = decode(rqstp, data, obj);
+-	unlock_kernel();
+-	return ret;
++	return rpc_call_xdrproc(decode, rqstp, data, obj);
+ }
+ 
+ int
+diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
+index a001973..73fd24c 100644
+--- a/net/sunrpc/auth_gss/auth_gss.c
++++ b/net/sunrpc/auth_gss/auth_gss.c
+@@ -917,9 +917,7 @@ gss_wrap_req_integ(struct rpc_cred *cred, struct gss_cl_ctx *ctx,
+ 	offset = (u8 *)p - (u8 *)snd_buf->head[0].iov_base;
+ 	*p++ = htonl(rqstp->rq_seqno);
+ 
+-	lock_kernel();
+-	status = encode(rqstp, p, obj);
+-	unlock_kernel();
++	status = rpc_call_xdrproc(encode, rqstp, p, obj);
+ 	if (status)
+ 		return status;
+ 
+@@ -1013,9 +1011,7 @@ gss_wrap_req_priv(struct rpc_cred *cred, struct gss_cl_ctx *ctx,
+ 	offset = (u8 *)p - (u8 *)snd_buf->head[0].iov_base;
+ 	*p++ = htonl(rqstp->rq_seqno);
+ 
+-	lock_kernel();
+-	status = encode(rqstp, p, obj);
+-	unlock_kernel();
++	status = rpc_call_xdrproc(encode, rqstp, p, obj);
+ 	if (status)
+ 		return status;
+ 
+@@ -1074,16 +1070,12 @@ gss_wrap_req(struct rpc_task *task,
+ 		/* The spec seems a little ambiguous here, but I think that not
+ 		 * wrapping context destruction requests makes the most sense.
+ 		 */
+-		lock_kernel();
+-		status = encode(rqstp, p, obj);
+-		unlock_kernel();
++		status = rpc_call_xdrproc(encode, rqstp, p, obj);
+ 		goto out;
+ 	}
+ 	switch (gss_cred->gc_service) {
+ 		case RPC_GSS_SVC_NONE:
+-			lock_kernel();
+-			status = encode(rqstp, p, obj);
+-			unlock_kernel();
++			status = rpc_call_xdrproc(encode, rqstp, p, obj);
+ 			break;
+ 		case RPC_GSS_SVC_INTEGRITY:
+ 			status = gss_wrap_req_integ(cred, ctx, encode,
+@@ -1199,9 +1191,7 @@ gss_unwrap_resp(struct rpc_task *task,
+ 	task->tk_auth->au_rslack = task->tk_auth->au_verfsize + (p - savedp)
+ 						+ (savedlen - head->iov_len);
+ out_decode:
+-	lock_kernel();
+-	status = decode(rqstp, p, obj);
+-	unlock_kernel();
++	status = rpc_call_xdrproc(decode, rqstp, p, obj);
+ out:
+ 	gss_put_ctx(ctx);
+ 	dprintk("RPC: %5u gss_unwrap_resp returning %d\n", task->tk_pid,
+-- 
+1.5.3.rc0.63.gc956
+




More information about the fedora-extras-commits mailing list