sync: Fix a race condition between release_obj and print_obj

Before this change, a timeline would only be removed from the timeline
list *after* the sync driver had its release_obj() called. However, the
driver's release_obj() may free resources needed by print_obj().

Although the timeline list is locked when print_obj() is called, it is
not locked when release_obj() is called. If one CPU was in print_obj()
when another was in release_obj(), the print_obj() may make unsafe
accesses.

It is not actually necessary to hold the timeline list lock when calling
release_obj() if the call is made after the timeline is unlinked from
the list, since there is no possibility another thread could be in --
or enter -- print_obj() for that timeline.

This change moves the release_obj() call to after the timeline is
unlinked, preventing the above race from occurring.

Signed-off-by: Alistair Strachan <alistair.strachan@imgtec.com>
msm-camera: fix to prevent untrusted pointer to lead DoS in Actuator

fix to prevent untrusted userspace pointer in actuator kernel
driver to lead DoS in actuator driver

Change-Id: If9dcba3d4871ca98f78542f8bfb1623a02032f0d
CRs-Fixed: 547231
Signed-off-by: Katta Santhisindhu <kattas@codeaurora.org>
Revert "mmc: core: handle flush requests timeout"

This reverts commit 47671c3dd2e46b49d7f46e469d494a22512463ba.
Revert "msm: rpm-smd: Configure WQ for higer priority"

This reverts commit cb4614564cc942ebcb60e2ec53dec5bc7cb92d43.
Revert "workqueue: reimplement WQ_HIGHPRI using a separate worker_pool"

This reverts commit 0d2502128edd69050987e0f5be4be885b0222358.
Revert "workqueue: introduce NR_WORKER_POOLS and for_each_worker_pool()"

This reverts commit 4e199341306dd50f78432ced926ec807f6dbd483.
Revert "workqueue: separate out worker_pool flags"

This reverts commit 960f92d12e10ac0b7268f5546c21a35f71b6454b.
Revert "workqueue: use @pool instead of @gcwq or @cpu where applicable"

This reverts commit 2332f5d2be46d14c89787bd8238f22b086885449.
Revert "workqueue: factor out worker_pool from global_cwq"

This reverts commit d9e1e2c3f3b257c820587ab292d5af1d0c971877.
Revert "workqueue: don't use WQ_HIGHPRI for unbound workqueues"

This reverts commit a8debbedfbdbba3db4f08b13df150fc549b7bfc5.
power: Changes to work with open source charger

Change-Id: I019ef409bf4684db632b8c8ee0e0e24a39aed374