rpms/kernel/devel linux-2.6.28-lockd-svc-register.patch, NONE, 1.1 kernel.spec, 1.1291, 1.1292

Steve Dickson steved at fedoraproject.org
Thu Feb 12 12:11:42 UTC 2009


Author: steved

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11627

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6.28-lockd-svc-register.patch 
Log Message:
NFS: lockd fails to load causing mounts to fail


linux-2.6.28-lockd-svc-register.patch:

--- NEW FILE linux-2.6.28-lockd-svc-register.patch ---
diff -up linux-2.6.28.x86_64/net/sunrpc/rpcb_clnt.c.orig linux-2.6.28.x86_64/net/sunrpc/rpcb_clnt.c
--- linux-2.6.28.x86_64/net/sunrpc/rpcb_clnt.c.orig	2009-02-10 13:14:34.000000000 -0500
+++ linux-2.6.28.x86_64/net/sunrpc/rpcb_clnt.c	2009-02-11 14:50:47.000000000 -0500
@@ -255,8 +255,8 @@ int rpcb_register(u32 prog, u32 vers, in
 /*
  * Fill in AF_INET family-specific arguments to register
  */
-static int rpcb_register_netid4(struct sockaddr_in *address_to_register,
-				struct rpc_message *msg)
+static int rpcb_register_inet4(struct sockaddr_in *address_to_register,
+			       struct rpc_message *msg)
 {
 	struct rpcbind_args *map = msg->rpc_argp;
 	unsigned short port = ntohs(address_to_register->sin_port);
@@ -283,8 +283,8 @@ static int rpcb_register_netid4(struct s
 /*
  * Fill in AF_INET6 family-specific arguments to register
  */
-static int rpcb_register_netid6(struct sockaddr_in6 *address_to_register,
-				struct rpc_message *msg)
+static int rpcb_register_inet6(struct sockaddr_in6 *address_to_register,
+			       struct rpc_message *msg)
 {
 	struct rpcbind_args *map = msg->rpc_argp;
 	unsigned short port = ntohs(address_to_register->sin6_port);
@@ -312,6 +312,20 @@ static int rpcb_register_netid6(struct s
 	return rpcb_register_call(RPCBVERS_4, msg);
 }
 
+static int rpcb_unregister_all_protofamilies(struct rpc_message *msg)
+{
+	struct rpcbind_args *map = msg->rpc_argp;
+
+	dprintk("RPC:       unregistering [%u, %u, '%s'] with "
+		"local rpcbind\n",
+			map->r_prog, map->r_vers, map->r_netid);
+
+	map->r_addr = "";
+	msg->rpc_proc = &rpcb_procedures4[RPCBPROC_UNSET];
+
+	return rpcb_register_call(RPCBVERS_4, msg);
+}
+
 /**
  * rpcb_v4_register - set or unset a port registration with the local rpcbind
  * @program: RPC program number of service to (un)register
@@ -329,10 +343,11 @@ static int rpcb_register_netid6(struct s
  * invoke this function once for each [program, version, address,
  * netid] tuple they wish to advertise.
  *
- * Callers may also unregister RPC services that are no longer
- * available by setting the port number in the passed-in address
- * to zero.  Callers pass a netid of "" to unregister all
- * transport netids associated with [program, version, address].
+ * Callers may also unregister RPC services that are registered at a
+ * specific address by setting the port number in @address to zero.
+ * They may unregister all registered protocol families at once for
+ * a service by passing a NULL @address argument.  If @netid is ""
+ * then all netids for [program, version, address] are unregistered.
  *
  * This function uses rpcbind protocol version 4 to contact the
  * local rpcbind daemon.  The local rpcbind daemon must support
@@ -367,12 +382,15 @@ int rpcb_v4_register(const u32 program, 
 		.rpc_argp	= &map,
 	};
 
+	if (address == NULL)
+		return rpcb_unregister_all_protofamilies(&msg);
+
 	switch (address->sa_family) {
 	case AF_INET:
-		return rpcb_register_netid4((struct sockaddr_in *)address,
+		return rpcb_register_inet4((struct sockaddr_in *)address,
 					    &msg);
 	case AF_INET6:
-		return rpcb_register_netid6((struct sockaddr_in6 *)address,
+		return rpcb_register_inet6((struct sockaddr_in6 *)address,
 					    &msg);
 	}
 
diff -up linux-2.6.28.x86_64/net/sunrpc/svc.c.orig linux-2.6.28.x86_64/net/sunrpc/svc.c
--- linux-2.6.28.x86_64/net/sunrpc/svc.c.orig	2009-02-10 13:14:34.000000000 -0500
+++ linux-2.6.28.x86_64/net/sunrpc/svc.c	2009-02-11 15:02:14.000000000 -0500
@@ -903,15 +903,25 @@ int svc_register(const struct svc_serv *
 }
 
 /*
- * Olaf says a v2 UNSET should clear _all_ entries, including any
- * registered via a v4 SET
+ * If user space is running rpcbind, it should take the v4 UNSET
+ * and clear everything for this [program, version].  If user space
+ * is running portmap, it will reject the v4 UNSET, but won't have
+ * any "inet6" entries anyway.  So a PMAP_UNSET should be sufficient
+ * in this case to clear all existing entries for [program, version].
  */
 static void __svc_unregister(const u32 program, const u32 version,
 			     const char *progname)
 {
 	int error;
 
-	error = rpcb_register(program, version, 0, 0);
+	/*
+	 * User space didn't support rpcbind v4, so retry this
+	 * request with the legacy rpcbind v2 protocol.
+	 */
+	error = rpcb_v4_register(program, version, NULL, "");
+	if (error == -EPROTONOSUPPORT)
+		error = rpcb_register(program, version, 0, 0);
+
 	dprintk("svc: %s(%sv%u), error %d\n",
 			__func__, progname, version, error);
 }


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1291
retrieving revision 1.1292
diff -u -r1.1291 -r1.1292
--- kernel.spec	12 Feb 2009 09:10:10 -0000	1.1291
+++ kernel.spec	12 Feb 2009 12:11:12 -0000	1.1292
@@ -655,6 +655,7 @@
 Patch2201: linux-2.6-firewire-git-pending.patch
 
 Patch2300: linux-2.6.28-sunrpc-ipv6-rpcbind.patch
+Patch2301: linux-2.6.28-lockd-svc-register.patch
 
 # Quiet boot fixes
 # silence the ACPI blacklist code
@@ -1172,6 +1173,8 @@
 
 ApplyPatch linux-2.6-net-sch-drr-fix-u32-type.patch
 
+ApplyPatch linux-2.6.28-lockd-svc-register.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -1749,6 +1752,9 @@
 %kernel_variant_files -k vmlinux %{with_kdump} kdump
 
 %changelog
+* Wed Feb 12 2009 Steve Dickosn <steved at redhat.com>
+- NFS: lockd fails to load causing mounts to fail
+
 * Thu Feb 12 2009 Hans de Goede <hdegoede at redhat.com>
 - Enable AMD Geode scx200 i2c bus controller driver (#485162)
 




More information about the fedora-extras-commits mailing list