r' content='cgit v1.2.3-54-g00ecf'/>
<meta name='robots' content='noindex, nofollow'/>
<link rel='stylesheet' type='text/css' href='/cgit.css'/>
<script type='text/javascript' src='/cgit.js'></script>
<link rel='shortcut icon' href='http://distanz.ch/favicon.ico'/>
<link rel='alternate' title='Atom feed' href='https://git.distanz.ch/cgit.cgi/linux/net-next.git/atom/?h=master' type='application/atom+xml'/>
<link rel='vcs-git' href='git://git.distanz.ch/linux/net-next.git' title='net-next.git Git repository'/>
<link rel='vcs-git' href='http:///git.distanz.ch/cgit.cgi/linux/net-next.git' title='net-next.git Git repository'/>
</head>
<body>
<div id='cgit'><table id='header'>
<tr>
<td class='logo' rowspan='2'><a href='/cgit.cgi/'><img src='/cgit.png' alt='cgit logo'/></a></td>
<td class='main'><a href='/cgit.cgi/'>index</a> : <a href='/cgit.cgi/linux/net-next.git/'>net-next.git</a></td><td class='form'><form method='get'>
<input type='hidden' name='id' value='c81c0e0710f031cb09eb7cbf0e75e6754d1d8346'/><select name='h' onchange='this.form.submit();'>
<option value='emaclite-cleanup'>emaclite-cleanup</option>
<option value='master' selected='selected'>master</option>
<option value='nds-private-remove'>nds-private-remove</option>
<option value='packet-loop-back'>packet-loop-back</option>
<option value='packet-rx-pump-back'>packet-rx-pump-back</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>net-next plumbings</td><td class='sub right'>Tobias Klauser</td></tr></table>
<table class='tabs'><tr><td>
<a href='/cgit.cgi/linux/net-next.git/'>summary</a><a href='/cgit.cgi/linux/net-next.git/refs/?id=c81c0e0710f031cb09eb7cbf0e75e6754d1d8346'>refs</a><a href='/cgit.cgi/linux/net-next.git/log/'>log</a><a href='/cgit.cgi/linux/net-next.git/tree/?id=c81c0e0710f031cb09eb7cbf0e75e6754d1d8346'>tree</a><a class='active' href='/cgit.cgi/linux/net-next.git/commit/?id=c81c0e0710f031cb09eb7cbf0e75e6754d1d8346'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/?id=c81c0e0710f031cb09eb7cbf0e75e6754d1d8346'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/'>
<input type='hidden' name='id' value='c81c0e0710f031cb09eb7cbf0e75e6754d1d8346'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='content'><div class='cgit-panel'><b>diff options</b><form method='get'><input type='hidden' name='id' value='c81c0e0710f031cb09eb7cbf0e75e6754d1d8346'/><table><tr><td colspan='2'/></tr><tr><td class='label'>context:</td><td class='ctrl'><select name='context' onchange='this.form.submit();'><option value='1'>1</option><option value='2'>2</option><option value='3' selected='selected'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</option><option value='9'>9</option><option value='10'>10</option><option value='15'>15</option><option value='20'>20</option><option value='25'>25</option><option value='30'>30</option><option value='35'>35</option><option value='40'>40</option></select></td></tr><tr><td class='label'>space:</td><td class='ctrl'><select name='ignorews' onchange='this.form.submit();'><option value='0' selected='selected'>include</option><option value='1'>ignore</option></select></td></tr><tr><td class='label'>mode:</td><td class='ctrl'><select name='dt' onchange='this.form.submit();'><option value='0' selected='selected'>unified</option><option value='1'>ssdiff</option><option value='2'>stat only</option></select></td></tr><tr><td/><td class='ctrl'><noscript><input type='submit' value='reload'/></noscript></td></tr></table></form></div><table summary='commit info' class='commit-info'>
<tr><th>author</th><td>Loic Pallardy &lt;loic.pallardy@st.com&gt;</td><td class='right'>2016-12-14 16:11:00 +0100</td></tr>
<tr><th>committer</th><td>Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;</td><td class='right'>2016-12-30 03:15:42 -0800</td></tr>
<tr><th>commit</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/?id=c81c0e0710f031cb09eb7cbf0e75e6754d1d8346'>c81c0e0710f031cb09eb7cbf0e75e6754d1d8346</a> (<a href='/cgit.cgi/linux/net-next.git/patch/?id=c81c0e0710f031cb09eb7cbf0e75e6754d1d8346'>patch</a>)</td></tr>
<tr><th>tree</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/tree/?id=c81c0e0710f031cb09eb7cbf0e75e6754d1d8346'>e517c5a8f9c4c359908d192eb64c69acb237938a</a></td></tr>
<tr><th>parent</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/?id=7ce7d89f48834cefece7804d38fc5d85382edf77'>7ce7d89f48834cefece7804d38fc5d85382edf77</a> (<a href='/cgit.cgi/linux/net-next.git/diff/?id=c81c0e0710f031cb09eb7cbf0e75e6754d1d8346&amp;id2=7ce7d89f48834cefece7804d38fc5d85382edf77'>diff</a>)</td></tr></table>
<div class='commit-subject'>remoteproc: fix vdev reference management</div><div class='commit-msg'>Commit 2b45cef5868a ("remoteproc: Further extend the vdev life cycle")
extends kref support for vdev management.
It introduces a regression when following sequence is executed:
rproc_boot --&gt; rproc_shutdown --&gt; rproc_boot
Second rproc_boot call crashes on register_virtio_device as device
is already existing.
Issue is previous vdev is never released when rproc is stop because
associated refcount is too high.

kref_get introduces is not needed as kref_init already initializes
krefcount to 1 because it considers associated variable as used.
This introduces a misalignment between kref_get and kref_put calls.

Fixes: 2b45cef5868a ("remoteproc: Further extend the vdev life cycle")
Signed-off-by: Loic Pallardy &lt;loic.pallardy@st.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</div><div class='diffstat-header'><a href='/cgit.cgi/linux/net-next.git/diff/?id=c81c0e0710f031cb09eb7cbf0e75e6754d1d8346'>Diffstat</a></div><table summary='diffstat' class='diffstat'>