ipv4: fix the rcu race between free_fib_info and ip_route_output_slow

We hit a kernel OOPS.

<3>[23898.789643] BUG: sleeping function called from invalid context at
/data/buildbot/workdir/ics/hardware/intel/linux-2.6/arch/x86/mm/fault.c:1103
<3>[23898.862215] in_atomic(): 0, irqs_disabled(): 0, pid: 10526, name:
Thread-6683
<4>[23898.967805] HSU serial 0000:00:05.1: 0000:00:05.2:HSU serial prevented me
to suspend...
<4>[23899.258526] Pid: 10526, comm: Thread-6683 Tainted: G        W
3.0.8-137685-ge7742f9 #1
<4>[23899.357404] HSU serial 0000:00:05.1: 0000:00:05.2:HSU serial prevented me
to suspend...
<4>[23899.904225] Call Trace:
<4>[23899.989209]  [<c1227f50>] ? pgtable_bad+0x130/0x130
<4>[23900.000416]  [<c1238c2a>] __might_sleep+0x10a/0x110
<4>[23900.007357]  [<c1228021>] do_page_fault+0xd1/0x3c0
<4>[23900.013764]  [<c18e9ba9>] ? restore_all+0xf/0xf
<4>[23900.024024]  [<c17c007b>] ? napi_complete+0x8b/0x690
<4>[23900.029297]  [<c1227f50>] ? pgtable_bad+0x130/0x130
<4>[23900.123739]  [<c1227f50>] ? pgtable_bad+0x130/0x130
<4>[23900.128955]  [<c18ea0c3>] error_code+0x5f/0x64
<4>[23900.133466]  [<c1227f50>] ? pgtable_bad+0x130/0x130
<4>[23900.138450]  [<c17f6298>] ? __ip_route_output_key+0x698/0x7c0
<4>[23900.144312]  [<c17f5f8d>] ? __ip_route_output_key+0x38d/0x7c0
<4>[23900.150730]  [<c17f63df>] ip_route_output_flow+0x1f/0x60
<4>[23900.156261]  [<c181de58>] ip4_datagram_connect+0x188/0x2b0
<4>[23900.161960]  [<c18e981f>] ? _raw_spin_unlock_bh+0x1f/0x30
<4>[23900.167834]  [<c18298d6>] inet_dgram_connect+0x36/0x80
<4>[23900.173224]  [<c14f9e88>] ? _copy_from_user+0x48/0x140
<4>[23900.178817]  [<c17ab9da>] sys_connect+0x9a/0xd0
<4>[23900.183538]  [<c132e93c>] ? alloc_file+0xdc/0x240
<4>[23900.189111]  [<c123925d>] ? sub_preempt_count+0x3d/0x50

Function free_fib_info resets nexthop_nh->nh_dev to NULL before releasing
fi. Other cpu might be accessing fi. Fixing it by delaying the releasing.

With the patch, we ran MTBF testing on Android mobile for 12 hours
and didn't trigger the issue.

Thank Eric for very detailed review/checking the issue.

CRs-fixed: 430941
Change-Id: I14480ff9085a8e13fe43ea14bfa53fb7b77384b3
Signed-off-by: Yanmin Zhang <yanmin_zhang@linux.intel.com>
Signed-off-by: Kun Jiang <kunx.jiang@intel.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-commit: e49cc0da7283088c5e03d475ffe2fdcb24a6d5b1
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
msm: display: timeout setting for waiting

Correct timeout value calculation for wait_for_expect_vsync.
Reduce timeout for wait_for_pan_idle so that display can print
out message before SF times out.

Change-Id: Iecbfc82d04d5a6643577897e00078291d5fb74c1
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
msm: display: fence log

Add log when fence time out to track why
fence is not signaled.

Change-Id: Id269ea32cd5c38afcd8dc770109040064e8c50af
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
msm: display: mdp idle detection

Take commit count into account, make sure all pending
commit is done.

Change-Id: I28d1affc2537f9304701a581da39de295ca0fe7a
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Throttle usb irq's

CRs-fixed: 554572
Change-Id: I57d4f48ca8501b604374650e3ee63669c6fd77a1
Signed-off-by: Parth Dixit <parthd@codeaurora.org>
msm_fb: hdmi: Fix HDMI Compliance 7-23 failure

1) csc_init was not getting called as there was no
mdp reset detected, which in turn not setting the
quantization variable

2) AVI Info frame has to be configure as below for
RGB quantization
RGB Limited: Q1 = 0; Q0 = 1;
   RGB Full: Q1 = 1; Q0 = 0;

Change-Id: I8572030b6fc4a3579727314c7508884329543a6f
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
bluetooth: Add support to configure page scan type and interval

Enable interlaced page scan by default and set page scan interval to 300 ms
after BT ON. After Hurley Remote HID connection is successful, change the
page scan interval to 1.28 seconds and page scan type to normal scan.
On disconnection of Hurley, enable interlaced page scan and configure the
page scan interval to 300 msec.

Change-Id: Ic7af75ed212f58d8486c80c5c0240ad84fbc128a
Signed-off-by: Anantha Krishnan <ananthk@codeaurora.org>
Merge "Throttle usb irq's"
ASoC: msm: qdsp6: don't assume playback started

If pcm device closes without pcm playback start, EOS command won't
be issued therefore pcm_close shouldn't wait for EOS event's completion.
Fix to avoid waiting for EOS command completion when command wasn't issued.

Change-Id: I7a18d683c40d567e764f397e5201123e4d89b944
CRs-fixed: 549284
Signed-off-by: Vivek Veenam <vveenam@codeaurora.org>
Merge "bluetooth: Add support to configure page scan type and interval"
Merge "ipv4: fix the rcu race between free_fib_info and ip_route_output_slow"
Merge "msm: display: timeout setting for waiting"
Merge "msm: display: fence log"
Merge "msm: display: mdp idle detection"
Merge "ASoC: msm: qdsp6: don't assume playback started"
Merge "msm_fb: hdmi: Fix HDMI Compliance 7-23 failure"