comedi_fops: fix user-memory dereference for INSN_INTTRIG
authorIan Abbott <abbotti@mev.co.uk>
Tue, 18 Sep 2012 19:00:08 +0000 (20:00 +0100)
committerIan Abbott <abbotti@mev.co.uk>
Tue, 18 Sep 2012 19:00:08 +0000 (20:00 +0100)
commitedac7e58d4b28e03b5d76d83b8890469c5e83c6a
tree878d95913cd3058dc0805300275abc29c8898267
parentd743220d9b53b357f2dbad6ddf83c5a5c9ad18b4
comedi_fops: fix user-memory dereference for INSN_INTTRIG

The parse_insn() function shouldn't dereference `insn->data` as that is
pointing to user-space memory.  It should deference the separate `data`
parameter instead, which points to a kernel copy of the data.  Only the
`INSN_INTTRIG` case needs fixing.  Fix it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
comedi/comedi_fops.c