From ae7d870954cf6a3608933335fedc425677aee0e3 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Thu, 8 Dec 2016 12:58:48 -0500 Subject: linux-yocto/4.8: aufs warning and ixgbe calltrace Integrating the following commits to fix aufs/ixgbe issues: Author: Liwei Song Date: Mon Dec 5 00:50:16 2016 -0500 ixgbe: initialize u64_stats_sync structures early at ixgbe_probe Fix the following CallTrace: INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 71 PID: 1 Comm: swapper/0 Not tainted 4.8.8-WR9.0.0.1_standard #11 Hardware name: Intel Corporation S2600WTT/S2600WTT, BIOS GRNDSDP1.86B.0036.R05.1407140519 07/14/2014 00200086 00200086 eb5e1ab8 c144dd70 00000000 00000000 eb5e1af8 c10af89a c1d23de4 eb5e1af8 00000009 eb5d8600 eb5d8638 eb5e1af8 c10b14d8 00000009 0000000a c1d32911 00000000 00000000 e44c826c eb5d8000 eb5e1b74 c10b214e Call Trace: [] dump_stack+0x5f/0x8f [] register_lock_class+0x25a/0x4c0 [] ? check_irq_usage+0x88/0xc0 [] __lock_acquire+0x5e/0x17a0 [] ? _raw_spin_unlock_irqrestore+0x3b/0x70 [] ? rcu_read_lock_sched_held+0x8a/0x90 [] lock_acquire+0x9f/0x1f0 [] ? dev_get_stats+0x5f/0x110 [] ixgbe_get_stats64+0x113/0x320 [] ? dev_get_stats+0x5f/0x110 [] dev_get_stats+0x5f/0x110 [] rtnl_fill_stats+0x40/0x105 [] rtnl_fill_ifinfo+0x4c5/0xd20 [] ? __kmalloc_node_track_caller+0x1a5/0x410 [] ? __kmalloc_reserve.isra.42+0x27/0x80 [] ? __alloc_skb+0x6f/0x270 [] rtmsg_ifinfo_build_skb+0x71/0xd0 [] rtmsg_ifinfo.part.23+0x1a/0x50 [] ? call_netdevice_notifiers_info+0x2d/0x60 [] rtmsg_ifinfo+0x2b/0x40 [] register_netdevice+0x3d7/0x4d0 [] register_netdev+0x17/0x30 [] ixgbe_probe+0x118d/0x1610 [] local_pci_probe+0x32/0x80 [] ? pci_match_device+0xd2/0x100 [] pci_device_probe+0xc0/0x110 [] driver_probe_device+0x1c5/0x280 [] ? pci_match_device+0xd2/0x100 [] __driver_attach+0x89/0x90 [] ? driver_probe_device+0x280/0x280 [] bus_for_each_dev+0x4f/0x80 [] driver_attach+0x1e/0x20 [] ? driver_probe_device+0x280/0x280 [] bus_add_driver+0x1a7/0x220 [] driver_register+0x59/0xe0 [] ? igb_init_module+0x49/0x49 [] __pci_register_driver+0x4a/0x50 [] ixgbe_init_module+0xa5/0xc4 [] do_one_initcall+0x35/0x150 [] ? parameq+0x18/0x70 [] ? repair_env_string+0x12/0x51 [] ? parse_args+0x260/0x3b0 [] ? __usermodehelper_set_disable_depth+0x43/0x50 [] kernel_init_freeable+0x19b/0x267 [] ? set_debug_rodata+0xf/0xf [] ? trace_hardirqs_on+0xb/0x10 [] ? _raw_spin_unlock_irq+0x32/0x50 [] ? finish_task_switch+0xab/0x1f0 [] ? finish_task_switch+0x69/0x1f0 [] kernel_init+0x10/0x110 [] ? schedule_tail+0x25/0x80 [] ret_from_kernel_thread+0xe/0x24 [] ? rest_init+0x130/0x130 This CallTrace occurred on 32-bit kernel with CONFIG_PROVE_LOCKING enabled. This happens at ixgbe driver probe hardware stage, when comes to ixgbe_get_stats64, the seqcount/seqlock still not initialize, although this was initialize in TX/RX resources setup routin, but it was too late, then lockdep give this Warning. To fix this, move the u64_stats_init function to driver probe stage, which before we get the status of seqcount and after the RX/TX ring was finished init. Signed-off-by: Liwei Song Signed-off-by: Bruce Ashfield Author: Kexin(Casey) Chen Date: Tue Nov 29 14:14:07 2016 -0800 aufs: fix compile warning fs/aufs/debug.h:95:19: warning: comparison of constant '0' with boolean expression is always false [-Wbool-compare] if (unlikely((e) < 0)) \ ^ fs/aufs/vdir.c:852:2: note: in expansion of macro 'AuTraceErr' AuTraceErr(!valid); ^~~~~~~~~~ In expansion of AuTraceErr(!valid), comparison of (!valid) and constant '0' always passes unlikely(x) false. function 'static int seek_vdir(struct file *file, struct dir_context *ctx)' is to find whether there is a valid vd_deblk following ctx->pos. return 1 means valid, 0 for not. Change to AuTraceErr(valid - 1) makes more sense. Signed-off-by: Kexin(Casey) Chen Signed-off-by: Bruce Ashfield Signed-off-by: Bruce Ashfield Signed-off-by: Richard Purdie --- meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb | 2 +- meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb | 2 +- meta/recipes-kernel/linux/linux-yocto_4.8.bb | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb b/meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb index 3d9ff393fd..fe663b1711 100644 --- a/meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb +++ b/meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb @@ -11,7 +11,7 @@ python () { raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") } -SRCREV_machine ?= "4b6a2814a1ac2a917a8334748b3168315e678041" +SRCREV_machine ?= "df64f1041f15871cffb254d7136072d1d4859284" SRCREV_meta ?= "1dc615a67779fdfd36548fd48e54bd19b6e6209e" SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.8.git;branch=${KBRANCH};name=machine \ diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb index 870a3487f3..0ff18b8d8c 100644 --- a/meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb +++ b/meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb @@ -9,7 +9,7 @@ LINUX_VERSION ?= "4.8.10" KMETA = "kernel-meta" KCONF_BSP_AUDIT_LEVEL = "2" -SRCREV_machine ?= "96ea072413fb386598a62c77ed202a6de08085f6" +SRCREV_machine ?= "78e5c86c1c194e2045e8eb2c948d00f2dbb1f31c" SRCREV_meta ?= "1dc615a67779fdfd36548fd48e54bd19b6e6209e" PV = "${LINUX_VERSION}+git${SRCPV}" diff --git a/meta/recipes-kernel/linux/linux-yocto_4.8.bb b/meta/recipes-kernel/linux/linux-yocto_4.8.bb index a4dd9adc71..16058ed833 100644 --- a/meta/recipes-kernel/linux/linux-yocto_4.8.bb +++ b/meta/recipes-kernel/linux/linux-yocto_4.8.bb @@ -11,14 +11,14 @@ KBRANCH_qemux86 ?= "standard/base" KBRANCH_qemux86-64 ?= "standard/base" KBRANCH_qemumips64 ?= "standard/mti-malta64" -SRCREV_machine_qemuarm ?= "a0241e756033146b308e94e262f0c434d4d5dcdc" -SRCREV_machine_qemuarm64 ?= "72e32211033cff873824d944470d06f590f66a85" -SRCREV_machine_qemumips ?= "b17c74d6df96711a98c48515b6c171dfe492a4a6" -SRCREV_machine_qemuppc ?= "15c034ae478c08219aaefaf8a9b57ee2939715a9" -SRCREV_machine_qemux86 ?= "f5d46e21688b7463c942d9d27789d88d580f566b" -SRCREV_machine_qemux86-64 ?= "f5d46e21688b7463c942d9d27789d88d580f566b" -SRCREV_machine_qemumips64 ?= "7688c6f57bc68c6b39f0bd7a20ea84419ebfaf50" -SRCREV_machine ?= "f5d46e21688b7463c942d9d27789d88d580f566b" +SRCREV_machine_qemuarm ?= "a004864814e34348c6dc5f745af3f775c55c0510" +SRCREV_machine_qemuarm64 ?= "eb61693c773924d742aeea5e03b88d7554db61c3" +SRCREV_machine_qemumips ?= "89f99732db8a8082898a396e67a34472a1017032" +SRCREV_machine_qemuppc ?= "e03132839bac2cef030ff70b3e19c0fb4816a9fd" +SRCREV_machine_qemux86 ?= "9acf42c4475aa0699b2692d7f27f22d699b36337" +SRCREV_machine_qemux86-64 ?= "9acf42c4475aa0699b2692d7f27f22d699b36337" +SRCREV_machine_qemumips64 ?= "ff92ef8e2b67415b5e6fd4cd15489cb43de8c932" +SRCREV_machine ?= "9acf42c4475aa0699b2692d7f27f22d699b36337" SRCREV_meta ?= "1dc615a67779fdfd36548fd48e54bd19b6e6209e" SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.8.git;name=machine;branch=${KBRANCH}; \ -- cgit 1.2.3-korg