<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/staging/comedi, branch v3.0.56</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/staging/comedi?h=v3.0.56</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/staging/comedi?h=v3.0.56'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-10-31T16:51:42Z</updated>
<entry>
<title>staging: comedi: amplc_pc236: fix invalid register access during detach</title>
<updated>2012-10-31T16:51:42Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2012-10-03T15:25:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5a30fddcc9593086c26cef6496f757e262059cf6'/>
<id>urn:sha1:5a30fddcc9593086c26cef6496f757e262059cf6</id>
<content type='text'>
commit aaeb61a97b7159ebe30b18a422d04eeabfa8790b upstream.

`pc236_detach()` is called by the comedi core if it attempted to attach
a device and failed.  `pc236_detach()` calls `pc236_intr_disable()` if
the comedi device private data pointer (`devpriv`) is non-null.  This
test is insufficient as `pc236_intr_disable()` accesses hardware
registers and the attach routine may have failed before it has saved
their I/O base addresses.

Fix it by checking `dev-&gt;iobase` is non-zero before calling
`pc236_intr_disable()` as that means the I/O base addresses have been
saved and the hardware registers can be accessed.  It also implies the
comedi device private data pointer is valid, so there is no need to
check it.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>staging: comedi: fix memory leak for saved channel list</title>
<updated>2012-10-07T15:27:24Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2012-09-19T18:37:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8455d77c2b1a558aacef5c61c2d2b73dc8237c8b'/>
<id>urn:sha1:8455d77c2b1a558aacef5c61c2d2b73dc8237c8b</id>
<content type='text'>
commit c8cad4c89ee3b15935c532210ae6ebb5c0a2734d upstream.

When `do_cmd_ioctl()` allocates memory for the kernel copy of a channel
list, it frees any previously allocated channel list in
`async-&gt;cmd.chanlist` and replaces it with the new one.  However, if the
device is ever removed (or "detached") the cleanup code in
`cleanup_device()` in "drivers.c" does not free this memory so it is
lost.

A sensible place to free the kernel copy of the channel list is in
`do_become_nonbusy()` as at that point the comedi asynchronous command
associated with the channel list is no longer valid.  Free the channel
list in `do_become_nonbusy()` instead of `do_cmd_ioctl()` and clear the
pointer to prevent it being freed more than once.

Note that `cleanup_device()` could be called at an inappropriate time
while the comedi device is open, but that's a separate bug not related
to this this patch.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>staging: comedi: don't dereference user memory for INSN_INTTRIG</title>
<updated>2012-10-07T15:27:24Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2012-09-18T18:46:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=03acba6021da7f7bde0c0886379873791c6e24bf'/>
<id>urn:sha1:03acba6021da7f7bde0c0886379873791c6e24bf</id>
<content type='text'>
commit 5d06e3df280bd230e2eadc16372e62818c63e894 upstream.

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

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>staging: comedi: jr3_pci: fix iomem dereference</title>
<updated>2012-10-07T15:27:24Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2012-09-27T16:45:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e451b6d10c4afa8244c02b731536bcad8800e6f7'/>
<id>urn:sha1:e451b6d10c4afa8244c02b731536bcad8800e6f7</id>
<content type='text'>
commit e1878957b4676a17cf398f7f5723b365e9a2ca48 upstream.

Correct a direct dereference of I/O memory to use an appropriate I/O
memory access function.  Note that the pointer being dereferenced is not
currently tagged with `__iomem` but I plan to correct that for 3.7.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>staging: comedi: s626: don't dereference insn-&gt;data</title>
<updated>2012-10-07T15:27:24Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2012-09-24T16:20:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=99f7fee77c389d4531e8cda9dbff60a60bdeea28'/>
<id>urn:sha1:99f7fee77c389d4531e8cda9dbff60a60bdeea28</id>
<content type='text'>
commit b655c2c4782ed3e2e71d2608154e295a3e860311 upstream.

