Subject: Re: patch for patch-3.0.58-vs2.3.2.5.diff and 3.0.59/60
From: Corey Wright <undefined@pobox.com>
Date: Fri, 25 Jan 2013 08:03:05 -0600
Fri, 25 Jan 2013 08:03:05 -0600
On Fri, 18 Jan 2013 04:13:49 -0600
Corey Wright <undefined@pobox.com> wrote:

> the attached patch fixes the reject in net/core/rtnetlink.c when applying
> patch-3.0.58-vs2.3.2.5.diff to 3.0.59 (to account for the addition of
> if_info_size in rtmsg_ifinfo()).

grrr!  i discovered my previously attached patch included spaces instead of
tabs (must have copied the output of diff from a terminal instead of
redirecting to a file) when i tried to patch the recent 3.0.60 release and it
horribly failed (the kernel source uses tabs, not spaces, for indentation so
patch couldn't find the corresponding lines with spaces).

so attached is essentially the same patch, but:
 * references correct form of whitespace (tabs not spaces)
 * for 3.0.60 (instead of 3.0.59)
 * includes the appropriate fix-up for Makefile (ie EXTRAVERSION)

> tested in virtualbox guest with testme & testfs.

i've tested applying the patch (so this time i'm sure it applies unlike last
time), but i'm currently building the kernel, so no compilation or run-time
testing done.

corey
--
undefined@pobox.com

> corey
> --
> undefined@pobox.com


diff -urNpd linux-3.0.60-vs2.3.2.5/Makefile linux-3.0.60-vs2.3.2.5-fixed/Makefile
--- linux-3.0.60-vs2.3.2.5/Makefile	2013-01-25 07:31:48.000000000 -0600
+++ linux-3.0.60-vs2.3.2.5-fixed/Makefile	2013-01-25 07:26:56.000000000 -0600
@@ -1,7 +1,7 @@
 VERSION = 3
 PATCHLEVEL = 0
 SUBLEVEL = 60
-EXTRAVERSION =
+EXTRAVERSION = -vs2.3.2.5
 NAME = Sneaky Weasel
 
 # *DOCUMENTATION*
diff -urNpd linux-3.0.60-vs2.3.2.5/net/core/rtnetlink.c linux-3.0.60-vs2.3.2.5-fixed/net/core/rtnetlink.c
--- linux-3.0.60-vs2.3.2.5/net/core/rtnetlink.c	2013-01-25 07:31:48.000000000 -0600
+++ linux-3.0.60-vs2.3.2.5-fixed/net/core/rtnetlink.c	2013-01-25 07:25:03.000000000
-0600
@@ -1929,6 +1929,9 @@ void rtmsg_ifinfo(int type, struct net_d
 	int err = -ENOBUFS;
 	size_t if_info_size;
 
+	if (!nx_dev_visible(current_nx_info(), dev))
+		return;
+
 	skb = nlmsg_new((if_info_size = if_nlmsg_size(dev, 0)), GFP_KERNEL);
 	if (skb == NULL)
 		goto errout;