Revert "sched/debug: Fix sd->*_idx limit range avoiding overflow"

This reverts commit 86c64334221d525614cb0ffdd2204987a7e51bd9.
Revert "sched/debug: Limit sd->*_idx range on sysctl"

This reverts commit df7f3080152ee1f5d64d6d2fef05d3cad42cae72.
swap: avoid read_swap_cache_async() race to deadlock while waiting on discard I/O completion

commit cbab0e4eec299e9059199ebe6daf48730be46d2b upstream.

read_swap_cache_async() can race against get_swap_page(), and stumble
across a SWAP_HAS_CACHE entry in the swap map whose page wasn't brought
into the swapcache yet.

This transient swap_map state is expected to be transitory, but the
actual placement of discard at scan_swap_map() inserts a wait for I/O
completion thus making the thread at read_swap_cache_async() to loop
around its -EEXIST case, while the other end at get_swap_page() is
scheduled away at scan_swap_map().  This can leave the system deadlocked
if the I/O completion happens to be waiting on the CPU waitqueue where
read_swap_cache_async() is busy looping and !CONFIG_PREEMPT.

This patch introduces a cond_resched() call to make the aforementioned
read_swap_cache_async() busy loop condition to bail out when necessary,
thus avoiding the subtle race window.

Signed-off-by: Rafael Aquini <aquini@redhat.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Hugh Dickins <hughd@google.com>
Cc: Shaohua Li <shli@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers: modem_if: bring back usb_modem_state for P4LTE
drivers: modem_if: bring back change_modem_state for P4LTE
wireless: bcmdhd: samsung: rename FW file to bcmdhd
defconfig: jb: rename FW file to bcmdhd
drivers: modem_if: don't wait_enumeration in if_usb_disconnect for P4LTE
perf: Treat attr.config as u64 in perf_swevent_init()

Trinity discovered that we fail to check all 64 bits of
attr.config passed by user space, resulting to out-of-bounds
access of the perf_swevent_enabled array in
sw_perf_event_destroy().

Introduced in commit b0a873ebb ("perf: Register PMU
implementations").

Signed-off-by: Tommi Rantala <tt.rantala@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: davej@redhat.com
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Link: http://lkml.kernel.org/r/1365882554-30259-1-git-send-email-tt.rantala@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Revert "drivers: modem_if: don't wait_enumeration in if_usb_disconnect for P4LTE"

This reverts commit e0c09f5e7fdba7b128b0b9e3ffb6a15f2df6ffa6.
drivers: modem_if: omit cbp71_force_crash_exit for P4LTE

-set STATE_CRASH_EXIT if disconnected and not enumerated for some time.
net: force a reload of first item in hlist_nulls_for_each_entry_rcu

[ Upstream commit c87a124a5d5e8cf8e21c4363c3372bcaf53ea190 ]

Roman Gushchin discovered that udp4_lib_lookup2() was not reloading
first item in the rcu protected list, in case the loop was restarted.

This produced soft lockups as in https://lkml.org/lkml/2013/4/16/37

rcu_dereference(X)/ACCESS_ONCE(X) seem to not work as intended if X is
ptr->field :

In some cases, gcc caches the value or ptr->field in a register.

Use a barrier() to disallow such caching, as documented in
Documentation/atomic_ops.txt line 114

Thanks a lot to Roman for providing analysis and numerous patches.

Diagnosed-by: Roman Gushchin <klamm@yandex-team.ru>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Boris Zhmurov <zhmurov@yandex-team.ru>
Signed-off-by: Roman Gushchin <klamm@yandex-team.ru>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Revert "video: tegra: dc: add tracing information"

This reverts commit a60c525119bfbe1b4f2fa5655be0d087dfa4017b.

Conflicts:
	drivers/video/tegra/dc/dc.c
drivers: tegra: host: remove tracing
Revert "video: tegra: dc: Fix the check of dirty window."

This reverts commit c87f1c9971649748d137cd3f49999d24592d08ef.
Revert "video: tegra: dc: fix bug causing drawing before flipping"

This reverts commit 7918e624a18f35261a73068076e01237ebc30914.
Merge remote-tracking branch 'g31/cm-10.1' into infamous-jb42

Conflicts:
	arch/arm/configs/pershoot_samsung_p3-jb_defconfig

Change-Id: I2808d9599be5e727b6538ab96fc23c9dc4e8c52e
Bump kernel version to 2.4

Change-Id: I2a307d6a6e7081c96cbc79ab088f8232cac0852c