Subject: Re: [vserver] Error compiling vs2.3.7.1 with 3.18.4 and Ubuntu Vivid kernel configuration
From: Corey Wright <undefined@pobox.com>
Date: Tue, 3 Feb 2015 07:28:30 -0600
Tue, 3 Feb 2015 07:28:30 -0600
On Tue, 3 Feb 2015 10:18:32 +0000
Fiedler Roman <Roman.Fiedler@ait.ac.at> wrote:

> Hello List,
> 
> Just got this one. Is this a vserver-patch specific problem or might the
> Ubuntu kernel configuration have revealed an issue in the stock kernel?
> 
> 
>   CC [M]  drivers/scsi/csiostor/csio wr.o
>   LD [M]  drivers/scsi/csiostor/csiostor.o
>   CC [M]  drivers/scsi/cxgbi/libcxgbi.o
> drivers/scsi/cxgbi/libcxgbi.c: In function `cxgbi check route6':
> drivers/scsi/cxgbi/libcxgbi.c:767:7: error: too few arguments to function
> `ipv6 dev get saddr'
>        &daddr6->sin6 addr, 0, &pref saddr);
>        ^
> In file included from drivers/scsi/cxgbi/libcxgbi.c:29:0:
> include/net/addrconf.h:80:5: note: declared here
>  int ipv6 dev get saddr(struct net *net, const struct net device *dev,
>      ^
> make[4]: *** [drivers/scsi/cxgbi/libcxgbi.o] Error 1
> make[3]: *** [drivers/scsi/cxgbi] Error 2
> make[2]: *** [drivers/scsi] Error 2
> make[1]: *** [drivers] Error 2
> make[1]: Leaving directory `/usr/src/linux-3.18.4'
> make: *** [debian/stamp/build/kernel] Error 2

see attachment.

i generated the patch using the debian 3.18 kernel config from experimental.

i haven't had time to run-time test it (been busy debugging why lxc-start
mounts filesystems in a container on a non-vserver kernel but not on a vserver
kernel, though root can do it without problem within the container), but
it's modeled after the vserver patching of ipv6 dev get saddr() within
drivers/infiniband/core/addr.c and causes a successful compilation, so please
report back your experience.

corey
--
undefined@pobox.com

> Kind Regards,
> Roman
> 
> 
> 
> DI Roman Fiedler
> Scientist
> Digital Safety & Security Department
> Assistive Healthcare Information Technology
> 
> AIT Austrian Institute of Technology GmbH
> Reininghausstraße 13/1 | 8020 Graz | Austria
> T +43(0) 50550 2957 | M +43(0) 664 8561599 | F +43(0) 50550 2950
> roman.fiedler@ait.ac.at | http://www.ait.ac.at/
> 
> FN: 115980 i HG Wien  |  UID: ATU14703506
> http://www.ait.ac.at/Email-Disclaimer


diff -urNpd linux-3.18.4-vs2.3.7.1.orig/drivers/scsi/cxgbi/libcxgbi.c linux-3.18.4-vs2.3.7.1/drivers/scsi/cxgbi/libcxgbi.c
--- linux-3.18.4-vs2.3.7.1.orig/drivers/scsi/cxgbi/libcxgbi.c	2015-01-27 10:30:10.000000000
-0600
+++ linux-3.18.4-vs2.3.7.1/drivers/scsi/cxgbi/libcxgbi.c	2015-01-30 09:06:17.000000000
-0600
@@ -764,7 +764,8 @@ static struct cxgbi_sock *cxgbi_check_ro
 		struct inet6_dev *idev = ip6_dst_idev((struct dst_entry *)rt);
 
 		err = ipv6_dev_get_saddr(&init_net, idev ? idev->dev : NULL,
-					 &daddr6->sin6_addr, 0, &pref_saddr);
+					 &daddr6->sin6_addr, 0, &pref_saddr,
+					 NULL);
 		if (err) {
 			pr_info("failed to get source address to reach %pI6\n",
 				&daddr6->sin6_addr);