Revision da9846ae15186d491d6e21ebbb5051e1d3c7f652 authored by Tejun Heo on 29 January 2014, 17:04:03 UTC, committed by Greg Kroah-Hartman on 05 February 2014, 19:44:04 UTC
kernfs_deactivate() forgot to check whether KERNFS_LOCKDEP is set before performing lockdep annotations and ends up feeding uninitialized lockdep_map to lockdep triggering warning like the following on USB stick hotunplug. usb 1-2: USB disconnect, device number 2 INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 1 PID: 62 Comm: khubd Not tainted 3.13.0-work+ #82 Hardware name: empty empty/S3992, BIOS 080011 10/26/2007 ffff880065ca7f60 ffff88013a4ffa08 ffffffff81cfb6bd 0000000000000002 ffff88013a4ffac8 ffffffff810f8530 ffff88013a4fc710 0000000000000002 ffff880100000000 ffffffff82a3db50 0000000000000001 ffff88013a4fc710 Call Trace: [<ffffffff81cfb6bd>] dump_stack+0x4e/0x7a [<ffffffff810f8530>] __lock_acquire+0x1910/0x1e70 [<ffffffff810f931a>] lock_acquire+0x9a/0x1d0 [<ffffffff8127c75e>] kernfs_deactivate+0xee/0x130 [<ffffffff8127d4c8>] kernfs_addrm_finish+0x38/0x60 [<ffffffff8127d701>] kernfs_remove_by_name_ns+0x51/0xa0 [<ffffffff8127b4f1>] remove_files.isra.1+0x41/0x80 [<ffffffff8127b7e7>] sysfs_remove_group+0x47/0xa0 [<ffffffff8127b873>] sysfs_remove_groups+0x33/0x50 [<ffffffff8177d66d>] device_remove_attrs+0x4d/0x80 [<ffffffff8177e25e>] device_del+0x12e/0x1d0 [<ffffffff819722c2>] usb_disconnect+0x122/0x1a0 [<ffffffff819749b5>] hub_thread+0x3c5/0x1290 [<ffffffff810c6a6d>] kthread+0xed/0x110 [<ffffffff81d0a56c>] ret_from_fork+0x7c/0xb0 Fix it by making kernfs_deactivate() perform lockdep annotations only if KERNFS_LOCKDEP is set. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Fabio Estevam <festevam@gmail.com> Reported-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: Jiri Kosina <jkosina@suse.cz> Reported-by: Dave Jones <davej@redhat.com> Tested-by: Fabio Estevam <fabio.estevam@freescale.com> Tested-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 38dbfb5
File | Mode | Size |
---|---|---|
netfilter | ||
Kconfig | -rw-r--r-- | 20.8 KB |
Makefile | -rw-r--r-- | 2.3 KB |
af_inet.c | -rw-r--r-- | 45.0 KB |
ah4.c | -rw-r--r-- | 12.4 KB |
arp.c | -rw-r--r-- | 35.4 KB |
cipso_ipv4.c | -rw-r--r-- | 63.2 KB |
datagram.c | -rw-r--r-- | 2.7 KB |
devinet.c | -rw-r--r-- | 57.5 KB |
esp4.c | -rw-r--r-- | 16.3 KB |
fib_frontend.c | -rw-r--r-- | 27.2 KB |
fib_lookup.h | -rw-r--r-- | 1.4 KB |
fib_rules.c | -rw-r--r-- | 8.0 KB |
fib_semantics.c | -rw-r--r-- | 31.0 KB |
fib_trie.c | -rw-r--r-- | 60.8 KB |
gre_demux.c | -rw-r--r-- | 8.3 KB |
gre_offload.c | -rw-r--r-- | 6.9 KB |
icmp.c | -rw-r--r-- | 27.0 KB |
igmp.c | -rw-r--r-- | 65.8 KB |
inet_connection_sock.c | -rw-r--r-- | 26.0 KB |
inet_diag.c | -rw-r--r-- | 28.2 KB |
inet_fragment.c | -rw-r--r-- | 8.6 KB |
inet_hashtables.c | -rw-r--r-- | 15.6 KB |
inet_lro.c | -rw-r--r-- | 9.3 KB |
inet_timewait_sock.c | -rw-r--r-- | 14.5 KB |
inetpeer.c | -rw-r--r-- | 17.7 KB |
ip_forward.c | -rw-r--r-- | 3.4 KB |
ip_fragment.c | -rw-r--r-- | 20.2 KB |
ip_gre.c | -rw-r--r-- | 22.2 KB |
ip_input.c | -rw-r--r-- | 13.4 KB |
ip_options.c | -rw-r--r-- | 15.2 KB |
ip_output.c | -rw-r--r-- | 38.1 KB |
ip_sockglue.c | -rw-r--r-- | 31.8 KB |
ip_tunnel.c | -rw-r--r-- | 25.7 KB |
ip_tunnel_core.c | -rw-r--r-- | 3.6 KB |
ip_vti.c | -rw-r--r-- | 9.9 KB |
ipcomp.c | -rw-r--r-- | 4.5 KB |
ipconfig.c | -rw-r--r-- | 39.1 KB |
ipip.c | -rw-r--r-- | 13.1 KB |
ipmr.c | -rw-r--r-- | 63.7 KB |
netfilter.c | -rw-r--r-- | 5.3 KB |
ping.c | -rw-r--r-- | 28.9 KB |
proc.c | -rw-r--r-- | 19.1 KB |
protocol.c | -rw-r--r-- | 2.3 KB |
raw.c | -rw-r--r-- | 24.9 KB |
route.c | -rw-r--r-- | 66.1 KB |
syncookies.c | -rw-r--r-- | 10.5 KB |
sysctl_net_ipv4.c | -rw-r--r-- | 21.9 KB |
tcp.c | -rw-r--r-- | 82.9 KB |
tcp_bic.c | -rw-r--r-- | 6.2 KB |
tcp_cong.c | -rw-r--r-- | 9.8 KB |
tcp_cubic.c | -rw-r--r-- | 14.0 KB |
tcp_diag.c | -rw-r--r-- | 1.8 KB |
tcp_fastopen.c | -rw-r--r-- | 2.4 KB |
tcp_highspeed.c | -rw-r--r-- | 4.9 KB |
tcp_htcp.c | -rw-r--r-- | 7.4 KB |
tcp_hybla.c | -rw-r--r-- | 4.9 KB |
tcp_illinois.c | -rw-r--r-- | 8.2 KB |
tcp_input.c | -rw-r--r-- | 166.4 KB |
tcp_ipv4.c | -rw-r--r-- | 72.9 KB |
tcp_lp.c | -rw-r--r-- | 8.8 KB |
tcp_memcontrol.c | -rw-r--r-- | 5.4 KB |
tcp_metrics.c | -rw-r--r-- | 30.1 KB |
tcp_minisocks.c | -rw-r--r-- | 23.9 KB |
tcp_offload.c | -rw-r--r-- | 7.4 KB |
tcp_output.c | -rw-r--r-- | 91.8 KB |
tcp_probe.c | -rw-r--r-- | 7.4 KB |
tcp_scalable.c | -rw-r--r-- | 1.4 KB |
tcp_timer.c | -rw-r--r-- | 18.3 KB |
tcp_vegas.c | -rw-r--r-- | 9.6 KB |
tcp_vegas.h | -rw-r--r-- | 867 bytes |
tcp_veno.c | -rw-r--r-- | 5.7 KB |
tcp_westwood.c | -rw-r--r-- | 8.0 KB |
tcp_yeah.c | -rw-r--r-- | 7.0 KB |
tunnel4.c | -rw-r--r-- | 4.1 KB |
udp.c | -rw-r--r-- | 64.6 KB |
udp_diag.c | -rw-r--r-- | 5.4 KB |
udp_impl.h | -rw-r--r-- | 1.2 KB |
udp_offload.c | -rw-r--r-- | 6.0 KB |
udplite.c | -rw-r--r-- | 3.4 KB |
xfrm4_input.c | -rw-r--r-- | 4.1 KB |
xfrm4_mode_beet.c | -rw-r--r-- | 3.7 KB |
xfrm4_mode_transport.c | -rw-r--r-- | 2.1 KB |
xfrm4_mode_tunnel.c | -rw-r--r-- | 4.7 KB |
xfrm4_output.c | -rw-r--r-- | 2.4 KB |
xfrm4_policy.c | -rw-r--r-- | 7.3 KB |
xfrm4_state.c | -rw-r--r-- | 2.4 KB |
xfrm4_tunnel.c | -rw-r--r-- | 2.7 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...