This is a note to let you know that I've just added the patch titled
coresight-etm: unlock on error paths in mode_store()
to the 3.19-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
coresight-etm-unlock-on-error-paths-in-mode_store.patch
and it can be found in the queue-3.19 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 6ad1095990328e7e4b3a0e260825ad4b6406785a Mon Sep 17 00:00:00 2001
From: Dan Carpenter <[email protected]>
Date: Fri, 9 Jan 2015 16:57:12 -0700
Subject: coresight-etm: unlock on error paths in mode_store()
From: Dan Carpenter <[email protected]>
commit 6ad1095990328e7e4b3a0e260825ad4b6406785a upstream.
There are some missing unlocks on the error paths.
Fixes: a939fc5a71ad ('coresight-etm: add CoreSight ETM/PTM driver')
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Mathieu Poirier <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/coresight/coresight-etm3x.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- a/drivers/coresight/coresight-etm3x.c
+++ b/drivers/coresight/coresight-etm3x.c
@@ -573,7 +573,8 @@ static ssize_t mode_store(struct device
if (drvdata->mode & ETM_MODE_STALL) {
if (!(drvdata->etmccr & ETMCCR_FIFOFULL)) {
dev_warn(drvdata->dev, "stall mode not supported\n");
- return -EINVAL;
+ ret = -EINVAL;
+ goto err_unlock;
}
drvdata->ctrl |= ETMCR_STALL_MODE;
} else
@@ -582,7 +583,8 @@ static ssize_t mode_store(struct device
if (drvdata->mode & ETM_MODE_TIMESTAMP) {
if (!(drvdata->etmccer & ETMCCER_TIMESTAMP)) {
dev_warn(drvdata->dev, "timestamp not supported\n");
- return -EINVAL;
+ ret = -EINVAL;
+ goto err_unlock;
}
drvdata->ctrl |= ETMCR_TIMESTAMP_EN;
} else
@@ -595,6 +597,10 @@ static ssize_t mode_store(struct device
spin_unlock(&drvdata->spinlock);
return size;
+
+err_unlock:
+ spin_unlock(&drvdata->spinlock);
+ return ret;
}
static DEVICE_ATTR_RW(mode);
Patches currently in stable-queue which might be from [email protected]
are
queue-3.19/alsa-oxfw-fix-a-condition-and-return-code-in-start_stream.patch
queue-3.19/coresight-etm-unlock-on-error-paths-in-mode_store.patch
queue-3.19/efi-small-leak-on-error-in-runtime-map-code.patch
queue-3.19/ib-mlx5-fix-error-code-in-get_port_caps.patch
queue-3.19/usb-gadget-configfs-don-t-nul-terminate-sub-compatible-ids.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html