aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2012-09-24 12:20:52 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-26 13:45:38 -0400
commitb655c2c4782ed3e2e71d2608154e295a3e860311 (patch)
treec358dc6a816124139b1085d5c0eaec4b4bdbefae
parent67f2021fb1519057b0643d871b2afcd583bcc40d (diff)
staging: comedi: s626: don't dereference insn->data
`s626_enc_insn_config()` is incorrectly dereferencing `insn->data` which is a pointer to user memory. It should be dereferencing the separate `data` parameter that points to a copy of the data in kernel memory. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/comedi/drivers/s626.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c
index e1d10f366c2f..430e26b9e344 100644
--- a/drivers/staging/comedi/drivers/s626.c
+++ b/drivers/staging/comedi/drivers/s626.c
@@ -1825,7 +1825,7 @@ static int s626_enc_insn_config(struct comedi_device *dev,
1825 /* (data==NULL) ? (Preloadvalue=0) : (Preloadvalue=data[0]); */ 1825 /* (data==NULL) ? (Preloadvalue=0) : (Preloadvalue=data[0]); */
1826 1826
1827 k->SetMode(dev, k, Setup, TRUE); 1827 k->SetMode(dev, k, Setup, TRUE);
1828 Preload(dev, k, *(insn->data)); 1828 Preload(dev, k, data[0]);
1829 k->PulseIndex(dev, k); 1829 k->PulseIndex(dev, k);
1830 SetLatchSource(dev, k, valueSrclatch); 1830 SetLatchSource(dev, k, valueSrclatch);
1831 k->SetEnable(dev, k, (uint16_t) (enab != 0)); 1831 k->SetEnable(dev, k, (uint16_t) (enab != 0));