Index: zaptel.c =================================================================== RCS file: /usr/cvsroot/zaptel/zaptel.c,v retrieving revision 1.98 diff -u -r1.98 zaptel.c --- zaptel.c 4 Nov 2004 20:04:53 -0000 1.98 +++ zaptel.c 11 Jan 2005 17:19:13 -0000 @@ -4089,19 +4089,21 @@ rv = 0; break; case ZT_HOOK: + get_user(j,(int *)data); if (chan->flags & ZT_FLAG_CLEAR) return -EINVAL; if (chan->sig == ZT_SIG_CAS) return -EINVAL; /* if no span, just do nothing */ if (!chan->span) return(0); + spin_lock_irqsave(&chan->lock, flags); /* if dialing, stop it */ chan->curtone = NULL; chan->dialing = 0; chan->txdialbuf[0] = '\0'; chan->tonep = 0; chan->pdialcount = 0; - get_user(j,(int *)data); + spin_unlock_irqrestore(&chan->lock, flags); if (chan->span->flags & ZT_FLAG_RBS) { switch (j) { case ZT_ONHOOK: