Re: tasks getting stuck on mmap_sem?

From: David Miller
Date: Tue Aug 17 2010 - 19:40:09 EST


From: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 17 Aug 2010 14:28:49 -0700

> Oh, and it strikes me when looking at the sparc rwsem-const.h that it
> has some unsigned constants in it. I think
>
> #define RWSEM_WAITING_BIAS 0xffff0000
>
> is actually unsigned, because it's a hex constant that doesn't fit in
> a signed int. So it's of type 'unsigned int' if I recall the C type
> rules right.

You were right all along, of course. Nice spotting.

Something was messed up with my testing methodology last night such
that I didn't test the revert of the lib/rwsem.c changes properly.
Those actually did in fact introduce the problem.

And fixing these sparc rwsem values to be signed constants fixes the bug.

Thanks guys.
--
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/