'SIG: sigpending lied' on 2.2.14 (Cobalt Networks)

Bart Trojanowski (bart@jukie.net)
Wed, 6 Jun 2001 15:34:32 -0400 (EDT)


I have been seeing 'SIG: sigpending lied' when I change the current->blocked
value to ignore 'non shutdown' signals. The messages does not show up on
2.2.16.

Searching with google I found a lot of problems being reported but no
solutions... Is this a 2.2.14 "feature"? I ask because we have clients
that still rely on the Cobalt build of 2.2.14.

Here is the long explonation...

I have a driver for a device that processes a steady stream of commands to
a PCI device. The calls come in on an ioctl and are send to the device.
While the command is being processed the user space process sleeps (in the
kernel). To prevent this sleep from waking up on non threatening
signals (like thread debugging) I added this code...

#define SHUTDOWN_SIGS \
(sigmask(SIGKILL) | sigmask(SIGINT) | sigmask(SIGQUIT))

spin_lock_irqsave(&current->sigmask_lock, irqflags);
sigset = current->blocked;
siginitsetinv(&current->blocked, SHUTDOWN_SIGS & ~sigset.sig[0]);
recalc_sigpending(current);
spin_unlock_irqrestore(&current->sigmask_lock, irqflags);

It is executed before I put the task on a wait queue and set it's state to
TASK_INTERRUPTIBLE. After the command is finished the h/w interrupt will
wake up the waitqueue and the task will be set to TASK_RUNNING again.
Finally the following is done to restore the signal state.

spin_lock_irqsave(&current->sigmask_lock, irqflags);
current->blocked = sigset;
recalc_sigpending(current);
spin_unlock_irqrestore(&current->sigmask_lock, irqflags);

When I comment out these two blocks, or when I switch to 2.2.16 my problem
goes away.

Thanks for reading this far,
Bart.

-- 
	WebSig: http://www.jukie.net/~bart/sig/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/