Re: [PATCH v4] CPU hotplug: active_writer not woken up in some cases - deadlock

From: David Hildenbrand
Date: Wed Dec 10 2014 - 14:23:57 EST


only thing that is bugging me is this part. Without the lock we can't
> > guarantee that another get_online_cpus() just arrived and bumped the refcount
> > to 0.
> >
> > Of course this only applies to misuse of put/get_online_cpus.
> >
> > We could hack some loop that tries to cmp_xchng with the old value until it
> > fits to work around this, but wouldn't make the code any better readable.
>
> Well, we didn't have this diagnostic in the original, so one approach
> would be to simply leave it out. Another approach would be to just
> have the WARN_ON() without the attempt to fix it up.
>
> Thanx, Paul

Well, I think the WARN_ON would be sufficient for debugging purposes.

Thanks!

David

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/