* Patch "iio: tmp006: Check channel info on write" has been added to the 4.1-stable tree
@ 2015-07-30 0:25 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-07-30 0:25 UTC (permalink / raw)
To: pmeerw, gregkh, jic23; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
iio: tmp006: Check channel info on write
to the 4.1-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:
iio-tmp006-check-channel-info-on-write.patch
and it can be found in the queue-4.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 8d05abfaeff52bdf66aba3a3a337dcdbdb4911bf Mon Sep 17 00:00:00 2001
From: Peter Meerwald <pmeerw@pmeerw.net>
Date: Sun, 21 Jun 2015 23:50:21 +0200
Subject: iio: tmp006: Check channel info on write
From: Peter Meerwald <pmeerw@pmeerw.net>
commit 8d05abfaeff52bdf66aba3a3a337dcdbdb4911bf upstream.
only SAMP_FREQ is writable
Will lead to SAMP_FREQ being written by any attempt to write
to the other exported attributes and hence a rather unexpected
result!
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/iio/temperature/tmp006.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/iio/temperature/tmp006.c
+++ b/drivers/iio/temperature/tmp006.c
@@ -132,6 +132,9 @@ static int tmp006_write_raw(struct iio_d
struct tmp006_data *data = iio_priv(indio_dev);
int i;
+ if (mask != IIO_CHAN_INFO_SAMP_FREQ)
+ return -EINVAL;
+
for (i = 0; i < ARRAY_SIZE(tmp006_freqs); i++)
if ((val == tmp006_freqs[i][0]) &&
(val2 == tmp006_freqs[i][1])) {
Patches currently in stable-queue which might be from pmeerw@pmeerw.net are
queue-4.1/iio-light-tcs3414-fix-bug-preventing-to-set-integration-time.patch
queue-4.1/iio-tmp006-check-channel-info-on-write.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-07-30 0:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-30 0:25 Patch "iio: tmp006: Check channel info on write" has been added to the 4.1-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.