workqueue: cond_resched() after processing each work item
This becomes dangerous when a self-requeueing work item which is
waiting for something to happen races against stop_machine.  Such
self-requeueing work item would requeue itself indefinitely hogging
the kworker and CPU it's running on while stop_machine would wait for
that CPU to enter stop_machine while preventing anything else from
happening on all other CPUs.  The two would deadlock.

Jamie Liu reports that this deadlock scenario exists around
scsi_requeue_run_queue() and libata port multiplier support, where one
port may exclude command processing from other ports.  With the right
timing, scsi_requeue_run_queue() can end up requeueing itself trying
to execute an IO which is asked to be retried while another device has
an exclusive access, which in turn can't make forward progress due to
stop_machine.

Fix it by invoking cond_resched() after executing each work item.
workqueue: cond_resched() after processing each work item
This becomes dangerous when a self-requeueing work item which is
waiting for something to happen races against stop_machine.  Such
self-requeueing work item would requeue itself indefinitely hogging
the kworker and CPU it's running on while stop_machine would wait for
that CPU to enter stop_machine while preventing anything else from
happening on all other CPUs.  The two would deadlock.

Jamie Liu reports that this deadlock scenario exists around
scsi_requeue_run_queue() and libata port multiplier support, where one
port may exclude command processing from other ports.  With the right
timing, scsi_requeue_run_queue() can end up requeueing itself trying
to execute an IO which is asked to be retried while another device has
an exclusive access, which in turn can't make forward progress due to
stop_machine.

Fix it by invoking cond_resched() after executing each work item.

Change-Id: I81a5138542d9d286fd162d4e5814587bbe6f77b0
sync: signal pt before sync_timeline object gets destroyed
There is a race condition

Assume we have *one* sync_fence object, with *one* sync_pt
which belongs to *one* sync_timeline, given this condition,
sync_timeline->kref will have two counts, one for sync_timeline
(implicit) and another for sync_pt.

Assume following is the situation on CPU

Theead-1 : (Thread which calls sync_timeline_destroy())
  -> (some function calls)
   -> sync_timeline_destory()
    -> sync_timeline_signal() (CPU is inside this
function after putting reference to sync_timeline)

At this time Thread-2 comes and does following

Thread-2 : (fclose on fence fd)
> sync_fence_release() -> because of fclose() on fence object
 -> sync_fence_free()
  -> sync_pt_free()
   -> kref_put(&pt->parent->kref, sync_timeline_free);
    -> sync_timeline_free() (CPU is inside this because
this time kref will be zero after _put)

Thread-2 will free sync_timeline object before Thread-1
has finished its work inside sync_timeline_signal.

With this change we signals all sync_pt before putting
reference to sync_timeline object.
random: backport updates from Linux master (3.13-rc4)
lib, net: make isodigit() public and use itAndy Shevchenko
random: add debugging code to detect early use of get_random_bytes()Theodore Ts'o
random: initialize the last_time field in struct timer_rand_stateTheodore Ts'o
random: don't zap entropy count in rand_initialize()Theodore Ts'o
random: printk notifications for urandom pool initializationTheodore Ts'o
random: make add_timer_randomness() fill the nonblocking pool firstTheodore Ts'o
random: convert DEBUG_ENT to tracepointsTheodore Ts'o
random: push extra entropy to the output poolsTheodore Ts'o
random: drop trickle modeTheodore Ts'o
random: adjust the generator polynomials in the mixing function slightlyTheodore Ts'o
random: speed up the fast_mix function by a factor of fourTheodore Ts'o
random: cap the rate which the /dev/urandom pool gets reseededTheodore Ts'o
random: optimize the entropy_store structureTheodore Ts'o
random: optimize spinlock use in add_device_randomness()Theodore Ts'o
random: fix the tracepoint for get_random_bytes(_arch)Theodore Ts'o
random: account for entropy loss due to overwritesH. Peter Anvin
random: allow fractional bits to be trackedH. Peter Anvin
random: statically compute poolbitshift, poolbytes, poolbitsH. Peter Anvin
random: mix in architectural randomness earlier in extract_buf()Theodore Ts'o
random: allow architectures to optionally define random_get_entropy()Theodore Ts'o
random: run random_int_secret_init() run after all late_initcallsTheodore Ts'o
char: Convert use of typedef ctl_table to struct ctl_tableJoe Perches1
random: fix accounting race condition with lockless irq entropy_count updateJiri Kosina
drivers/char/random.c: fix priming of last_dataJarod Wilson
lib/string_helpers: introduce generic string_unescapeAndy Shevchenko
random: fix locking dependency with the tasklist_lockTheodore Ts'o
locking: Various static lock initializer fixesThomas Gleixner
random: prime last_data value per fips requirementsJarod Wilson
random: fix debug format stringsJiri Kosina
random: make it possible to enable debugging without rebuildJiri Kosina
random: mix in architectural randomness in extract_buf()H. Peter Anvin
random: Add comment to random_initialize()Tony Luck
random: add tracepoints for easier debugging and verificationTheodore Ts'o
Network/Wifi Patchset - downgrade/edit all wifi and networtk drivers for power efficient usage
lib: Update RWSEM to Linux 3.10

See: https://github.com/mathkid95/linux_lg_kitkat/commit/822d4d84ffa2a41f752deca4ca54b4cee0264850#diff-f11e0db46d774c3e9b410a0b38991328R130
Added BITS_PER_LONG_LONG definition avoiding lib/vsprintf.c errors.
Makefile: Use O3 compiler optimizations
tweak the min/mnax readahead value
Set SLAB memory allocation as default
staging: lmk: back to good old JBX modifed lmk version

Change-Id: Ia4609e66f0ad8b39772619da3844cc934dcb4086
staging/lmk: Ignore tasks with freed mm
A killed task can stay in the task list long after its
memory has been returned to the system, therefore
ignore any tasks whose mm struct has been freed.
Network/Wifi Patchset 2 - Additional fixes and drivers after prior Patchset commit
Added todays changelog and updated full history