[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFziVpH1qyf8M+GdJxh3oJWd84pdJbo94kuMfSi1QscLew@mail.gmail.com>
Date: Fri, 1 May 2015 11:37:24 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Alex Williamson <alex.williamson@...hat.com>,
Oleg Nesterov <oleg@...hat.com>
Cc: linux-kernel <linux-kernel@...r.kernel.org>,
kvm <kvm@...r.kernel.org>
Subject: Re: [GIT PULL] VFIO fixes for v4.1-rc2
On Fri, May 1, 2015 at 10:40 AM, Alex Williamson
<alex.williamson@...hat.com> wrote:
>
> - Flush signals on interrupted wait to retain polling interval (Alex Williamson)
This cannot *possibly* be right. If I read this patch right, you're
randomly just getting rid of signals. No way in hell is that correct.
"flush_signals()" is only for kernel threads, where it's a hacky
alternative to actually handling them (since kernel threads never
rreturn to user space and cannot really "handle" a signal). But you're
doing it in the ->remove handler for the device, which can be called
by arbitrary system processes. This is not a kernel thread thing, as
far as I can see.
If you cannot handle signals, you damn well shouldn't be using
"wait_event_interruptible_timeout()" to begin with. Get rid of the
"interruptible", since it apparently *isn't* interruptible.
So I'm not pulling this.
Now I'm worried that other drivers do insane things like this. I
wonder if we should add some sanity test to flush_signals() to make
sure that it can only ever get called from a kernel thread.
Oleg?
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists