<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/media/usb/cpia2, branch linux-4.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.5.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.5.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-11-17T16:55:06Z</updated>
<entry>
<title>[media] media: fix waitqueue_active without memory barrier in cpia2 driver</title>
<updated>2015-11-17T16:55:06Z</updated>
<author>
<name>Kosuke Tatsukawa</name>
</author>
<published>2015-10-09T00:35:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5063452ecb1c1c56b319d1b89b1b67c1abd849b9'/>
<id>urn:sha1:5063452ecb1c1c56b319d1b89b1b67c1abd849b9</id>
<content type='text'>
cpia2_usb_disconnect() seems to be missing a memory barrier which might
cause the waker to not notice the waiter and miss sending a wake_up as
in the following figure.

	cpia2_usb_disconnect			sync
------------------------------------------------------------------------
					mutex_unlock(&amp;cam-&gt;v4l2_lock);
if (waitqueue_active(&amp;cam-&gt;wq_stream))
/* The CPU might reorder the test for
   the waitqueue up here, before
   prior writes complete */
					/* wait_event_interruptible */
					 /* __wait_event_interruptible */
					  /* ___wait_event */
					  long __int = prepare_to_wait_event(
					    &amp;wq, &amp;__wait, state);
					  if (!cam-&gt;streaming ||
					    frame-&gt;status == FRAME_READY)
cam-&gt;curbuff-&gt;status = FRAME_READY;
cam-&gt;curbuff-&gt;length = 0;
					  schedule()
------------------------------------------------------------------------

The attached patch removes the call to waitqueue_active() leaving just
wake_up() behind.  This fixes the problem because the call to
spin_lock_irqsave() in wake_up() will be an ACQUIRE operation.

I found this issue when I was looking through the linux source code
for places calling waitqueue_active() before wake_up*(), but without
preceding memory barriers, after sending a patch to fix a similar
issue in drivers/tty/n_tty.c  (Details about the original issue can be
found here: https://lkml.org/lkml/2015/9/28/849).

Signed-off-by: Kosuke Tatsukawa &lt;tatsu@ab.jp.nec.com&gt;
Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] media: remove the setting of the flag V4L2_FL_USE_FH_PRIO</title>
<updated>2014-07-04T19:14:59Z</updated>
<author>
<name>Ramakrishnan Muthukrishnan</name>
</author>
<published>2014-06-19T17:22:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=95cd5d5ee67c2108765ae87d34761d54fd6671ce'/>
<id>urn:sha1:95cd5d5ee67c2108765ae87d34761d54fd6671ce</id>
<content type='text'>
Since all the drivers that use `struct v4l2_fh' use the core
priority checking, the setting of the flag in the drivers can
be removed.

Signed-off-by: Ramakrishnan Muthukrishnan &lt;ramakrmu@cisco.com&gt;
Reviewed-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] media: Change variable type to bool</title>
<updated>2013-10-17T14:24:35Z</updated>
<author>
<name>Peter Senna Tschudin</name>
</author>
<published>2013-09-21T22:27:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b5eee19617a9d0b6e28fbbe7c669bbdc6a41a3e6'/>
<id>urn:sha1:b5eee19617a9d0b6e28fbbe7c669bbdc6a41a3e6</id>
<content type='text'>
The variable frame_ready is only assigned the values true and false.
Change its type to bool.
The simplified semantic patch that find this problem is as
follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
  b = ...;
  ... when any
  b = \(true\|false\)

Signed-off-by: Peter Senna Tschudin &lt;peter.senna@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
</content>
</entry>
<entry>
<title>[media] v4l: Tell user space we're using monotonic timestamps</title>
<updated>2012-12-21T13:20:51Z</updated>
<author>
<name>Sakari Ailus</name>
</author>
<published>2012-10-22T20:10:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1b18e7a0be859911b22138ce27258687efc528b8'/>
<id>urn:sha1:1b18e7a0be859911b22138ce27258687efc528b8</id>
<content type='text'>
Set buffer timestamp flags for videobuf, videobuf2 and drivers that use
neither.

Signed-off-by: Sakari Ailus &lt;sakari.ailus@iki.fi&gt;
Acked-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Acked-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] v4l: Convert drivers to use monotonic timestamps</title>
<updated>2012-12-21T12:56:43Z</updated>
<author>
<name>Sakari Ailus</name>
</author>
<published>2012-09-15T18:14:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8e6057b510aad354e017c6dfca7f386a0eb91b63'/>
<id>urn:sha1:8e6057b510aad354e017c6dfca7f386a0eb91b63</id>
<content type='text'>
Convert drivers using wall clock time (CLOCK_REALTIME) to timestamp from the
monotonic timer (CLOCK_MONOTONIC).

Signed-off-by: Sakari Ailus &lt;sakari.ailus@iki.fi&gt;
Acked-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] v4l2: make vidioc_s_jpegcomp const</title>
<updated>2012-09-26T13:43:04Z</updated>
<author>
<name>Hans Verkuil</name>
</author>
<published>2012-09-17T08:05:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d88aab53bd267c9fb0b0451e9acae68091703eab'/>
<id>urn:sha1:d88aab53bd267c9fb0b0451e9acae68091703eab</id>
<content type='text'>
Write-only ioctls should have a const argument in the ioctl op.
Do this conversion for vidioc_s_jpegcomp.
Adding const for write-only ioctls was decided during the 2012 Media Workshop.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] rename most media/video usb drivers to media/usb</title>
<updated>2012-08-15T19:25:07Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2012-08-14T03:13:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0c0d06cac63ee327ceaab4b5ffe2206574ab86bd'/>
<id>urn:sha1:0c0d06cac63ee327ceaab4b5ffe2206574ab86bd</id>
<content type='text'>
Rename all USB drivers with their own directory under
drivers/media/video into drivers/media/usb and update the
building system.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
</feed>