`s626_enc_insn_config()` is incorrectly dereferencing `insn-&gt;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 &lt;abbotti@mev.co.uk&gt;
Reviewed-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>staging: comedi: das08: Correct AO output for das08jr-16-ao</title>
<updated>2012-10-02T16:47:24Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2012-08-31T19:41:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b004f11dd710379a31fa09ce22843b52e6f78a13'/>
<id>urn:sha1:b004f11dd710379a31fa09ce22843b52e6f78a13</id>
<content type='text'>
commit 61ed59ed09e6ad2b8395178ea5ad5f653bba08e3 upstream.

Don't zero out bits 15..12 of the data value in `das08jr_ao_winsn()` as
that knobbles the upper three-quarters of the output range for the
'das08jr-16-ao' board.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drivers/staging/comedi/comedi_fops.c: add missing vfree</title>
<updated>2012-06-01T07:12:54Z</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2012-04-22T11:37:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=512a8016c25d2045630b8933e7882169f7a98751'/>
<id>urn:sha1:512a8016c25d2045630b8933e7882169f7a98751</id>
<content type='text'>
commit abae41e6438b798e046d721b6ccdd55b4a398170 upstream.

aux_free is freed on all other exits from the function.  By removing the
return, we can benefit from the vfree already at the end of the function.

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Staging: comedi: fix signal handling in read and write</title>
<updated>2011-12-09T16:52:40Z</updated>
<author>
<name>Federico Vaga</name>
<email>federico.vaga@gmail.com</email>
</author>
<published>2011-10-29T07:47:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=56448baac0c3d52501dc26868e15caba1811866d'/>
<id>urn:sha1:56448baac0c3d52501dc26868e15caba1811866d</id>
<content type='text'>
commit 6a9ce6b654e491981f6ef7e214cbd4f63e033848 upstream.

After sleeping on a wait queue, signal_pending(current) should be
checked (not before sleeping).

Acked-by: Alessandro Rubini &lt;rubini@gnudd.com&gt;
Signed-off-by: Federico Vaga &lt;federico.vaga@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Staging: comedi: fix mmap_count</title>
<updated>2011-12-09T16:52:40Z</updated>
<author>
<name>Federico Vaga</name>
<email>federico.vaga@gmail.com</email>
</author>
<published>2011-10-29T07:45:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=261dbf437bce1d339c358e6566925905e49c13fe'/>
<id>urn:sha1:261dbf437bce1d339c358e6566925905e49c13fe</id>
<content type='text'>
commit df30b21cb0eed5ba8a8e0cdfeebc66ba8cde821d upstream.

In comedi_fops, mmap_count is decremented at comedi_vm_ops-&gt;close but
it is not incremented at comedi_vm_ops-&gt;open. This may result in a negative
counter.  The patch introduces the open method to keep the counter
consistent.

The bug was triggerd by this sample code:

        mmap(0, ...., comedi_fd);
        fork();
        exit(0);

Acked-by: Alessandro Rubini &lt;rubini@gnudd.com&gt;
Signed-off-by: Federico Vaga &lt;federico.vaga@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>staging: comedi: fix oops for USB DAQ devices.</title>
<updated>2011-12-09T16:52:40Z</updated>
<author>
<name>Bernd Porr</name>
<email>berndporr@f2s.com</email>
</author>
<published>2011-11-08T21:23:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9649803f2de0d2e77bdd7c5e1cbd4a7b3833f1e8'/>
<id>urn:sha1:9649803f2de0d2e77bdd7c5e1cbd4a7b3833f1e8</id>
<content type='text'>
commit 3ffab428f40849ed5f21bcfd7285bdef7902f9ca upstream.

This fixes kernel oops when an USB DAQ device is plugged out while it's
communicating with the userspace software.

Signed-off-by: Bernd Porr &lt;berndporr@f2s.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
</feed>
