This is a note to let you know that I've just added the patch titled Subject: staging: iio: ring_sw: Fix incorrect test on successful read of last value, causes infinite loop to my gregkh-2.6 tree. Its filename is staging-iio-ring_sw-fix-incorrect-test-on-successful-read-of-last-value-causes-infinite-loop.patch This tree can be found at http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/ >From jic23@xxxxxxxxx Thu Apr 22 16:41:09 2010 From: Jonathan Cameron <jic23@xxxxxxxxx> Date: Tue, 30 Mar 2010 17:45:04 +0100 Subject: staging: iio: ring_sw: Fix incorrect test on successful read of last value, causes infinite loop To: "linux-iio@xxxxxxxxxxxxxxx" <linux-iio@xxxxxxxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxx> Message-ID: <4BB22A90.6070801@xxxxxxxxx> This is a bad one. The test means that almost no reads of the last value ever succeed! Result is an infinite loop. Another one for the 'oops' category. Signed-off-by: Jonathan Cameron <jic23@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx> --- drivers/staging/iio/ring_sw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/staging/iio/ring_sw.c +++ b/drivers/staging/iio/ring_sw.c @@ -293,7 +293,7 @@ again: return -EAGAIN; memcpy(data, last_written_p_copy, ring->buf.bpd); - if (unlikely(ring->last_written_p >= last_written_p_copy)) + if (unlikely(ring->last_written_p != last_written_p_copy)) goto again; iio_unmark_sw_rb_in_use(&ring->buf); -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html