: refcount atm sockets
A message that is not in the archive (sent off-list or not yet received): [email protected]
Howdy, in this patchset for 2.4:
net/atm/common.c line 246
Quoted 13 lines · Linux Kernel Mailing List
ChangeSet 1.1405.1.4, 2004/01/16 02:02:24-08:00, [email protected]
[ATM]: refcount atm sockets
diff -Nru
a/net/atm/common.cb/net/atm/common.cnet/atm/common.c +2
-0@@ -242,6 +242,8 @@printk (KERN_DEBUG "vcc_sock_destruct: wmem leakage (%d bytes) detected.\n" ,atomic_read (&sk->wmem_alloc));kfree (sk->protinfo.af_atm); + +MOD_DEC_USE_COUNT ;
This has the usual wellknown races involved with handling the module's refcount from within the moodule. Is there a way to push the refcounting to the caller?
Cheers,
Muli
Signature · 4 lines
Muli Ben-Yehuda http://www.mulix.org | http://mulix.livejournal.com/ "the nucleus of linux oscillates my world" - gccbot@#offtopic
for 2.4 kernels i am afraid this is they way it has to be unless the upper socket layer is rewritten a bit. the purpose of this patch is to prevent stupid behavior. things will be bit racy but its better than being able to rmmod atm when 'non device' atm sockets are still open.
Quoted 20 lines · In message <[email protected]>,Muli Ben-Yehuda writes:
net/atm/common.c line 242
Quoted 9 lines · Linux Kernel Mailing List
ChangeSet 1.1405.1.4, 2004/01/16 02:02:24-08:00, [email protected] =20
[ATM]: refcount atm socketsdiff -Nru
a/net/atm/common.cb/net/atm/common.cnet/atm/common.c +0
-0@@ -242,6 +242,8 @@ printk(KERN_DEBUG "vcc_sock_destruct: wmem leakage (%d bytes) detected=
=2E\n",atomic_read(&sk->wmem_alloc));net/atm/common.c
Quoted 4 lines
=20
net/atm/common.c +2
-0kfree (sk->protinfo.af_atm); + +MOD_DEC_USE_COUNT ;This has the usual wellknown races involved with handling the module's refcount from within the moodule. Is there a way to push the refcounting to the caller?=20