lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200923084648.GD28663@shao2-debian>
Date:   Wed, 23 Sep 2020 16:46:48 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Ahmed S. Darwish" <a.darwish@...utronix.de>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        LKML <linux-kernel@...r.kernel.org>, lkp@...ts.01.org,
        lkp@...el.com
Subject: [seqlock] 1909760f5f: WARNING:inconsistent_lock_state

Greeting,

FYI, we noticed the following commit (built with gcc-9):

commit: 1909760f5fc3f123e47b4e24e0ccdc0fc8f3f106 ("seqlock: PREEMPT_RT: Do not starve seqlock_t writers")
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master


in testcase: kernel-selftests
version: kernel-selftests-x86_64-e8e8f16e-1_20200807
with following parameters:

	group: kselftests-net
	ucode: 0x21

test-description: The kernel contains a set of "self tests" under the tools/testing/selftests/ directory. These are intended to be small unit tests to exercise individual code paths in the kernel.
test-url: https://www.kernel.org/doc/Documentation/kselftest.txt


on test machine: 4 threads Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz with 8G memory

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):


+---------------------------------------+------------+------------+
|                                       | 8117ab508f | 1909760f5f |
+---------------------------------------+------------+------------+
| boot_successes                        | 0          | 0          |
| boot_failures                         | 0          | 27         |
| dmesg.WARNING:inconsistent_lock_state | 0          | 27         |
+---------------------------------------+------------+------------+


If you fix the issue, kindly add following tag
Reported-by: kernel test robot <lkp@...el.com>


