Re: [B.A.T.M.A.N.] [PATCH v4 12/31] batman-adv: Add compatibility code for kref_get_unless_zero

Sven Eckelmann
2016-01-07T08:32:25Z

[-- Attachment #1: Type: text/plain, Size: 2544 bytes --]

On Thursday 07 January 2016 04:39:33 Linus Lüssing wrote:
[...]
> Does not compile for me on a 3.2 kernel:
>
> -----
> /home/tux/dev/batman-adv-t_x/gen-compat-autoconf.sh
> /home/tux/dev/batman-adv-t_x/compat-autoconf.h make -C
> /lib/modules/3.2.0-4-amd64/build
> M=/home/tux/dev/batman-adv-t_x/net/batman-adv CONFIG_BATMAN_ADV=m
> CONFIG_BATMAN_ADV_DEBUG=n CONFIG_BATMAN_ADV_BLA=y CONFIG_BATMAN_ADV_DAT=y
> CONFIG_BATMAN_ADV_NC=n CONFIG_BATMAN_ADV_MCAST=y
> INSTALL_MOD_DIR=updates/net/batman-adv/ modules make[1]: Entering
> directory `/usr/src/linux-headers-3.2.0-4-amd64' CC [M]
> /home/tux/dev/batman-adv-t_x/net/batman-adv/bat_iv_ogm.o distcc[1604]
> ERROR: compile /home/tux/.ccache/tmp/bat_iv_ogm.tmp.krtek.1599.i on
> localhost failed In file included from
> /usr/src/linux-headers-3.2.0-4-common/include/linux/kobject.h:24:0, from
> /usr/src/linux-headers-3.2.0-4-common/include/linux/device.h:17, from
> /usr/src/linux-headers-3.2.0-4-common/include/linux/dmaengine.h:24, from
> /usr/src/linux-headers-3.2.0-4-common/include/linux/skbuff.h:30, from
> /home/tux/dev/batman-adv-t_x/compat-include/linux/skbuff.h:25, from
> /usr/src/linux-headers-3.2.0-4-common/include/linux/if_ether.h:133, from
> /home/tux/dev/batman-adv-t_x/compat-include/linux/if_ether.h:25, from
> /usr/src/linux-headers-3.2.0-4-common/include/linux/netdevice.h:29, from
> /home/tux/dev/batman-adv-t_x/compat-include/linux/netdevice.h:25, from
> /home/tux/dev/batman-adv-t_x/compat.h:52,
> from <command-line>:1:
> /home/tux/dev/batman-adv-t_x/compat-include/linux/kref.h:32:95: error:
> redefinition of ‘kref_get_unless_zero’
> /usr/src/linux-headers-3.2.0-4-common/include/linux/kref.h:47:95: note:
> previous definition of ‘kref_get_unless_zero’ was here make[4]: ***
> [/home/tux/dev/batman-adv-t_x/net/batman-adv/bat_iv_ogm.o] Error 1 make[3]:
> *** [_module_/home/tux/dev/batman-adv-t_x/net/batman-adv] Error 2 make[2]:
> *** [sub-make] Error 2
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-4-amd64'
> make: *** [all] Error 2
> make 0,61s user 0,20s system 67% cpu 1,203 total
> -----

This doesn't seem to be an official Linus' kernel because here the 3.2 kernel
doesn't have this function (checked against Linus' official 3.2 release). It
looks like this 3.8 change was introduced by Ben Hutchings in Linux stable for
v3.2.44.

Does anyone has interest in adding the code to check for these stable
releases?

Kind regards,
Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]