<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/staging/android/sync.c, branch v3.18</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.18</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.18'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-09-15T02:33:47Z</updated>
<entry>
<title>Merge 3.17-rc5 into staging-next.</title>
<updated>2014-09-15T02:33:47Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2014-09-15T02:33:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=caf382fe31b7327a1e4449f1c05c0cc7fb5b90be'/>
<id>urn:sha1:caf382fe31b7327a1e4449f1c05c0cc7fb5b90be</id>
<content type='text'>
This fixes a merge conflict in lustre, and we want the other fixes that
went into 3.17-rc5 as well.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>android: fix reference leak in sync_fence_create</title>
<updated>2014-09-08T20:42:00Z</updated>
<author>
<name>Maarten Lankhorst</name>
<email>maarten.lankhorst@canonical.com</email>
</author>
<published>2014-09-01T12:47:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3ea411c56ef58a1827cf06fdcdeb14fa9265be09'/>
<id>urn:sha1:3ea411c56ef58a1827cf06fdcdeb14fa9265be09</id>
<content type='text'>
According to the documentation sync_fence_create takes ownership of the point,
not a reference on the point.

This fixes a memory leak introduced in 3.17's android fence rework.

Signed-off-by: Maarten Lankhorst &lt;maarten.lankhorst@canonical.com&gt;
Cc: Colin Cross &lt;ccross@google.com&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: android: use braces on all arms of if</title>
<updated>2014-09-02T19:28:45Z</updated>
<author>
<name>Grzegorz Swirski</name>
<email>grzegorz@swirski.name</email>
</author>
<published>2014-09-02T19:24:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=220f115e5edd2163cac6ba808588051d1dbbd62c'/>
<id>urn:sha1:220f115e5edd2163cac6ba808588051d1dbbd62c</id>
<content type='text'>
Signed-off-by: Grzegorz Swirski &lt;grzegorz@swirski.name&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: android: sync: Fix checkpatch warning: Missing a blank line after declarations</title>
<updated>2014-08-30T21:04:58Z</updated>
<author>
<name>Dipak Zope</name>
<email>dipakzope.kernel.org@gmail.com</email>
</author>
<published>2014-08-19T08:21:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7b1046e040670ee9fb2abe110fb24b33d91ada86'/>
<id>urn:sha1:7b1046e040670ee9fb2abe110fb24b33d91ada86</id>
<content type='text'>
Signed-off-by: Dipak Zope &lt;dipakzope.kernel.org@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'staging-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging</title>
<updated>2014-08-05T01:36:12Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-08-05T01:36:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=53ee983378ff23e8f3ff95ecf99dea7c6c221900'/>
<id>urn:sha1:53ee983378ff23e8f3ff95ecf99dea7c6c221900</id>
<content type='text'>
Pull staging driver updates from Greg KH:
 "Here's the big pull request for the staging driver tree for 3.17-rc1.

  Lots of things in here, over 2000 patches, but the best part is this:
   1480 files changed, 39070 insertions(+), 254659 deletions(-)

  Thanks to the great work of Kristina Martšenko, 14 different staging
  drivers have been removed from the tree as they were obsolete and no
  one was willing to work on cleaning them up.  Other than the driver
  removals, loads of cleanups are in here (comedi, lustre, etc.) as well
  as the usual IIO driver updates and additions.

  All of this has been in the linux-next tree for a while"

* tag 'staging-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (2199 commits)
  staging: comedi: addi_apci_1564: remove diagnostic interrupt support code
  staging: comedi: addi_apci_1564: add subdevice to check diagnostic status
  staging: wlan-ng: coding style problem fix
  staging: wlan-ng: fixing coding style problems
  staging: comedi: ii_pci20kc: request and ioremap memory
  staging: lustre: bitwise vs logical typo
  staging: dgnc: Remove unneeded dgnc_trace.c and dgnc_trace.h
  staging: dgnc: rephrase comment
  staging: comedi: ni_tio: remove some dead code
  staging: rtl8723au: Fix static symbol sparse warning
  staging: rtl8723au: usb_dvobj_init(): Remove unused variable 'pdev_desc'
  staging: rtl8723au: Do not duplicate kernel provided USB macros
  staging: rtl8723au: Remove never set struct pwrctrl_priv.bHWPowerdown
  staging: rtl8723au: Remove two never set variables
  staging: rtl8723au: RSSI_test is never set
  staging:r8190: coding style: Fixed checkpatch reported Error
  staging:r8180: coding style: Fixed too long lines
  staging:r8180: coding style: Fixed commenting style
  staging: lustre: ptlrpc: lproc_ptlrpc.c - fix dereferenceing user space buffer
  staging: lustre: ldlm: ldlm_resource.c - fix dereferenceing user space buffer
  ...
