Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.
Merged

Test #10

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
259c1de
soc: qcom: pil: Explicitly clear the subsystem loading address
Mar 25, 2017
6bc05bd
media: dvb-core: Add feed state check before stop dvbdemux feed
Mar 31, 2017
e1dc14e
msm: vidc: Protect debug_buffer access in core_info_read with lock.
Mar 22, 2017
6be07a8
ASoC: qdsp6v2: Remove Eagle code
XNUBIA Mar 4, 2017
bf28ea9
mhi: core: remove unused dbgfs function
Apr 11, 2017
c440288
qseecom: change _qseecom_send_cmd errno if app is not found
Apr 24, 2015
5fe7ad9
Merge "msm: vidc: Protect debug_buffer access in core_info_read with …
Apr 14, 2017
2fba511
Merge "ASoC: qdsp6v2: Remove Eagle code"
Apr 14, 2017
ebba53c
Merge "qseecom: change _qseecom_send_cmd errno if app is not found"
Apr 15, 2017
a6a15c7
msm: camera: sensor: Add boundary check for cci master
Apr 18, 2017
0093c9a
Merge "mhi: core: remove unused dbgfs function"
Apr 18, 2017
70c1ff8
Merge "soc: qcom: pil: Explicitly clear the subsystem loading address"
Apr 21, 2017
a44819c
Merge "media: dvb-core: Add feed state check before stop dvbdemux feed"
Apr 21, 2017
3bf0a6d
msm: ipa: Fix memory leak in ipa driver
Apr 3, 2017
3021a73
ashmem: remove cache maintenance support
Apr 6, 2017
178b8e4
drivers: qcom: ultrasound: check concurrent device open operations
Mar 30, 2017
7b9bab8
crypto: msm: Fix buffer overflow issue
Mar 13, 2017
f6107ad
soc: qcom: remove debugfs interface from ssr
Apr 4, 2017
b2df81b
msm: mdss: fix race condition during mdp debugfs release
Apr 13, 2017
38f7101
wcnss: fix the potential memory leak and heap overflow
Apr 17, 2017
be73b86
ASoC: msm: qdspv2: add result check when audio process fail
Apr 14, 2017
b9e92b1
Merge "ashmem: remove cache maintenance support"
lnxbuild Apr 27, 2017
7d64e50
Merge "drivers: qcom: ultrasound: check concurrent device open operat…
lnxbuild Apr 27, 2017
43e2ffe
Merge "msm: ipa: Fix memory leak in ipa driver"
lnxbuild Apr 27, 2017
f07dfe7
Merge "soc: qcom: remove debugfs interface from ssr"
lnxbuild Apr 27, 2017
f2ff9f2
Merge "msm: mdss: fix race condition during mdp debugfs release"
lnxbuild Apr 27, 2017
6b9659b
udp: properly support MSG_PEEK with truncated buffers
edumazet Dec 30, 2015
f4f7648
ANDROID: ion: Protect kref from userspace manipulation
drosen-google Feb 4, 2017
e523973
posix_acl: Clear SGID bit when setting file permissions
jankara Sep 19, 2016
76ceee6
Merge "ANDROID: ion: Protect kref from userspace manipulation"
lnxbuild Apr 29, 2017
1e59b01
Merge "posix_acl: Clear SGID bit when setting file permissions"
lnxbuild Apr 29, 2017
8e423c2
qseecom: add mutex around qseecom_set_client_mem_param
Feb 27, 2017
52deca6
ANDROID: ion: Fix uninitialized variable
drosen-google Apr 4, 2017
0a4d95d
FROMLIST: 9p: fix a potential acl leak
congwang Dec 13, 2016
fdb6612
ANDROID: fix acl leaks
Jan 23, 2017
5905ef1
crypto: msm: check invalid src and dst vbuf in qcedev.c
Feb 21, 2017
dd01e99
ion: Fix unprotected userspace access
Jun 29, 2015
ba5e28d
msm: rmnet_ipa: fix memory overflow issue
Apr 15, 2017
d22bc5b
slim-msm : Synchronize SSR callbacks
Mar 21, 2016
3a585f7
Merge "ANDROID: fix acl leaks"
lnxbuild May 2, 2017
f1380db
Merge "crypto: msm: check invalid src and dst vbuf in qcedev.c"
lnxbuild May 2, 2017
c6eb6b8
Merge "wcnss: fix the potential memory leak and heap overflow"
lnxbuild May 2, 2017
19326b4
Merge "msm: rmnet_ipa: fix memory overflow issue"
lnxbuild May 2, 2017
a735b1e
Merge "ion: Fix unprotected userspace access"
lnxbuild May 2, 2017
39cdba1
Merge "slim-msm : Synchronize SSR callbacks"
lnxbuild May 2, 2017
3d01357
msm: camera: Add regulator enable and disable independent of CSID
May 3, 2017
9cb6bf3
mmc: card: block: check the user controlled parameters to avoid overflow
Apr 28, 2017
4d31827
Merge "mmc: card: block: check the user controlled parameters to avoi…
lnxbuild May 5, 2017
99c22ce
msm: sensor: validating the flash initialization parameters
Mar 21, 2017
d0bcdd7
Merge "msm: camera: sensor: Add boundary check for cci master"
lnxbuild May 11, 2017
f63fcba
radio-iris: Use copy_from_user API to access userspace memory
May 2, 2017
cb38d15
Merge "radio-iris: Use copy_from_user API to access userspace memory"
lnxbuild May 11, 2017
a4a0d24
ASoC: msm: qdsp6v2: clear address on error
Apr 26, 2017
5010f7c
Merge "ASoC: msm: qdsp6v2: clear address on error"
lnxbuild May 12, 2017
8e22f43
msm: camera: Allow driver file to be opend only once.
Apr 7, 2017
7f1ca48
xfrm_user: validate XFRM_MSG_NEWAE XFRMA_REPLAY_ESN_VAL replay_window
awhitcroft Mar 22, 2017
9fcd594
xfrm_user: validate XFRM_MSG_NEWAE incoming ESN size harder
awhitcroft Mar 23, 2017
f29f1c2
Prevent heap overflow in uvc driver
Feb 14, 2017
4ee2ddb
tracing: do not leak kernel addresses
nickdesaulniers Mar 3, 2017
71a578b
ALSA: pcm : Call kill_fasync() in stream lock
tiwai Dec 12, 2016
e810a52
Merge AU_LINUX_ANDROID_LA.BF64.1.2.3_RB1.07.01.01.258.024 on remote b…
May 18, 2017
21d422e
msm: camera2: cpp: Fix out-of-bounds frame or command buffer access
Apr 12, 2017
1ff0f9b
Merge "xfrm_user: validate XFRM_MSG_NEWAE XFRMA_REPLAY_ESN_VAL replay…
lnxbuild May 18, 2017
5165541
Merge "xfrm_user: validate XFRM_MSG_NEWAE incoming ESN size harder" i…
lnxbuild May 18, 2017
055cf86
Merge "Prevent heap overflow in uvc driver" into LA.BF64.1.2.3_rb1.13
lnxbuild May 18, 2017
66c6044
Merge "tracing: do not leak kernel addresses" into LA.BF64.1.2.3_rb1.13
lnxbuild May 18, 2017
599d0f2
Merge "ALSA: pcm : Call kill_fasync() in stream lock" into LA.BF64.1.…
lnxbuild May 18, 2017
8d7940f
Merge "msm: camera: Allow driver file to be opend only once." into LA…
lnxbuild May 18, 2017
dcb510f
Merge "msm: camera2: cpp: Fix out-of-bounds frame or command buffer a…
lnxbuild May 18, 2017
d76e79b
msm: camera: don't cut to 8bits for validating enum variable
Mar 31, 2017
30083e2
msm: kgsl: Fix kgsl memory allocation and free race condition
May 2, 2017
43cfd3d
msm: camera2: cpp: Fix iommu_attach/detach compat_ioctl issue
Mar 28, 2017
f160792
Merge "msm: kgsl: Fix kgsl memory allocation and free race condition"…
lnxbuild May 23, 2017
b20754b
Merge "msm: camera2: cpp: Fix iommu_attach/detach compat_ioctl issue"…
lnxbuild May 23, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion arch/arm/boot/dts/qcom/msm8992-camera.dtsi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
* Copyright (c) 2014-2015, 2017 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
Expand All @@ -26,6 +26,9 @@
reg-names = "csiphy", "csiphy_clk_mux";
interrupts = <0 78 0>;
interrupt-names = "csiphy";
qcom,csi-vdd-voltage = <1250000>;
qcom,mipi-csi-vdd-supply = <&pm8994_l2>;
qcom,gdscr-vdd-supply = <&gdsc_camss_top>;
clocks = <&clock_mmss clk_camss_top_ahb_clk>,
<&clock_mmss clk_camss_ispif_ahb_clk>,
<&clock_mmss clk_csi0_clk_src>,
Expand All @@ -48,6 +51,9 @@
reg-names = "csiphy", "csiphy_clk_mux";
interrupts = <0 79 0>;
interrupt-names = "csiphy";
qcom,csi-vdd-voltage = <1250000>;
qcom,mipi-csi-vdd-supply = <&pm8994_l2>;
qcom,gdscr-vdd-supply = <&gdsc_camss_top>;
clocks = <&clock_mmss clk_camss_top_ahb_clk>,
<&clock_mmss clk_camss_ispif_ahb_clk>,
<&clock_mmss clk_csi1_clk_src>,
Expand All @@ -70,6 +76,9 @@
reg-names = "csiphy", "csiphy_clk_mux";
interrupts = <0 80 0>;
interrupt-names = "csiphy";
qcom,csi-vdd-voltage = <1250000>;
qcom,mipi-csi-vdd-supply = <&pm8994_l2>;
qcom,gdscr-vdd-supply = <&gdsc_camss_top>;
clocks = <&clock_mmss clk_camss_top_ahb_clk>,
<&clock_mmss clk_camss_ispif_ahb_clk>,
<&clock_mmss clk_csi2_clk_src>,
Expand Down
11 changes: 10 additions & 1 deletion arch/arm/boot/dts/qcom/msm8994-camera.dtsi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
* Copyright (c) 2014-2015, 2017 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
Expand All @@ -26,6 +26,9 @@
reg-names = "csiphy", "csiphy_clk_mux";
interrupts = <0 78 0>;
interrupt-names = "csiphy";
qcom,csi-vdd-voltage = <1250000>;
qcom,mipi-csi-vdd-supply = <&pm8994_l2>;
qcom,gdscr-vdd-supply = <&gdsc_camss_top>;
clocks = <&clock_mmss clk_camss_top_ahb_clk>,
<&clock_mmss clk_camss_ispif_ahb_clk>,
<&clock_mmss clk_csi0_clk_src>,
Expand All @@ -48,6 +51,9 @@
reg-names = "csiphy", "csiphy_clk_mux";
interrupts = <0 79 0>;
interrupt-names = "csiphy";
qcom,csi-vdd-voltage = <1250000>;
qcom,mipi-csi-vdd-supply = <&pm8994_l2>;
qcom,gdscr-vdd-supply = <&gdsc_camss_top>;
clocks = <&clock_mmss clk_camss_top_ahb_clk>,
<&clock_mmss clk_camss_ispif_ahb_clk>,
<&clock_mmss clk_csi1_clk_src>,
Expand All @@ -70,6 +76,9 @@
reg-names = "csiphy", "csiphy_clk_mux";
interrupts = <0 80 0>;
interrupt-names = "csiphy";
qcom,csi-vdd-voltage = <1250000>;
qcom,mipi-csi-vdd-supply = <&pm8994_l2>;
qcom,gdscr-vdd-supply = <&gdsc_camss_top>;
clocks = <&clock_mmss clk_camss_top_ahb_clk>,
<&clock_mmss clk_camss_ispif_ahb_clk>,
<&clock_mmss clk_csi2_clk_src>,
Expand Down
61 changes: 51 additions & 10 deletions drivers/crypto/msm/qcedev.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ static uint8_t _std_init_vector_sha256_uint8[] = {

static DEFINE_MUTEX(send_cmd_lock);
static DEFINE_MUTEX(qcedev_sent_bw_req);
static DEFINE_MUTEX(hash_access_lock);

static void qcedev_ce_high_bw_req(struct qcedev_control *podev,
bool high_bw_req)
Expand Down Expand Up @@ -1501,6 +1502,11 @@ static int qcedev_check_cipher_params(struct qcedev_cipher_op_req *req,
}
/* Check for sum of all dst length is equal to data_len */
for (i = 0, total = 0; i < req->entries; i++) {
if (!req->vbuf.dst[i].vaddr && req->vbuf.dst[i].len) {
pr_err("%s: NULL req dst vbuf[%d] with length %d\n",
__func__, i, req->vbuf.dst[i].len);
goto error;
}
if (req->vbuf.dst[i].len >= U32_MAX - total) {
pr_err("%s: Integer overflow on total req dst vbuf length\n",
__func__);
Expand All @@ -1515,6 +1521,11 @@ static int qcedev_check_cipher_params(struct qcedev_cipher_op_req *req,
}
/* Check for sum of all src length is equal to data_len */
for (i = 0, total = 0; i < req->entries; i++) {
if (!req->vbuf.src[i].vaddr && req->vbuf.src[i].len) {
pr_err("%s: NULL req src vbuf[%d] with length %d\n",
__func__, i, req->vbuf.src[i].len);
goto error;
}
if (req->vbuf.src[i].len > U32_MAX - total) {
pr_err("%s: Integer overflow on total req src vbuf length\n",
__func__);
Expand Down Expand Up @@ -1649,12 +1660,18 @@ long qcedev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
(void __user *)arg,
sizeof(struct qcedev_sha_op_req)))
return -EFAULT;
if (qcedev_check_sha_params(&qcedev_areq.sha_op_req, podev))
mutex_lock(&hash_access_lock);
if (qcedev_check_sha_params(&qcedev_areq.sha_op_req, podev)) {
mutex_unlock(&hash_access_lock);
return -EINVAL;
}
qcedev_areq.op_type = QCEDEV_CRYPTO_OPER_SHA;
err = qcedev_hash_init(&qcedev_areq, handle, &sg_src);
if (err)
if (err) {
mutex_unlock(&hash_access_lock);
return err;
}
mutex_unlock(&hash_access_lock);
if (copy_to_user((void __user *)arg, &qcedev_areq.sha_op_req,
sizeof(struct qcedev_sha_op_req)))
return -EFAULT;
Expand All @@ -1672,32 +1689,42 @@ long qcedev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
(void __user *)arg,
sizeof(struct qcedev_sha_op_req)))
return -EFAULT;
if (qcedev_check_sha_params(&qcedev_areq.sha_op_req, podev))
mutex_lock(&hash_access_lock);
if (qcedev_check_sha_params(&qcedev_areq.sha_op_req, podev)) {
mutex_unlock(&hash_access_lock);
return -EINVAL;
}
qcedev_areq.op_type = QCEDEV_CRYPTO_OPER_SHA;

if (qcedev_areq.sha_op_req.alg == QCEDEV_ALG_AES_CMAC) {
err = qcedev_hash_cmac(&qcedev_areq, handle, &sg_src);
if (err)
if (err) {
mutex_unlock(&hash_access_lock);
return err;
}
} else {
if (handle->sha_ctxt.init_done == false) {
pr_err("%s Init was not called\n", __func__);
mutex_unlock(&hash_access_lock);
return -EINVAL;
}
err = qcedev_hash_update(&qcedev_areq, handle, &sg_src);
if (err)
if (err) {
mutex_unlock(&hash_access_lock);
return err;
}
}

if (handle->sha_ctxt.diglen > QCEDEV_MAX_SHA_DIGEST) {
pr_err("Invalid sha_ctxt.diglen %d\n",
handle->sha_ctxt.diglen);
mutex_unlock(&hash_access_lock);
return -EINVAL;
}
memcpy(&qcedev_areq.sha_op_req.digest[0],
&handle->sha_ctxt.digest[0],
handle->sha_ctxt.diglen);
mutex_unlock(&hash_access_lock);
if (copy_to_user((void __user *)arg, &qcedev_areq.sha_op_req,
sizeof(struct qcedev_sha_op_req)))
return -EFAULT;
Expand All @@ -1714,16 +1741,22 @@ long qcedev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
(void __user *)arg,
sizeof(struct qcedev_sha_op_req)))
return -EFAULT;
if (qcedev_check_sha_params(&qcedev_areq.sha_op_req, podev))
mutex_lock(&hash_access_lock);
if (qcedev_check_sha_params(&qcedev_areq.sha_op_req, podev)) {
mutex_unlock(&hash_access_lock);
return -EINVAL;
}
qcedev_areq.op_type = QCEDEV_CRYPTO_OPER_SHA;
err = qcedev_hash_final(&qcedev_areq, handle);
if (err)
if (err) {
mutex_unlock(&hash_access_lock);
return err;
}
qcedev_areq.sha_op_req.diglen = handle->sha_ctxt.diglen;
memcpy(&qcedev_areq.sha_op_req.digest[0],
&handle->sha_ctxt.digest[0],
handle->sha_ctxt.diglen);
mutex_unlock(&hash_access_lock);
if (copy_to_user((void __user *)arg, &qcedev_areq.sha_op_req,
sizeof(struct qcedev_sha_op_req)))
return -EFAULT;
Expand All @@ -1738,20 +1771,28 @@ long qcedev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
(void __user *)arg,
sizeof(struct qcedev_sha_op_req)))
return -EFAULT;
if (qcedev_check_sha_params(&qcedev_areq.sha_op_req, podev))
mutex_lock(&hash_access_lock);
if (qcedev_check_sha_params(&qcedev_areq.sha_op_req, podev)) {
mutex_unlock(&hash_access_lock);
return -EINVAL;
}
qcedev_areq.op_type = QCEDEV_CRYPTO_OPER_SHA;
qcedev_hash_init(&qcedev_areq, handle, &sg_src);
err = qcedev_hash_update(&qcedev_areq, handle, &sg_src);
if (err)
if (err) {
mutex_unlock(&hash_access_lock);
return err;
}
err = qcedev_hash_final(&qcedev_areq, handle);
if (err)
if (err) {
mutex_unlock(&hash_access_lock);
return err;
}
qcedev_areq.sha_op_req.diglen = handle->sha_ctxt.diglen;
memcpy(&qcedev_areq.sha_op_req.digest[0],
&handle->sha_ctxt.digest[0],
handle->sha_ctxt.diglen);
mutex_unlock(&hash_access_lock);
if (copy_to_user((void __user *)arg, &qcedev_areq.sha_op_req,
sizeof(struct qcedev_sha_op_req)))
return -EFAULT;
Expand Down
16 changes: 14 additions & 2 deletions drivers/gpu/msm/kgsl.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2008-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2008-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
Expand Down Expand Up @@ -209,8 +209,11 @@ kgsl_mem_entry_create(void)
{
struct kgsl_mem_entry *entry = kzalloc(sizeof(*entry), GFP_KERNEL);

if (entry)
if (entry) {
kref_init(&entry->refcount);
/* put this ref in the caller functions after init */
kref_get(&entry->refcount);
}

return entry;
}
Expand Down Expand Up @@ -3270,6 +3273,9 @@ long kgsl_ioctl_map_user_mem(struct kgsl_device_private *dev_priv,
trace_kgsl_mem_map(entry, param->fd);

kgsl_mem_entry_commit_process(private, entry);

/* put the extra refcount for kgsl_mem_entry_create() */
kgsl_mem_entry_put(entry);
return result;

error_attach:
Expand Down Expand Up @@ -3626,6 +3632,9 @@ long kgsl_ioctl_gpumem_alloc(struct kgsl_device_private *dev_priv,
param->flags = entry->memdesc.flags;

kgsl_mem_entry_commit_process(private, entry);

/* put the extra refcount for kgsl_mem_entry_create() */
kgsl_mem_entry_put(entry);
return result;
err:
kgsl_sharedmem_free(&entry->memdesc);
Expand Down Expand Up @@ -3673,6 +3682,9 @@ long kgsl_ioctl_gpumem_alloc_id(struct kgsl_device_private *dev_priv,
param->gpuaddr = entry->memdesc.gpuaddr;

kgsl_mem_entry_commit_process(private, entry);

/* put the extra refcount for kgsl_mem_entry_create() */
kgsl_mem_entry_put(entry);
return result;
err:
if (entry)
Expand Down
5 changes: 5 additions & 0 deletions drivers/media/dvb-core/dvb_demux.c
Original file line number Diff line number Diff line change
Expand Up @@ -2839,6 +2839,11 @@ static int dmx_section_feed_stop_filtering(struct dmx_section_feed *feed)

mutex_lock(&dvbdmx->mutex);

if (dvbdmxfeed->state < DMX_STATE_GO) {
mutex_unlock(&dvbdmx->mutex);
return -EINVAL;
}

if (!dvbdmx->stop_feed) {
mutex_unlock(&dvbdmx->mutex);
return -ENODEV;
Expand Down
12 changes: 6 additions & 6 deletions drivers/media/platform/msm/camera_v2/ispif/msm_ispif.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static void msm_ispif_io_dump_reg(struct ispif_device *ispif)


static inline int msm_ispif_is_intf_valid(uint32_t csid_version,
uint8_t intf_type)
enum msm_ispif_vfe_intf intf_type)
{
return ((csid_version <= CSID_VERSION_V22 && intf_type != VFE0) ||
(intf_type >= VFE_MAX)) ? false : true;
Expand Down Expand Up @@ -347,7 +347,7 @@ static int msm_ispif_subdev_g_chip_ident(struct v4l2_subdev *sd,
}

static void msm_ispif_sel_csid_core(struct ispif_device *ispif,
uint8_t intftype, uint8_t csid, uint8_t vfe_intf)
uint8_t intftype, uint8_t csid, enum msm_ispif_vfe_intf vfe_intf)
{
uint32_t data;

Expand Down Expand Up @@ -387,7 +387,7 @@ static void msm_ispif_sel_csid_core(struct ispif_device *ispif,
}

static void msm_ispif_enable_crop(struct ispif_device *ispif,
uint8_t intftype, uint8_t vfe_intf, uint16_t start_pixel,
uint8_t intftype, enum msm_ispif_vfe_intf vfe_intf, uint16_t start_pixel,
uint16_t end_pixel)
{
uint32_t data;
Expand Down Expand Up @@ -419,7 +419,7 @@ static void msm_ispif_enable_crop(struct ispif_device *ispif,
}

static void msm_ispif_enable_intf_cids(struct ispif_device *ispif,
uint8_t intftype, uint16_t cid_mask, uint8_t vfe_intf, uint8_t enable)
uint8_t intftype, uint16_t cid_mask, enum msm_ispif_vfe_intf vfe_intf, uint8_t enable)
{
uint32_t intf_addr, data;

Expand Down Expand Up @@ -461,7 +461,7 @@ static void msm_ispif_enable_intf_cids(struct ispif_device *ispif,
}

static int msm_ispif_validate_intf_status(struct ispif_device *ispif,
uint8_t intftype, uint8_t vfe_intf)
uint8_t intftype, enum msm_ispif_vfe_intf vfe_intf)
{
int rc = 0;
uint32_t data = 0;
Expand Down Expand Up @@ -501,7 +501,7 @@ static int msm_ispif_validate_intf_status(struct ispif_device *ispif,
}

static void msm_ispif_select_clk_mux(struct ispif_device *ispif,
uint8_t intftype, uint8_t csid, uint8_t vfe_intf)
uint8_t intftype, uint8_t csid, enum msm_ispif_vfe_intf vfe_intf)
{
uint32_t data = 0;

Expand Down
6 changes: 2 additions & 4 deletions drivers/media/platform/msm/camera_v2/msm.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2015, 2017 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
Expand Down Expand Up @@ -844,11 +844,9 @@ static int msm_open(struct file *filep)
BUG_ON(!pvdev);

/* !!! only ONE open is allowed !!! */
if (atomic_read(&pvdev->opened))
if (atomic_cmpxchg(&pvdev->opened, 0, 1))
return -EBUSY;

atomic_set(&pvdev->opened, 1);

spin_lock_irqsave(&msm_pid_lock, flags);
msm_pid = get_pid(task_pid(current));
spin_unlock_irqrestore(&msm_pid_lock, flags);
Expand Down
Loading