Dear all,
I try to modify inet_sendmsg() and inet_recvmsg().
To defer the time to notify a receiver, I use a timer for the problem.
But it causes "Scheduling in interrupt" error.
Is there any method to reform it?
Thank you for tour help
MingChieh Chang,
Taiwan
Scheduling in interrupt
invalid operand: 0000
CPU: 0
EIP: 0819:[<c0005d6f>] Not tainted
EFLAGS: 00010286
eax: 00000018 ebx: c19c2000 ecx: c0170894 edx: fbff9000
esi: c19c2000 edi: c1d42da0 ebp: c19c3cf4 esp: c19c3cd0
ds: 0821 es: 0821 ss: 0821
Process ftp (pid: 1312, stackpage=c19c3000)<1>
EX:
inet_sendmsg()
{
.
.
.
BYE:
if(sock->send_nonnotify_size>0&&0==sock->send_set_timer)
{
sock->send_notify_timer.function=notify_receiver;
sock->send_notify_timer.expires=MY_EXT_NOTIFY_TIME + jiffies;
sock->send_notify_timer.data=(unsigned long)(sock);
dbprintk("set notify timer, sock addr=%p\n",sock);
add_timer(&sock->send_notify_timer);
sock->send_set_timer=1;
}
release_sock(sock->sk);
}
static void notify_receiver(unsigned long data)
{
struct socket* sock=(struct socket*)data;
struct SHM_INFO shm_tmp;
if(!sock||!sock->sk)
return;
lock_sock(sock->sk);
sock->send_set_timer=0;
if(sock->send_nonnotify_size)
{
dbprintk("notify_receiver:notify
receivers,size=%d\n",sock->send_nonnotify_size);
sock->send_nonnotify_size=0;
shm_tmp.saddr=ntohl(sock->sk->saddr);
shm_tmp.sport=ntohl(sock->sk->sport);
shm_tmp.reqaddr=shm_tmp.saddr;
shm_tmp.reqport=shm_tmp.sport;
shm_tmp.daddr=ntohl(sock->sk->daddr);
shm_tmp.dport=ntohl(sock->sk->dport);
shm_tmp.maddr=NULL;
release_sock(sock->sk);
dbprintk("notift_recv: call send_data()......");
HYPERVISOR_send_data(&shm_tmp);
dbprintk("done\n");
return;
}
release_sock(sock->sk);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]