linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [ATM]: refcount atm sockets
       [not found] <200401161217.i0GCHNjW019602@hera.kernel.org>
@ 2004-01-16 12:53 ` Muli Ben-Yehuda
  2004-01-16 17:41   ` chas williams
  0 siblings, 1 reply; 2+ messages in thread
From: Muli Ben-Yehuda @ 2004-01-16 12:53 UTC (permalink / raw)
  To: chas; +Cc: Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 907 bytes --]

Howdy, in this patchset for 2.4:

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
> 
> 	[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) 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 
-- 
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/

"the nucleus of linux oscillates my world" - gccbot@#offtopic


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ATM]: refcount atm sockets
  2004-01-16 12:53 ` [ATM]: refcount atm sockets Muli Ben-Yehuda
@ 2004-01-16 17:41   ` chas williams
  0 siblings, 0 replies; 2+ messages in thread
From: chas williams @ 2004-01-16 17:41 UTC (permalink / raw)
  To: Muli Ben-Yehuda; +Cc: Linux Kernel Mailing List

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-01-16 17:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200401161217.i0GCHNjW019602@hera.kernel.org>
2004-01-16 12:53 ` [ATM]: refcount atm sockets Muli Ben-Yehuda
2004-01-16 17:41   ` chas williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).