msm: Make CONFIG_STRICT_MEMORY_RWX even stricter

If CONFIG_STRICT_MEMORY_RWX was set, the first section (containing
the kernel page table and the initial code) and the section
containing the init code were both given RWX permission, which is
a potential security hole.

Pad the first section after the initial code (which will never
be executed when the MMU is on) to make the rest of the kernel
text start in the second section and make the first section RW.

Move some data which had ended up in the "init text"
section into the "init data" one, as this is RW, not RX.
Make the "init text" RX.

We will not free the section containing the "init text",
because if we do, the kernel will allocate memory for RW data there.

Change-Id: I6ca5f4e07342c374246f04a3fee18042fd47c33b
CRs-fixed: 513919
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
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
msm: mdm_common: mdm2ap gpio status during boot

Before the mdm is sent the power on ioctl, we check
for the mdm2ap gpio status. Print the status so as
know whether it is already booted "high" or is it
"Low".

Change-Id: I12f5b503fd00311579638cfabd517241d99c24ed
Signed-off-by: Taniya Das <tdas@codeaurora.org>
msm: mdm_common: Add check for the mdm_ready flag

There could be a possibility that mdm2ap_status change
interrupt triggered before mdm_ready flag is set to 1
due to a glitch on the GPIO line. This could be safely
ignored as the MDM is not completely powered on.

Change-Id: I63779858bf20747bb96b12d61073c04c42ee04ec
Signed-off-by: Ramesh Gupta Guntha <rggupt@codeaurora.org>
Revert "power: Changes to work with open source charger"

This reverts commit da3a659c7e25e8cbb3f73df173e5f3491a0cd80b.

Change-Id: I89a8ff56f353cab7ddc769dffa99c17cfe4f6ea7
pm8921-sec-charger: Return 0 when no cable inserted

Change-Id: I32d1a7b2ab6ecd5050a916c3daf38a560f3ce039
USB: gadget: u_ctrl_hsic: fix a bug in control bits propagation

A work is scheduled to open the hsic transport channel upon
USB cable connect.  If the host sends SET_CONTROL_LINE_STATE
control transfer before the port is opened, the control bits
are not propagated to the mdm.

CRs-Fixed: 556039
Change-Id: Ic60830d2b04327c9ea9ded84e66b8eb7b92aee82
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>