kern  :warn  : [  309.808218] WARNING: inconsistent lock state
kern  :warn  : [  309.813923] 5.9.0-rc2-00048-g1909760f5fc3f #1 Not tainted
kern  :warn  : [  309.820815] --------------------------------
kern  :warn  : [  309.826576] inconsistent {IN-SOFTIRQ-R} -> {SOFTIRQ-ON-W} usage.
kern  :warn  : [  309.834089] ip/16990 [HC0[0]:SC0[0]:HE1:SE1] takes:
kern  :warn  : [  309.840492] ffff88803171b290 (&s->seqcount#10){+.+-}-{0:0}, at: xfrm_user_rcv_msg+0x135/0x1e0
kern  :warn  : [  309.850616] {IN-SOFTIRQ-R} state was registered at:
kern  :warn  : [  309.857021]   lock_acquire+0xaf/0x380
kern  :warn  : [  309.862214]   xfrm_policy_lookup_inexact_addr+0x101/0x120
kern  :warn  : [  309.869157]   xfrm_policy_find_inexact_candidates+0x50/0xc0
kern  :warn  : [  309.876895]   xfrm_policy_lookup_bytype+0x48a/0x760
kern  :warn  : [  309.883326]   xfrm_lookup_with_ifid+0x212/0xc20
kern  :warn  : [  309.889390]   mld_sendpack+0x187/0x3a0
kern  :warn  : [  309.894657]   mld_ifc_timer_expire+0x1bb/0x360
kern  :warn  : [  309.900603]   call_timer_fn+0xa6/0x2e0
kern  :warn  : [  309.905848]   run_timer_softirq+0x40c/0x5c0
kern  :warn  : [  309.911556]   __do_softirq+0xea/0x4eb
kern  :warn  : [  309.916720]   asm_call_on_stack+0x12/0x20
kern  :warn  : [  309.922222]   do_softirq_own_stack+0x78/0xa0
kern  :warn  : [  309.927976]   irq_exit_rcu+0xcf/0x120
kern  :warn  : [  309.933110]   sysvec_apic_timer_interrupt+0x58/0xe0
kern  :warn  : [  309.939505]   asm_sysvec_apic_timer_interrupt+0x12/0x20
kern  :warn  : [  309.946271]   cpuidle_enter_state+0x110/0x4e0
kern  :warn  : [  309.952154]   cpuidle_enter+0x29/0x40
kern  :warn  : [  309.957344]   do_idle+0x201/0x280
kern  :warn  : [  309.962181]   cpu_startup_entry+0x19/0x20
kern  :warn  : [  309.967725]   start_secondary+0x120/0x160
kern  :warn  : [  309.973257]   secondary_startup_64+0xb6/0xc0
kern  :warn  : [  309.979048] irq event stamp: 5701
kern  :warn  : [  309.983904] hardirqs last  enabled at (5701): [<ffffffff81d96b8a>] syscall_enter_from_user_mode+0x2a/0x2a0
kern  :warn  : [  309.995231] hardirqs last disabled at (5700): [<ffffffff81d916cf>] do_syscall_64+0xf/0x40
kern  :warn  : [  310.005065] softirqs last  enabled at (5688): [<ffffffff81b8b030>] netlink_insert+0x50/0x120
kern  :warn  : [  310.015146] softirqs last disabled at (5686): [<ffffffff81ae0cd9>] release_sock+0x19/0xa0
kern  :warn  : [  310.024945] 
                              other info that might help us debug this:
kern  :warn  : [  310.034639]  Possible unsafe locking scenario:

kern  :warn  : [  310.043674]        CPU0
kern  :warn  : [  310.047673]        ----
kern  :warn  : [  310.051631]   lock(&s->seqcount#10);
kern  :warn  : [  310.056738]   <Interrupt>
kern  :warn  : [  310.060875]     lock(&s->seqcount#10);
kern  :warn  : [  310.066130] 
                               *** DEADLOCK ***

kern  :warn  : [  310.076439] 2 locks held by ip/16990:
kern  :warn  : [  310.081591]  #0: ffff88803171b628 (&net->xfrm.xfrm_cfg_mutex){+.+.}-{3:3}, at: xfrm_netlink_rcv+0x24/0x40
kern  :warn  : [  310.092781]  #1: ffff88803171b2d8 (&(&net->xfrm.policy_hthresh.lock)->lock){+.+.}-{2:2}, at: xfrm_set_spdinfo+0xab/0x160
kern  :warn  : [  310.105327] 
                              stack backtrace:
kern  :warn  : [  310.112731] CPU: 2 PID: 16990 Comm: ip Not tainted 5.9.0-rc2-00048-g1909760f5fc3f #1
kern  :warn  : [  310.122097] Hardware name: Hewlett-Packard HP Pro 3340 MT/17A1, BIOS 8.07 01/24/2013
kern  :warn  : [  310.131472] Call Trace:
kern  :warn  : [  310.135475]  dump_stack+0x8d/0xc0
kern  :warn  : [  310.140377]  mark_lock_irq+0x4f2/0x500
kern  :warn  : [  310.145730]  ? stack_trace_save+0x4b/0x80
kern  :warn  : [  310.151298]  ? save_trace+0x42/0x360
kern  :warn  : [  310.156420]  mark_lock+0x1c1/0x500
kern  :warn  : [  310.161338]  __lock_acquire+0x393/0xb80
kern  :warn  : [  310.166684]  lock_acquire+0xaf/0x380
kern  :warn  : [  310.171732]  ? xfrm_user_rcv_msg+0x135/0x1e0
kern  :warn  : [  310.177509]  xfrm_set_spdinfo+0xd4/0x160
kern  :warn  : [  310.182918]  ? xfrm_user_rcv_msg+0x135/0x1e0
kern  :warn  : [  310.188671]  xfrm_user_rcv_msg+0x135/0x1e0
kern  :warn  : [  310.194248]  ? __mutex_lock+0x21d/0x9e0
kern  :warn  : [  310.199553]  ? preempt_count_sub+0xa1/0xe0
kern  :warn  : [  310.205144]  ? __mutex_lock+0x21d/0x9e0
kern  :warn  : [  310.210457]  ? lock_acquire+0xaf/0x380
kern  :warn  : [  310.215655]  ? netlink_deliver_tap+0x93/0x3e0
kern  :warn  : [  310.221468]  ? xfrm_netlink_rcv+0x24/0x40
kern  :warn  : [  310.226901]  ? xfrm_user_state_lookup+0xc0/0xc0
kern  :warn  : [  310.233909]  netlink_rcv_skb+0x49/0x120
kern  :warn  : [  310.239169]  xfrm_netlink_rcv+0x33/0x40
kern  :warn  : [  310.244425]  netlink_unicast+0x191/0x240
kern  :warn  : [  310.249721]  netlink_sendmsg+0x24f/0x480
kern  :warn  : [  310.255048]  sock_sendmsg+0x5e/0x60
kern  :warn  : [  310.259910]  ____sys_sendmsg+0x1f6/0x260
kern  :warn  : [  310.265207]  ? copy_msghdr_from_user+0x5c/0xa0
kern  :warn  : [  310.271035]  ___sys_sendmsg+0x81/0xc0
kern  :warn  : [  310.276081]  ? lock_acquire+0xaf/0x380
kern  :warn  : [  310.281224]  ? find_held_lock+0x2b/0x80
kern  :warn  : [  310.286438]  ? __might_fault+0x36/0x80
kern  :warn  : [  310.291566]  ? _copy_to_user+0x69/0x80
kern  :warn  : [  310.296684]  ? move_addr_to_user+0xc3/0x100
kern  :warn  : [  310.302249]  __sys_sendmsg+0x59/0xa0
kern  :warn  : [  310.307188]  ? lockdep_hardirqs_on+0x7d/0x100
kern  :warn  : [  310.312911]  do_syscall_64+0x33/0x40
kern  :warn  : [  310.317857]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
kern  :warn  : [  310.324292] RIP: 0033:0x7fc920c9e914
kern  :warn  : [  310.329272] Code: 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b5 0f 1f 80 00 00 00 00 48 8d 05 e9 5d 0c 00 8b 00 85 c0 75 13 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 41 54 41 89 d4 55 48 89 f5 53
kern  :warn  : [  310.351209] RSP: 002b:00007fff0c088ff8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
kern  :warn  : [  310.360381] RAX: ffffffffffffffda RBX: 000000005f6a1c6c RCX: 00007fc920c9e914
kern  :warn  : [  310.369104] RDX: 0000000000000000 RSI: 00007fff0c089060 RDI: 0000000000000006
kern  :warn  : [  310.377830] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000006
kern  :warn  : [  310.386538] R10: fffffffffffff1f9 R11: 0000000000000246 R12: 0000000000000001
kern  :warn  : [  310.395277] R13: 00007fff0c089140 R14: 00007fff0c08b436 R15: 00007fff0c08b445
user  :notice: [  332.480919] # PASS: ping to .254 bypassed ipsec tunnel (exceptions and block policies after hresh changes)

user  :notice: [  332.549293] # PASS: direct policy matches (exceptions and block policies after hresh changes)

user  :notice: [  332.617915] # PASS: policy matches (exceptions and block policies after hresh changes)


To reproduce:

        git clone https://github.com/intel/lkp-tests.git
        cd lkp-tests
        bin/lkp install job.yaml  # job file is attached in this email
        bin/lkp run     job.yaml



Thanks,
lkp


View attachment "config-5.9.0-rc2-00048-g1909760f5fc3f" of type "text/plain" (209866 bytes)

View attachment "job-script" of type "text/plain" (6596 bytes)

Download attachment "kmsg.xz" of type "application/x-xz" (67176 bytes)

View attachment "kernel-selftests" of type "text/plain" (196977 bytes)

View attachment "job.yaml" of type "text/plain" (5769 bytes)

View attachment "reproduce" of type "text/plain" (129 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