bad code in fs/fifo.c (2.1.107)

Oren Laadan (orenl@cs.huji.ac.il)
Thu, 20 Aug 1998 17:15:14 +0300 (IDT)


Hi,

[ kernel 2.1.107 ]

Looking at fifo_open() in fs/fifo.c there seems to be a bad code (bug ?).
In all 3 cases there, there is a loop over interruptible_sleep_on(...)
without checking signals.

The code suggests that the sleep need not be interruptible at all (after
all, signals are not checked, and the wakeup in that case is *known* to
arrive, soon).

If you insist on leaving it interruptible - then signals must be checked
for. Otherwise it can waste CPU resources or lead to an infinite loop:
consider a process entering that loop with a signal pending and a high
priority - it will loop over and over for nothing. If this process has
RT priority, this could be an infinite loop, preemptying the other user
of the pipe ... (at least on UP).

Comments ?

Oren.
__________________________________________________________________________
______ ____ ___ ___ _ __ \
MOSIX Development Group ) ) ) ) ) ( ' ) \ / Oren Laadan \
The Hebrew University / / / / / \ / / orenl@cs.huji.ac.il \
of Jerusalem, Israel ( ( (___( ___) _(_ __/ \_______________________)

http://www.mosix.cs.huji.ac.il E-mail: mosix-devel@cs.huji.ac.il

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html