alloc_skb called nonatomically from interrupt

2005-04-11 Thread Daniel Ann
Hiya folks

I'm trying to get a feel of notifier_call_chain(), but with no luck.
This is basically what I've done.

On 2.4.21, I've added dev_sample() function which I've declared and
implemented in include/linux/netdevice.h and net/core/dev.c
respectively.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
int dev_sample(struct net_device *dev)
{
notifier_call_chain(&netdev_chain, NETDEV_SAMPLE, dev);
return 0;
}
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Of course, I've defined NETDEV_SAMPLE in include/linux/notifier.h

Now up to this stage, its fine. Problem is when I try to call
dev_sample() from driver/net/natsemi.c (my network device driver).

natsemi.c has check_link function which runs periodically and checks
to see if cable is out. So I've placed my dev_sample() in this
function and have it called whenever status of cable changes. But as
soon as the status change, machine dies with "alloc_skb called
nonatomically from interrupt c00ba700", with some printk's I was able
to find out notifier_call_chain() was getting called. But it happens
when it traverses the &netdev_chain. (at the very first one in fact)

I've tried wrapping the dev_sample() with rtnl_lock and unlock but
with no luck. It looks to me its to do with accessing resource at a
wrong time, but I have no idea where to go from here.

Any suggestion would be appreciated.
Cheers,

-- 
Daniel
-
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/


BUG : alloc_skb called nonatomically from interrupt

2000-10-03 Thread Jun Sun


I am running Linux v2.4-test5 on MIPS (NEC DDB5476).  I got the above
run-time BUG report.  See the call stack below.  Can someone shed a
light on this problem?  Thanks.

Jun

--

reakpoint 2, alloc_skb (size=1531, gfp_mask=7) at skbuff.c:175
175 BUG();
(gdb) bt
#0  alloc_skb (size=1531, gfp_mask=7) at skbuff.c:175
#1  0x8012ffc8 in sock_alloc_send_skb (sk=0x81179640, size=1531,
fallback=0,
noblock=60, errcode=0x811f3cd0) at sock.c:816
#2  0x80142308 in ip_build_xmit_slow (sk=0x81179640,
getfrag=0x80158634 , frag=0x811f3d98, length=60,
ipc=0x811f3d88, rt=0x811f71c0, flags=16448) at ip_output.c:555
#3  0x801427d4 in ip_build_xmit (sk=0x81179640,
getfrag=0x80158634 , frag=0x811f3d98, length=4248,
ipc=0x811f3d88, rt=0x811f71c0, flags=16448) at ip_output.c:687
#4  0x80158b88 in udp_sendmsg (sk=0x81179640, msg=0x811f3e50, len=4220)
at udp.c:585
#5  0x8015f50c in inet_sendmsg (sock=0x801adf54, msg=0x811f3e50,
size=4220,
scm=0x3c) at af_inet.c:727
#6  0x8012d35c in sock_sendmsg (sock=0x8110a8b0, msg=0x811f3e50,
size=4220)
at socket.c:509
#7  0x8016dd1c in do_xprt_transmit (task=0x836a47c0) at xprt.c:215
#8  0x8016db6c in xprt_transmit (task=0x836a47c0) at xprt.c:1190
#9  0x8016b564 in call_transmit (task=0x836a47c0) at clnt.c:554
#10 0x8016f968 in __rpc_execute (task=0x836a47c0) at sched.c:574
#11 0x8016fde4 in __rpc_schedule () at sched.c:712
#12 0x801709d4 in rpciod (ptr=0x801adf54) at sched.c:1065
#13 0x8008c2f0 in kernel_thread (fn=0x80170810 , arg=0x801bb08c,

flags=5) at process.c:158
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: alloc_skb called nonatomically from interrupt

2000-09-23 Thread Marcelo Tosatti


On Sat, 23 Sep 2000, Jesper Juhl wrote:

> Hello people,
> 
> This is probably nothing important, but I thought I'd post it anyway in
> case it's of use to somebody.

Actually its important. 

> I just checked my syslog and noticed these strange messages:
> 
> Aug 29 19:05:19 dustpuppy kernel: Unable to handle kernel paging request
> at virtual address f006f004
> Aug 29 19:05:19 dustpuppy kernel: current->tss.cr3 = 03d34000, %cr3 =
> 03d34000
> Aug 29 19:05:19 dustpuppy kernel: *pde = 
> Aug 29 19:05:19 dustpuppy kernel: current->tss.cr3 = 03d34000, %cr3 =
> 03d34000
> Aug 29 19:05:19 dustpuppy kernel: *pde = 0000
> Aug 29 19:32:49 dustpuppy kernel: alloc_skb called nonatomically from
> interrupt c0188061
> Aug 29 19:32:49 dustpuppy kernel: alloc_skb called nonatomically from
> interrupt c016d60d
> 
> I don't recall having any problems with my machine lately, so this
> puzzels me.
> 
> The kernel I was running at the time was 2.2.13 (unfortunately I don't
> have that specific kernel anymore - upgraded to 2.2.17).
> My hardware is a IBM Thinkpad 600 - 233Mhz Pentium MMX with 64MB RAM.

If you have this problem with 2.2.17, put your System.map
available to download somewhere and mail this list again.

Thanks for your report. 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: alloc_skb called nonatomically from interrupt

2000-09-23 Thread juhl

> > This is probably nothing important, but I
thought I'd post it anyway in
> > case it's of use to somebody.
> 
> it is important, but unless you are unable
to provide a System.map from
> exactly the kernel image you were running
at that time, it is useless.
> 
> -- 
> Live long and prosper
> - Harald Welte / [EMAIL PROTECTED]   

I'm affraid I no longer have that specific
System.map file - I'll save them in the
future!

- Jesper Juhl
  [EMAIL PROTECTED] (please CC on replies)




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



alloc_skb called nonatomically from interrupt

2000-09-23 Thread Jesper Juhl

Hello people,

This is probably nothing important, but I thought I'd post it anyway in
case it's of use to somebody.

I just checked my syslog and noticed these strange messages:

Aug 29 19:05:19 dustpuppy kernel: Unable to handle kernel paging request
at virtual address f006f004
Aug 29 19:05:19 dustpuppy kernel: current->tss.cr3 = 03d34000, %cr3 =
03d34000
Aug 29 19:05:19 dustpuppy kernel: *pde = 
Aug 29 19:05:19 dustpuppy kernel: current->tss.cr3 = 03d34000, %cr3 =
03d34000
Aug 29 19:05:19 dustpuppy kernel: *pde = 
Aug 29 19:32:49 dustpuppy kernel: alloc_skb called nonatomically from
interrupt c0188061
Aug 29 19:32:49 dustpuppy kernel: alloc_skb called nonatomically from
interrupt c016d60d

I don't recall having any problems with my machine lately, so this
puzzels me.

The kernel I was running at the time was 2.2.13 (unfortunately I don't
have that specific kernel anymore - upgraded to 2.2.17).
My hardware is a IBM Thinkpad 600 - 233Mhz Pentium MMX with 64MB RAM.

I hope this is usefull to you guys!


BTW: Please CC me any replies to this, as I'm not on the list.


Best regards,
Jesper Juhl
[EMAIL PROTECTED]

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/