]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: comedi: don't dereference user memory for INSN_INTTRIG
authorIan Abbott <abbotti@mev.co.uk>
Tue, 18 Sep 2012 18:46:58 +0000 (19:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Oct 2012 15:35:52 +0000 (08:35 -0700)
commit805b1efb2854bf4ce9219abc44ac431ce10bbd3a
tree8b5f7c997bdf410db92c61c8585bd7bb0c8d4ae9
parent449ebcca3d1aea40ae5858ad14e9ab842dd8b29f
staging: comedi: don't dereference user memory for INSN_INTTRIG

commit 5d06e3df280bd230e2eadc16372e62818c63e894 upstream.

`parse_insn()` is dereferencing the user-space pointer `insn->data`
directly when handling the `INSN_INTTRIG` comedi instruction.  It
shouldn't be using `insn->data` at all; it should be using the separate
`data` pointer passed to the function.  Fix it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/comedi_fops.c