Re: Top kernel oopses/warnings for the week of May 30th 2008

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Hugh Dickins
Date: Tuesday, June 10, 2008 - 5:42 am

On Mon, 9 Jun 2008, Ingo Molnar wrote:

Thanks for giving it a try.


Right, that would be with CONFIG_PREEMPT_VOLUNTARY.  Or in my case
with CONFIG_DEBUG_SPINLOCK_SLEEP, strnlen_user's might_sleep gives
BUG: sleeping function called from invalid context...

At first I thought it was just falling foul of our zeal for might_sleep.
But no, the warning is correct: the get_user(str) and strnlen_user(str)
can perfectly well fault, but my suggested patch lets them be called
with a kmap_atomic outstanding.

I doubt it would be cost-effective to kunmap_atomic for each little
string there.  I don't see a quick and effective way to fix it up.
I don't have the patience to go about adding get_user_inatomic and
strnlen_user_inatomic, there's more urgent things to be doing.

It would be nice to use a per-process kmap; or use an efficient
one-page mapping in the exec'ers userspace; or maybe just having
a kunmap_and_flush would help (to slow the cycling around pkmap
page table), though it would still involve the global spinlock.

Sorry, no quick and effective fix: please just drop the patch.

Thanks,
Hugh
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Top kernel oopses/warnings for the week of May 30th 2008, Arjan van de Ven, (Fri May 30, 9:39 am)
Re: Top kernel oopses/warnings for the week of May 30th 2008, Arjan van de Ven, (Fri May 30, 2:49 pm)
Re: Top kernel oopses/warnings for the week of May 30th 2008, Arjan van de Ven, (Fri May 30, 3:00 pm)
Re: Top kernel oopses/warnings for the week of May 30th 2008, Arjan van de Ven, (Fri May 30, 3:17 pm)
Re: Top kernel oopses/warnings for the week of May 30th 2008, Arjan van de Ven, (Fri May 30, 3:34 pm)
Re: Top kernel oopses/warnings for the week of May 30th 2008, Arjan van de Ven, (Fri May 30, 3:36 pm)
Re: Top kernel oopses/warnings for the week of May 30th 2008, Arjan van de Ven, (Sun Jun 1, 7:27 pm)
Re: Top kernel oopses/warnings for the week of May 30th 2008, Hugh Dickins, (Tue Jun 10, 5:42 am)