From: Greg Kroah-Hartman Date: Wed, 21 Nov 2012 17:46:42 +0000 (-0800) Subject: 3.6-stable patches X-Git-Tag: v3.0.53~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8f2a2d14ecc04a7fd6ad230744a8cb179aabe11f;p=thirdparty%2Fkernel%2Fstable-queue.git 3.6-stable patches added patches: nfc-use-dynamic-initialization-for-rwlocks.patch --- diff --git a/queue-3.6/nfc-use-dynamic-initialization-for-rwlocks.patch b/queue-3.6/nfc-use-dynamic-initialization-for-rwlocks.patch new file mode 100644 index 00000000000..6264ec5fb2c --- /dev/null +++ b/queue-3.6/nfc-use-dynamic-initialization-for-rwlocks.patch @@ -0,0 +1,52 @@ +From fe235b58d517d623bf6d40c77afca1b0ee6fc85d Mon Sep 17 00:00:00 2001 +From: Szymon Janc +Date: Tue, 25 Sep 2012 12:42:50 +0200 +Subject: NFC: Use dynamic initialization for rwlocks + +From: Szymon Janc + +commit fe235b58d517d623bf6d40c77afca1b0ee6fc85d upstream. + +If rwlock is dynamically allocated but statically initialized it is +missing proper lockdep annotation. + +INFO: trying to register non-static key. +the code is fine but needs lockdep annotation. +turning off the locking correctness validator. +Pid: 3352, comm: neard Not tainted 3.5.0-999-nfc+ #2 +Call Trace: +[] __lock_acquire+0x8f6/0x1bf0 +[] ? printk+0x4d/0x4f +[] lock_acquire+0x9d/0x220 +[] ? nfc_llcp_sock_from_sn+0x4e/0x160 +[] _raw_read_lock+0x44/0x60 +[] ? nfc_llcp_sock_from_sn+0x4e/0x160 +[] nfc_llcp_sock_from_sn+0x4e/0x160 +[] nfc_llcp_get_sdp_ssap+0xa7/0x1b0 +[] llcp_sock_bind+0x173/0x210 +[] sys_bind+0xe4/0x100 +[] ? trace_hardirqs_on_thunk+0x3a/0x3f +[] system_call_fastpath+0x16/0x1b + +Signed-off-by: Szymon Janc +Signed-off-by: Samuel Ortiz +Cc: Thomas Gleixner +Signed-off-by: Greg Kroah-Hartman + +--- + net/nfc/llcp/llcp.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/net/nfc/llcp/llcp.c ++++ b/net/nfc/llcp/llcp.c +@@ -1182,8 +1182,8 @@ int nfc_llcp_register_device(struct nfc_ + goto err_rx_wq; + } + +- local->sockets.lock = __RW_LOCK_UNLOCKED(local->sockets.lock); +- local->connecting_sockets.lock = __RW_LOCK_UNLOCKED(local->connecting_sockets.lock); ++ rwlock_init(&local->sockets.lock); ++ rwlock_init(&local->connecting_sockets.lock); + + nfc_llcp_build_gb(local); + diff --git a/queue-3.6/series b/queue-3.6/series index 445ea252085..ad8d3d8fb11 100644 --- a/queue-3.6/series +++ b/queue-3.6/series @@ -71,3 +71,4 @@ netfilter-nf_nat-don-t-check-for-port-change-on-icmp-tuples.patch netfilter-xt_tee-don-t-use-destination-address-found-in-header.patch netfilter-nf_conntrack-fix-rt_gateway-checks-for-h.323-helper.patch s390-signal-set-correct-address-space-control.patch +nfc-use-dynamic-initialization-for-rwlocks.patch