Re: linux-next oops in __lock_acquire for process_one_work

From: Tejun Heo
Date: Tue May 08 2012 - 12:58:20 EST

On Tue, May 08, 2012 at 03:03:22PM +0200, Peter Zijlstra wrote:
> I think there's a problem if indeed we do silly things like small copies
> like Hugh saw (why would gcc ever generate small copies for objects that
> are naturally aligned and naturally sized?).
> Something like the below should fix that problem, but it doesn't explain
> the observed issue..

Hmmm.... Hugh, can you please verify whether this patch makes the
problem go away somehow?

> @@ -1810,7 +1810,7 @@ __acquires(&gcwq->lock)
> * lock freed" warnings as well as problems when looking into
> * work->lockdep_map, make a copy and use that here.
> */
> - struct lockdep_map lockdep_map = work->lockdep_map;
> + struct lockdep_map lockdep_map = lockdep_copy_map(&work->lockdep_map);

If this is the correct fix for whatever reason, maybe we want the copy
interface to be a bit more conventional? lockdep_copy_map(to, from)?


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at