From: Go Taniguchi <go@turbolinux.co.jp>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, sd@turbolinux.co.jp
Subject: Re: [PATCH] removed socket buffer in unix domain socket
Date: Fri, 11 Jan 2002 22:23:56 +0900 [thread overview]
Message-ID: <3C3EE76C.1030808@turbolinux.co.jp> (raw)
In-Reply-To: <E16NaD0-0001Hs-00@the-village.bc.nu>
[-- Attachment #1: Type: text/plain, Size: 792 bytes --]
What size of actually used hash table --unix_socket_table--?
If it is 256, probably forall_unix_sockets is dangerous.
forall_unix_sockets use 257 table size.
And If I apply this fix, test program can work.
Alan Cox wrote:
>> */
>>- if(UNIXCB(skb).fp)
>>+ if(s->dead && UNIXCB(skb).fp)
>> {
>>
>
> The bug may be real but the fix would prevent garbage collection working
> at all - which I grant would fix the problem.
>
> You don't need a socket to be dead to want to garbage collect it. If a
> socket is getting disposed of while in use then there is a
> maybe_unmark_and.. call missing, or a lock on the unix socket table missing
> somewhere.
-- GO!
[-- Attachment #2: af_net.h.patch --]
[-- Type: text/plain, Size: 422 bytes --]
--- linux/include/net/af_unix.h.orig Tue Apr 25 05:43:04 2000
+++ linux/include/net/af_unix.h Fri Jan 11 21:49:57 2002
@@ -14,7 +14,7 @@
extern atomic_t unix_tot_inflight;
-#define forall_unix_sockets(i, s) for (i=0; i<=UNIX_HASH_SIZE; i++) \
+#define forall_unix_sockets(i, s) for (i=0; i<UNIX_HASH_SIZE; i++) \
for (s=unix_socket_table[i]; s; s=s->next)
struct unix_address
next prev parent reply other threads:[~2002-01-11 13:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-07 8:39 [PATCH] removed socket buffer in unix domain socket Yasuma Takeda
2002-01-07 9:11 ` Alexander Viro
2002-01-07 13:53 ` Alan Cox
2002-01-09 19:49 ` kuznet
2002-01-11 13:23 ` Go Taniguchi [this message]
2002-01-11 13:45 ` David S. Miller
2002-01-11 14:03 ` [sd:04032] " Go Taniguchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3C3EE76C.1030808@turbolinux.co.jp \
--to=go@turbolinux.co.jp \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=sd@turbolinux.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox