msm: vidc: free the recon buffers in cleanup function

- The recon buffers were not released when video recording
  was killed abruptly leading to memory leak.

- Fix provided to release the recon buffers when media
  server killed abruptly.

Change-Id: I48ac1a592719446b7e4bf87bbd707d09351d1e61
Signed-off-by: srikarri <sridur@codeaurora.org>
msm: vidc: Initialize kernel space stack variables

This change initializes kernel space stack variables
that are passed between kernel space and user space
using ioctls.
Non initialization of these variables may lead to
leakage of memory values from the kernel stack to
user space.

Change-Id: Icb195470545ee48b55671ac09798610178e833e1
CRs-fixed: 556771,563420
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
msm: vidc: Check validity of userspace address

Before writing to a userspace address, verification
of the validity of user space address is required.

Change-Id: I9141e44a6c11aaf3f4d57c08bb0dd26a7b214f34
CRs-fixed: 556356
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
msm: vidc: Validate userspace buffer count before using it

Validate the number of buffers count variable before
using it to avoid structure overflow error.

Change-Id: I61582c93e0f26ec6842e437134fb8a42bdbc36ff
CRs-fixed: 563654
Signed-off-by: Pachika, Vikas Reddy <vpachi@codeaurora.org>
msm: vidc: Validate userspace buffer count

Makesure the number of buffers count is less than
the maximum limit to avoid structure overflow errors.

Change-Id: Icf3850de36325637ae43ac95f1c8f0f63e201d31
CRs-fixed: 563694
Signed-off-by: Pachika, Vikas Reddy <vpachi@codeaurora.org>
staging: prima: update to 3.2.6.136 (aee0452684)

aee0452684 wlan:Revision 3.2.6.136
f8836bce92 Merge "wlan:Revision 3.2.6.135"
5a3a1000fb wlan:Revision 3.2.6.135
93ca13a958 Merge "wlan : Revision 3.2.6.134"
92e7563249 Merge "wlan: ARGENTINA CountryCode should be 'AR' in csrApiScan.c"
d85684a22f Merge "Fix: Kernel panic due to unregistered timer callback invoked"
335b5e9083 Merge "wlan: Logging enhancements for Scan."
5678d155f4 wlan : Revision 3.2.6.134
4cc13c33c2 wlan: ARGENTINA CountryCode should be 'AR' in csrApiScan.c
d648e47d0c Fix: Kernel panic due to unregistered timer callback invoked
3d3a57db4a wlan: Logging enhancements for Scan.
cd675b4747 Merge "WLAN: Fix memory leaks during get BSS Descriptor IE's"
02d3b4d08b Merge "wlan:Revision 3.2.6.132"
b8234d8116 wlan:Revision 3.2.6.132
9ea1f87e77 Merge "wlan: remove obsolete platform-specific code"
600fc19cbb Merge "wlan:Revision 3.2.6.131"
eb3952ee4f Merge "wlan:  Modify the debug log level to Info."
9212c88360 Merge "wlan: Dynamically enable/disable strict FCC Regulatory Rule."
d17108c041 wlan:Revision 3.2.6.131
24004925b7 wlan:  Modify the debug log level to Info.
8f02a196b5 WLAN: Fix memory leaks during get BSS Descriptor IE's
60d8bff434 wlan: Dynamically enable/disable strict FCC Regulatory Rule.
df0ca7397c wlan: remove obsolete platform-specific code
fe75b40d6a Merge "wlan: Memory leak in cfg80211"
abedd4e19e Merge "wlan:Revision 3.2.6.129"
10b5549505 Merge "wlan: Ignore broadcast mac address to get connected staId."
2955beed1b wlan:Revision 3.2.6.129
99b4469b79 wlan: Memory leak in cfg80211
a559d0c9c4 Merge "wlan:Revision 3.2.6.128"
20599a446b Merge "wlan:  Modify the debug log level to Info."
60b7d9204d Merge "wlan:SAP:Configure SAP country code through the gAPCntryCode"
3adf46c96c Merge "wlan: Added ioctl to enable/disable Traffic Monitor Feature Dynamically"
bec43a31f1 wlan:Revision 3.2.6.128
4e38a1010f Merge "wlan: Fix race condition for reliable delivery of action frames."
fd70076206 Merge "wlan:Revision 3.2.6.127"
848e9566fb Merge "wlan:Fix for BD rates in STA mode for probe request"
e53abc24e9 Merge "wlan: FTM second start crash fix."
5f022db71c wlan: Added ioctl to enable/disable Traffic Monitor Feature Dynamically
587aba0afb wlan:  Modify the debug log level to Info.
182d576df6 Merge "wlan: Updating the Channel list based on 11d from Nv.bin."
930ec19db1 Merge "wlan: Fix for the Multicast packet filter failure at P2P CLI interface"
456af6de6b wlan:Revision 3.2.6.127
b555e68b65 wlan:SAP:Configure SAP country code through the gAPCntryCode
f5d5cfd9f3 wlan: Fix for the Multicast packet filter failure at P2P CLI interface
2c143905bc Merge "WLAN: Made host interface file in sync with RIVA."
5d989ef14f wlan:Fix for BD rates in STA mode for probe request
1c301366fb wlan: FTM second start crash fix.
4114a68aed Merge "wlan: add a separate mutex lock for each packet list"
ce776125c0 wlan: Updating the Channel list based on 11d from Nv.bin.
541be9fd55 wlan: Fix race condition for reliable delivery of action frames.
6abffe248c WLAN: Made host interface file in sync with RIVA.
f02874738b wlan: add a separate mutex lock for each packet list
bac23301e9 Merge "wlan : Revision 3.2.6.125"
10138820d4 Merge "TDLS : Protect the Adapter access with a mutex."
a1288d3adb wlan : Revision 3.2.6.125
ce6316bc63 Merge "wlan: Fix for FTM mode spin lock crash"
6beb1476e5 Merge "TDLS: Move tdls_lock to HDD Context"
db1c83f21a Merge "wlan: Disable channel 120,124,128 for ARGENTINA"
75b717370a Merge "wlan: Place DHCP packets in VOICE queue on low resource condition."
c4f1562410 Merge "wlan:Revision 3.2.6.124"
2d36b8dee0 TDLS : Protect the Adapter access with a mutex.
62415c9271 Merge "wlan: Allow builds to work in releases beyond JB"
ea4350add5 TDLS: Move tdls_lock to HDD Context
11606cf5b3 wlan: Fix for FTM mode spin lock crash
ce7b6f41a5 wlan: Ignore broadcast mac address to get connected staId.
099737e3f8 Merge "wlan: Initialize memory allocated for PNO request."
30c8242ca5 wlan:Revision 3.2.6.124
e7bc9eadbb wlan: Allow builds to work in releases beyond JB
9d20723465 Merge "wlan: Error when using private wlan ioctls 'setMaxTxPower'"
1195f24445 Merge "wlan: A method by which metrics related to roaming can be reported"
8107be16a2 Merge "wlan: Do not check for mcbc flag to resume."
1c133ec752 Merge "wlan: Align PNO channels buffer size of WDI with MAC."
522552df0e Merge "Adding support for SIOCGIWMODE for hostapd (SoftAP)."
be6d76d81c wlan: Disable channel 120,124,128 for ARGENTINA
af56c1733c wlan: Place DHCP packets in VOICE queue on low resource condition.
b98094ed1e wlan: Error when using private wlan ioctls 'setMaxTxPower'
d0e62ecf0f wlan: A method by which metrics related to roaming can be reported
20a398629a Adding support for SIOCGIWMODE for hostapd (SoftAP).
02c5b68551 Merge "wlan: Revision 3.2.6.122"
cb38314474 Merge "wlan: Fix race conditions while configuring mc/bc filter"
401de7cf5d Merge "Configurig WLAN/BT interval of BTC as tunable parameters from host"
4da972a36f Merge "wlan: Interface file changes to configurig WLAN/BT interval."
f061c08a7d wlan: Revision 3.2.6.122
70e6af5bfc wlan: Interface file changes to configurig WLAN/BT interval.
2a6ec1fec5 wlan: Do not check for mcbc flag to resume.
54a436907f Merge "wlan : Revision 3.2.6.121"
2c1b869e2b wlan: Fix race conditions while configuring mc/bc filter
6c7171a300 Configurig WLAN/BT interval of BTC as tunable parameters from host
a47136acdb wlan: Initialize memory allocated for PNO request.
d0f0d8adc0 wlan: Align PNO channels buffer size of WDI with MAC.

Change-Id: Ia05af2bc944542e3fc7076f2dbb5c6fe28473b09