Can I make ipv6 module inactive at my pentaval driver?

From: SangOg Na <hidden>
Date: 2006-06-21 05:41:38

Hi!

I'm working for pentamedia in Korea.
My company makes one-way satellite receiver card whose name is pentavalue.
Pentavalue cards receive DVB-S packets and extract IP packets and
push them into TCP/IP stack.
pentavalue driver works in linux kernel 2.4.20.
I'm porting pentavalue driver to 2.6.17 kernel, but reference count problem 
occurs.
There is no code updating reference count in driver source.
I insert debug code in kernel source at dev_put and dev_hold
in include/linux/netdevice.h file.
 static inline void dev_put(struct net_device *dev)
 {
         atomic_dec(&dev->refcnt);
+        if (*(dev)->name=='p') {
+                printk("-%s- %d\n",dev->name,atomic_read(&dev->refcnt));
+                dump_stack();
+        }
 }

 static inline void dev_hold(struct net_device *dev)
 {
         atomic_inc(&dev->refcnt);
+        if (*(dev)->name=='p') {
+                printk("+%s+ %d\n",dev->name,atomic_read(&dev->refcnt));
+                dump_stack();
+        }
 }

I found ipv6 module notifier increase refcnt and not decrease refcnt.
refcnt increases by 3 when the device opens and closes using ifconfig.
I modified driver source for enabling rmmod by setting refcnt to 4 before 
cleanup module.
I will attach command log file. 

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help