platform: msm: Clear BAM pipe pointer after USB disconnect

When the USB port is disocnnected from the host, all the BAM pipes are
closed and pipe data structure is freed. However, the pointer to this
structure has remained with a stale value. This has led to crashes after
re-connection since this pointer has been referenced again. Setting the
pointer value to NULL resolves this since there are NULL value checks
before this pointer is accessed.

Change-Id: I71db45d795f813b1f65af37756b9fe570b9b93d0
CRs-fixed: 576789
Signed-off-by: Danny Segal <dsegal@codeaurora.org>
mmc: core : fix arbitrary read/write to user space

In the MMC card debug_fs the read and write handlers use the strlcat
and sscanf, without checking the pointer given.
Since the pointer is not checked it is possible to write
everywhere (ring 0 or 3).
In order to fix it, an access_ok function is being used to verify
the buffer's pointer supplied by user is valid.

CRs-fixed: 545716

Change-Id: I13ca736337fefe29ff9b0df6a318e7d92240f8b2
Signed-off-by: Raviv Shvili <rshvili@codeaurora.org>
mmc: core : fix arbitrary read/write to user space

In the MMC card debug_fs the read and write handlers use the strlcat
and sscanf, without checking the pointer given.
Since the pointer is not checked it is possible to write
everywhere (ring 0 or 3).
In order to fix it, an access_ok function is being used to verify
the buffer's pointer supplied by user is valid.

CRs-fixed: 545716
Change-Id: Ia710b6af5a95974fc930ca902e8ff18afa4e17ba
Signed-off-by: Raviv Shvili <rshvili@codeaurora.org>
Merge "mmc: core : fix arbitrary read/write to user space"
mmc: core : fix arbitrary read/write to user space

In the MMC card debug_fs the read and write handlers use the strlcat
and sscanf, without checking the pointer given.
Since the pointer is not checked it is possible to write
everywhere (ring 0 or 3).
In order to fix it, an access_ok function is being used to verify
the buffer's pointer supplied by user is valid.

CRs-fixed: 545716
Change-Id: Ia710b6af5a95974fc930ca902e8ff18afa4e17ba
Signed-off-by: Raviv Shvili <rshvili@codeaurora.org>
Merge "mmc: core : fix arbitrary read/write to user space"
arm: if there's no handler we need to restore sigmask, syscall or no syscall

CRs-fixed: 592079
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Git-commit: 7dfae72027cd8345247e675a3b27439df95fe06e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-stable.git
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
arm: new way of handling ERESTART_RESTARTBLOCK

new "syscall start" flag; handled in syscall_trace() by switching
syscall number to that of syscall_restart(2).  Restarts of that
kind (ERESTART_RESTARTBLOCK) are handled by setting that bit;
syscall number is not modified until the actual call.

CRs-fixed: 592079
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Git-commit: 6b5c8045ecc7e726cdaa2a9d9c8e5008050e1252
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-stable.git
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Merge "arm: if there's no handler we need to restore sigmask, syscall or no syscall"
Merge "arm: new way of handling ERESTART_RESTARTBLOCK"
USB: gadget: IPA disconnect on USB suspend when remote wakeup is disabled

When remote wakeup feature is disabled due to the usb host decision,
our tethering device is not allowed to wakeup the usb bus after bus
suspend. Therefore, in case the IPA is willing to wakeup the USB bus,
the USB cannot wakeup the host and therefore cannot grant the consumer
resource back to the IPA resource manager. In this case the IPA resource
manager is waiting until expiring timeout which lead system crash.

Therefore, in case of remote wakeup disabled, we should avoid the
expectation from the IPA side to get a response from the USB. So, the
solution is to indicate to the IPA driver that USB cable has been unplugged
when bus suspend with remote wakeup disabled.

CRs-Fixed: 571703
Change-Id: I03e1e2ad3549b7aad0df263de41b9a3dcc2f3503
Signed-off-by: Danny Segal <dsegal@codeaurora.org>
Merge "USB: gadget: IPA disconnect on USB suspend when remote wakeup is disabled"
Merge "platform: msm: Clear BAM pipe pointer after USB disconnect"
Merge "mmc: core : fix arbitrary read/write to user space"