lkml.org 
[lkml]   [2004]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [ATM]: refcount atm sockets
Date
From
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.

In message <20040116125317.GD734@actcom.co.il>,Muli Ben-Yehuda writes:
>On Fri, Jan 16, 2004 at 10:02:24AM +0000, Linux Kernel Mailing List wrote:
>> ChangeSet 1.1405.1.4, 2004/01/16 02:02:24-08:00, chas@cmf.nrl.navy.mil
>>=20
>> [ATM]: refcount atm sockets
>
>> diff -Nru a/net/atm/common.c b/net/atm/common.c
>> --- a/net/atm/common.c Fri Jan 16 04:17:24 2004
>> +++ b/net/atm/common.c Fri Jan 16 04:17:24 2004
>> @@ -242,6 +242,8 @@
>> printk(KERN_DEBUG "vcc_sock_destruct: wmem leakage (%d bytes) d
>etected=
>=2E\n", atomic_read(&sk->wmem_alloc));
>> =20
>> 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?=20
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.030 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site