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: <20171109131826.liznnmjvsccbxlwh@wfg-t540p.sh.intel.com>
Date:   Thu, 9 Nov 2017 21:18:26 +0800
From:   Fengguang Wu <fengguang.wu@...el.com>
To:     Vivien Didelot <vivien.didelot@...oirfairelinux.com>
Cc:     Florian Fainelli <f.fainelli@...il.com>, LKP <lkp@...org>,
        netdev@...r.kernel.org
Subject: 8e5bf9759a ("net: dsa: simplify tree reference counting"): WARNING:
 CPU: 0 PID: 20 at lib/refcount.c:153 refcount_inc

Greetings,

0day kernel testing robot got the below dmesg and the first bad commit is

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master

commit 8e5bf9759a06be2251fa96cfd8b412f1808c62f9
Author:     Vivien Didelot <vivien.didelot@...oirfairelinux.com>
AuthorDate: Fri Nov 3 19:05:22 2017 -0400
Commit:     David S. Miller <davem@...emloft.net>
CommitDate: Sun Nov 5 22:31:38 2017 +0900

     net: dsa: simplify tree reference counting
     
     DSA trees have a refcount used to automatically free the dsa_switch_tree
     structure once there is no switch devices inside of it.
     
     The refcount is incremented when a switch is added to the tree, and
     decremented when it is removed from it.
     
     But because of kref_init, the refcount is also incremented at
     initialization, and when looking up the tree from the list for symmetry.
     
     Thus the current code stores the number of switches plus one, and makes
     the switch registration more complex.
     
     To simplify the switch registration function, we reset the refcount to
     zero after initialization and don't increment it when looking up a tree.
     
     Signed-off-by: Vivien Didelot <vivien.didelot@...oirfairelinux.com>
     Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
     Signed-off-by: David S. Miller <davem@...emloft.net>

49463b7f2d  net: dsa: make tree index unsigned
8e5bf9759a  net: dsa: simplify tree reference counting
5515cf16e2  Add linux-next specific files for 20171109
+-----------------------------------------+------------+------------+---------------+
|                                         | 49463b7f2d | 8e5bf9759a | next-20171109 |
+-----------------------------------------+------------+------------+---------------+
| boot_successes                          | 35         | 0          | 0             |
| boot_failures                           | 0          | 15         | 11            |
| WARNING:at_lib/refcount.c:#refcount_inc | 0          | 15         | 11            |
| RIP:refcount_inc                        | 0          | 15         | 11            |
+-----------------------------------------+------------+------------+---------------+

[    9.656799] Btrfs loaded, crc32c=crc32c-intel, assert=on
[    9.658346] Key type encrypted registered
[    9.660791] dsa-loop fixed-0:1f: DSA mockup driver: 0x1f
[    9.662114] refcount_t: increment on 0; use-after-free.
[    9.663520] ------------[ cut here ]------------
[    9.664754] WARNING: CPU: 0 PID: 20 at lib/refcount.c:153 refcount_inc+0x25/0x30
[    9.666966] CPU: 0 PID: 20 Comm: kworker/0:1 Not tainted 4.14.0-rc7-02139-g8e5bf97 #1
[    9.668905] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
[    9.670957] Workqueue: events deferred_probe_work_func
[    9.672289] task: ffff88001eabe500 task.stack: ffffc90000198000
[    9.673711] RIP: 0010:refcount_inc+0x25/0x30
[    9.674810] RSP: 0000:ffffc9000019bd18 EFLAGS: 00010286
[    9.676094] RAX: 000000000000002b RBX: ffff88001b591028 RCX: ffffc9000019bbc4
[    9.677744] RDX: 0000000000000005 RSI: 0000000000000005 RDI: 0000000000000282
[    9.679382] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[    9.681031] R10: 0000000000000001 R11: ffff88001fa19c10 R12: ffff88001b9e4000
[    9.682691] R13: 0000000000000000 R14: 0000000000000000 R15: ffff88001b9e4000
[    9.684328] FS:  0000000000000000(0000) GS:ffff88001fa00000(0000) knlGS:0000000000000000
[    9.686297] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    9.687680] CR2: 0000000000000000 CR3: 0000000002866001 CR4: 00000000000606b0
[    9.689331] Call Trace:
[    9.690141]  dsa_register_switch+0x360/0x9e0
[    9.691258]  driver_probe_device+0x127/0x290
[    9.692363]  ? __driver_attach+0x90/0x90
[    9.693445]  bus_for_each_drv+0x47/0x90
[    9.694464]  __device_attach+0x9e/0x120
[    9.695480]  bus_probe_device+0x2f/0xb0
[    9.696486]  deferred_probe_work_func+0xf7/0x130
[    9.697672]  process_one_work+0x1e6/0x380
[    9.698724]  ? process_one_work+0x181/0x380
[    9.699815]  worker_thread+0x212/0x3e0
[    9.700819]  kthread+0x11d/0x130
[    9.701721]  ? process_one_work+0x380/0x380
[    9.702803]  ? __kthread_bind+0x20/0x20
[    9.703861]  ret_from_fork+0x25/0x30
[    9.704833] Code: 84 00 00 00 00 00 e8 9b ff ff ff 84 c0 75 1e 80 3d 2e 00 42 01 00 75 15 48 c7 c7 a0 59 53 82 c6 05 1e 00 42 01 01 e8 35 81 b4 ff <0f> ff f3 c3 0f 1f 80 00 00 00 00 8b 06 83 f8 ff 74 21 89 c2 29 
[    9.710928] ---[ end trace b4b78a6eddba01af ]---
[    9.712114] DSA: switch 0 0 parsed

                                                           # HH:MM RESULT GOOD BAD GOOD_BUT_DIRTY DIRTY_NOT_BAD
