"Jeff Garzik" wrote:
> Theoretically, if you call unregister_netdev from rmmon, it should grab
> rtnl_lock and then complete the operation for you.  If that doesn't work
> for you, it sounds like you are not setting up, or cleaning up,
> something correctly.
> 
> Basically... it sounds like there are still bugs in your driver that
> need working out :)

I followed the value of dev->refcnt and there is something strange. before
the call to register_netdev it is set to 0 and after that it is increased to
1. but before the call to unregister_netdev it is somehow 2.

How can I tell who is modifying it and when ?

I tried using kdb to find out but it keeps hanging the machine. I wanted to
place a breakpoint that will pop if a certain memory address is accessed so
I did the following:

static void *p; (global - at the top of my source file)
EXPORT_SYMBOL (p);

in my probe function:
        p = (void*) dev->refcnt;

> insmod my_module
> ksyms

this showed that p is at address 0xd081ee90

then from within kdb:
kdb> md 0xd081ee90
0xd081ee90 c470bedc ........ ........

kdb> bpha 0xc470bedc
Forced Global Breakpoint at...

kdb> go

system hung


Is there a way to place a breakpoint on a memory address access ?

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

Reply via email to