mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* 'SIG: sigpending lied' on 2.2.14 (Cobalt Networks)
@ 2001-06-06 19:34 Bart Trojanowski
  0 siblings, 0 replies; only message in thread
From: Bart Trojanowski @ 2001-06-06 19:34 UTC (permalink / raw)
  To: LKML


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/



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-06-06 19:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-06 19:34 'SIG: sigpending lied' on 2.2.14 (Cobalt Networks) Bart Trojanowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®