</content>
</entry>
<entry>
<title>staging: android: Clean up else statement from sync_fence_poll()</title>
<updated>2014-07-15T19:08:13Z</updated>
<author>
<name>Lucas Tanure</name>
<email>tanure@linux.com</email>
</author>
<published>2014-07-15T03:32:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6a44b50f9819571c2b871bffba107defec556a87'/>
<id>urn:sha1:6a44b50f9819571c2b871bffba107defec556a87</id>
<content type='text'>
Kernel coding style. Remove useless else statement after return.

Signed-off-by: Lucas Tanure &lt;tanure@linux.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>android: convert sync to fence api, v6</title>
<updated>2014-07-08T20:28:26Z</updated>
<author>
<name>Maarten Lankhorst</name>
<email>maarten.lankhorst@canonical.com</email>
</author>
<published>2014-07-01T10:57:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0f0d8406fb9c3c5ed1b1609a0f51c504c5b37aea'/>
<id>urn:sha1:0f0d8406fb9c3c5ed1b1609a0f51c504c5b37aea</id>
<content type='text'>
Just to show it's easy.

Android syncpoints can be mapped to a timeline. This removes the need
to maintain a separate api for synchronization. I've left the android
trace events in place, but the core fence events should already be
sufficient for debugging.

v2:
- Call fence_remove_callback in sync_fence_free if not all fences have fired.
v3:
- Merge Colin Cross' bugfixes, and the android fence merge optimization.
v4:
- Merge with the upstream fixes.
v5:
- Fix small style issues pointed out by Thomas Hellstrom.
v6:
- Fix for updates to fence api.

Signed-off-by: Maarten Lankhorst &lt;maarten.lankhorst@canonical.com&gt;
Acked-by: John Stultz &lt;john.stultz@linaro.org&gt;
Acked-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Acked-by: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: android: describe use of memory barrier on sync.c</title>
<updated>2014-05-25T18:09:14Z</updated>
<author>
<name>Niv Yehezkel</name>
<email>executerx@gmail.com</email>
</author>
<published>2014-05-24T14:28:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=296066093b5f5ccf30a9c3b2047eb6a8875a88f0'/>
<id>urn:sha1:296066093b5f5ccf30a9c3b2047eb6a8875a88f0</id>
<content type='text'>
Added comments describing the purpose of using write memory
barrier in the context of sync_timeline_destory.

Signed-off-by: Niv Yehezkel &lt;executerx@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: android: fix missing a blank line after declarations</title>
<updated>2014-05-03T23:46:30Z</updated>
<author>
<name>Seunghun Lee</name>
<email>waydi1@gmail.com</email>
</author>
<published>2014-04-30T16:30:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=10f62861b4a2f22cbd6412b3c42c76f0bdfbd648'/>
<id>urn:sha1:10f62861b4a2f22cbd6412b3c42c76f0bdfbd648</id>
<content type='text'>
This patch fixes "Missing a blank line after declarations" warnings.

Signed-off-by: Seunghun Lee &lt;waydi1@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: android: sync: Signal pt before sync_timeline object gets destroyed</title>
<updated>2014-02-07T17:36:27Z</updated>
<author>
<name>Prakash Kamliya</name>
<email>pkamliya@codeaurora.org</email>
</author>
<published>2014-02-05T00:08:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ac5b705b22642208764aa784ccc47f093d0212b5'/>
<id>urn:sha1:ac5b705b22642208764aa784ccc47f093d0212b5</id>
<content type='text'>
There is a race condition

Assume we have *one* sync_fence object, with *one* sync_pt
which belongs to *one* sync_timeline, given this condition,
sync_timeline-&gt;kref will have two counts, one for sync_timeline
(implicit) and another for sync_pt.

Assume following is the situation on CPU

Theead-1 : (Thread which calls sync_timeline_destroy())
  -&gt; (some function calls)
   -&gt; sync_timeline_destory()
    -&gt; sync_timeline_signal() (CPU is inside this
function after putting reference to sync_timeline)

At this time Thread-2 comes and does following

Thread-2 : (fclose on fence fd)
&gt; sync_fence_release() -&gt; because of fclose() on fence object
 -&gt; sync_fence_free()
  -&gt; sync_pt_free()
   -&gt; kref_put(&amp;pt-&gt;parent-&gt;kref, sync_timeline_free);
    -&gt; sync_timeline_free() (CPU is inside this because
this time kref will be zero after _put)

Thread-2 will free sync_timeline object before Thread-1
has finished its work inside sync_timeline_signal.

With this change we signals all sync_pt before putting
reference to sync_timeline object.

Cc: Colin Cross &lt;ccross@android.com&gt;
Cc: Android Kernel Team &lt;kernel-team@android.com&gt;
Signed-off-by: Prakash Kamliya &lt;pkamliya@codeaurora.org&gt;
[jstultz: minor commit subject tweak]
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