git bisect start 7c61de1b17f79a6292566f25b7796b720dd470e2 0b07194bb55ed836c2cc7c22e866b87a14681984 --
git bisect  bad a9fc4d32ee5cfd9434d59ea0d663414980dbf1fe  # 11:18  B      0     3   16   0  Merge 'slave-dma/next' into devel-catchup-201711090607
git bisect good 360082fba943f9a888fc4bfca0b4fbb5798d9918  # 11:35  G     11     0    0   0  Merge 'integrity/security-next-integrity' into devel-catchup-201711090607
git bisect  bad 3fe4dc6efecd1456b202879edec4a84d9bb4496e  # 11:45  B      0     2   14   0  Merge 'vhost/vhost' into devel-catchup-201711090607
git bisect  bad 5bef566f11eeb836f53ffc2035a3c7f57ecdc496  # 12:00  B      0     2   14   0  Merge 'wireless-testsing2/master' into devel-catchup-201711090607
git bisect good 5d02523b20de880a9d068848f0290c25444d6d5e  # 12:46  G     11     0    0   0  Merge 'net/master' into devel-catchup-201711090607
git bisect good 41e9475c325a3643572639283318b0a07bbb8e0b  # 13:16  G     11     0    0   0  hamradio/scc: Convert timers to use timer_setup()
git bisect good 27887bc7cb7fc5a0a3b8f4b0f27b332c8121515b  # 13:31  G     11     0    0   0  cxgb4: collect hardware LA dumps
git bisect good 1495dc9f0a711a54f8fec849ce7f3a8f585a11e5  # 14:32  G     11     0    0   0  security: bpf: replace include of linux/bpf.h with forward declarations
git bisect good 6e300769dcbaba7bfacbc02ec9c3fcc595eec755  # 15:25  G     11     0    0   0  Merge tag 'wireless-drivers-next-for-davem-2017-11-03' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
git bisect  bad bfe26ba94cb7524534a7922e1c7432d0dbb5be2e  # 15:37  B      0    11   23   0  Merge branch 'nfp-ethtool-and-related-improvements'
git bisect good c1c88eae8a8155c55dbbc7363f1f127c43e1b5d1  # 16:05  G     11     0    0   0  nfp: bpf: move program prepare and free into offload.c
git bisect  bad 0eefe2c1730020c6207bc9695fd466e558301dbb  # 16:56  B      0    11   27   4  net: dsa: get tree before parsing ports
git bisect good 952484610cc2f67303be4feedb0e52a519c31470  # 17:59  G     11     0    0   0  liquidio: do not consider packets dropped by network stack as driver Rx dropped
git bisect  bad 8e5bf9759a06be2251fa96cfd8b412f1808c62f9  # 18:36  B      0     3   19   4  net: dsa: simplify tree reference counting
git bisect good 49463b7f2da1a115404b02c5533bc2c2125833a3  # 18:55  G     11     0    0   0  net: dsa: make tree index unsigned
# first bad commit: [8e5bf9759a06be2251fa96cfd8b412f1808c62f9] net: dsa: simplify tree reference counting
git bisect good 49463b7f2da1a115404b02c5533bc2c2125833a3  # 19:21  G     31     0    0   0  net: dsa: make tree index unsigned
# extra tests with CONFIG_DEBUG_INFO_REDUCED
git bisect  bad 8e5bf9759a06be2251fa96cfd8b412f1808c62f9  # 20:15  B      0    11   28   4  net: dsa: simplify tree reference counting
# extra tests on HEAD of linux-devel/devel-catchup-201711090607
git bisect  bad 7c61de1b17f79a6292566f25b7796b720dd470e2  # 20:16  B      0   343  358   0  0day head guard for 'devel-catchup-201711090607'
# extra tests on tree/branch linux-next/master
git bisect  bad 5515cf16e270538121e4fa9283fed86c6cfd8c9c  # 20:32  B      0    11   23   0  Add linux-next specific files for 20171109

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/lkp                          Intel Corporation

Download attachment "dmesg-yocto-kbuild-16:20171109181006:x86_64-randconfig-ws0-11090455:4.14.0-rc7-02139-g8e5bf97:1.gz" of type "application/gzip" (24931 bytes)

View attachment "reproduce-yocto-kbuild-16:20171109181006:x86_64-randconfig-ws0-11090455:4.14.0-rc7-02139-g8e5bf97:1" of type "text/plain" (902 bytes)

View attachment "config-4.14.0-rc7-02139-g8e5bf97" of type "text/plain" (129449 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