* Locking question, is this cool?
@ 2000-10-31 18:51 George Anzinger
2000-10-31 19:01 ` Alan Cox
0 siblings, 1 reply; 3+ messages in thread
From: George Anzinger @ 2000-10-31 18:51 UTC (permalink / raw)
To: linux-kernel@vger.redhat.com
At line 1073 of ../drivers/char/i2lib.c (2.4.0-test9) we find:
WRITE_LOCK_IRQSAVE(...
this is followed by:
COPY_FROM_USER(...
It seems to me that this could result in a page fault with interrupts
off. Is this ok?
George
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Locking question, is this cool?
2000-10-31 18:51 Locking question, is this cool? George Anzinger
@ 2000-10-31 19:01 ` Alan Cox
2000-10-31 19:43 ` George Anzinger
0 siblings, 1 reply; 3+ messages in thread
From: Alan Cox @ 2000-10-31 19:01 UTC (permalink / raw)
To: George Anzinger; +Cc: linux-kernel@vger.redhat.com
> At line 1073 of ../drivers/char/i2lib.c (2.4.0-test9) we find:
>
> WRITE_LOCK_IRQSAVE(...
>
> this is followed by:
>
> COPY_FROM_USER(...
>
> It seems to me that this could result in a page fault with interrupts
> off. Is this ok?
It wont do what you want - it'll re-enable irqs and may then deadlock. It might
need to copy the buffer to a temporary space then take the lock >
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Locking question, is this cool?
2000-10-31 19:01 ` Alan Cox
@ 2000-10-31 19:43 ` George Anzinger
0 siblings, 0 replies; 3+ messages in thread
From: George Anzinger @ 2000-10-31 19:43 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel@vger.redhat.com
Alan Cox wrote:
>
> > At line 1073 of ../drivers/char/i2lib.c (2.4.0-test9) we find:
> >
> > WRITE_LOCK_IRQSAVE(...
> >
> > this is followed by:
> >
> > COPY_FROM_USER(...
> >
> > It seems to me that this could result in a page fault with interrupts
> > off. Is this ok?
>
> It wont do what you want - it'll re-enable irqs and may then deadlock. It might
> need to copy the buffer to a temporary space then take the lock >
> -
I suspected as much. I see the same error (bug?) at line 978 of
../drivers/char/riotty.c
Seems like a common problem.
george
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2000-10-31 19:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-10-31 18:51 Locking question, is this cool? George Anzinger
2000-10-31 19:01 ` Alan Cox
2000-10-31 19:43 ` George Anzinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox