Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1305623
| From | Rabin Vincent <rabin@rab.in> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V7 02/24] coresight: associating path with session rather than tracer |
| Date | 2016-01-10 16:50 +0100 |
| Message-ID | <qPqpH-66L-1@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <qHarL-2rz-11@gated-at.bofh.it> <qHO5P-2iv-11@gated-at.bofh.it> <qNi3h-76n-19@gated-at.bofh.it> <qNzGP-3gi-17@gated-at.bofh.it> <qPqpH-66L-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Jan 05, 2016 at 03:23:20PM -0700, Mathieu Poirier wrote:
> On 5 January 2016 at 06:15, Rabin Vincent <rabin@rab.in> wrote:
> > The command sequence is exactly as mentioned above. The kernel is
> > v4.4rc-8 + all your patches from this thread + the OMAP coresight patch
> > I mentioned earlier.
>
> What patch was that? Would mind providing me with more information?
http://www.spinics.net/lists/kernel/msg2150809.html
> I fixed the kmalloc bug - it stemmed from a rebase conflict in the
> etm3x driver. On the flip side I haven't been able to reproduce the
> lockdep problem. But looking at the log you provided I can understand
> why the kernel is complaining.
>
> I produced a patch [1] and added you as a reporter. It would be great
> if you could give it a quick spin to see if the problem still persist.
> [1]. https://git.linaro.org/people/mathieu.poirier/coresight.git/commit/914353d1b625eccb0d1dda71047408a52f8811d3
It does silence the warning but simply using mutex_trylock() instead of
mutex_lock() does not seem like the correct fix. The lock dependency
problem lockdep is complaining about can be fixed for example by not
holding the coresight_mutex around the device_unregister()
coresight_unregister(). I don't quite see what the mutex is protecting
there?
BTW, there seem to be several problems with the unregistration:
- csdev->refcnt which is allocated with kcalloc() in
coresight_register() is never freed.
- csdev->conns is freed before device_unregister() rather than in the
release function.
- put_device() is not done on the csdev' conn->child_devs when it is
unregistered, so the reference taken by the bus_find_device() in
coresight_fixup_device_conns() is never released.
- There is no reference taken for the csdev when it is assigned as
some other device's child_dev in coresight_orphan_match()
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH V7 02/24] coresight: associating path with session rather than tracer Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-01-04 19:30 +0100
Re: [PATCH V7 02/24] coresight: associating path with session rather than tracer Rabin Vincent <rabin@rab.in> - 2016-01-10 16:50 +0100
Re: [PATCH V7 02/24] coresight: associating path with session rather than tracer Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-01-13 22:50 +0100
csiph-web