From: 9a4gl@9a0tcp.ampr.org (Tihomir Heidelberg)
To: mctylr@privacy.nb.ca
Cc: linux-hams@vger.kernel.org
Subject: Re: ax25 kernel problem sometimes accur
Date: Thu, 05 Dec 02 15:43:05 CET [thread overview]
Message-ID: <19525@9A0TCP> (raw)
In-Reply-To: your message of Thu, 5 Dec 2002 01:16:41 +0000. <20021205011641.A18121@pull.privacy.nb.ca>
Hi,
>> static void ax25_free_sock(struct sock *sk)
>> {
>> ax25_free_cb(sk->protinfo.ax25);
>> sk->protinfo.ax25->sk=NULL;
>> }
>> ...
>Well, it could crash your system. sk->protinfo.ax25 is kfree'ed in
>the line before it, so you are accessing invalid data...
>
>Your suggestion wants to be equalivent to sk = NULL;,
>so you should at least change it to use a valid statement.
>Though I wonder if you meant sk->protinfo.ax25 = NULL;
yap, you are right, this is not good. if anyone add that line,
please remove it, it can make problems.. but interesting is
that the kernel does not crash, hm...
that kfree is to short function to notice :)
I thought it does not free it beacuse it does not remove it
from ax25_list. But, after some debuging I see that control block
is removed before from ax25_list, and then ax25_free_sock is
called to clean the rest.
but, why we clean the ax25 connection in two steps ? I looked
in other protocols source and very few of them use socket
destruct... why ax25_release do not clean all ?
the problem I am trying to solve is why ax25_get_info get
crash... the one reason may be that we have dead socket in
control block of one of our connection (because other
connections are still working), and that can occur if from any
reason destructor is called without previous calling ax25_release.
Maybe there are other reasons, but just want to check if this
one is or isn't our problem.
how bad is idea to clean all for both destruct and ax25_release
in case it is not cleaned from the other one ? to me this is
not nice, but....
so, will play with it and add some debugging info and wait
to see if I can catch anything usefull.
73 de Tihomir Heidelberg, 9a4gl@9a0tcp.ampr.org
next prev parent reply other threads:[~2002-12-05 14:43 UTC|newest]
Thread overview: 95+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-04 7:21 ax25 kernel problem sometimes accur Tihomir Heidelberg
2002-12-04 11:04 ` Sandor Dibuz
2002-12-04 20:20 ` Tihomir Heidelberg
2002-12-04 21:54 ` Kjell Jarl
2002-12-05 1:16 ` M Taylor
2002-12-05 14:43 ` Tihomir Heidelberg [this message]
2002-12-04 19:42 ` Stewart Wilkinson
2002-12-07 1:10 ` Ralf Baechle DO1GRB
2002-12-07 19:32 ` Tomi Manninen
2002-12-07 23:39 ` Ralf Baechle DO1GRB
2002-12-10 14:09 ` Tomi Manninen OH2BNS
2002-12-11 1:40 ` Ralf Baechle DO1GRB
2002-12-11 10:29 ` Tomi Manninen OH2BNS
2002-12-11 12:30 ` Ralf Baechle DO1GRB
2002-12-11 13:36 ` mvw
2002-12-11 15:32 ` Jeroen Vreeken
2002-12-11 17:56 ` Curt Mills, WE7U
2002-12-11 21:57 ` Success! TWO questions remain mvw
2002-12-12 13:16 ` mvw
2002-12-12 13:28 ` Hamish Moffatt
2002-12-12 15:25 ` Margaret Leber
2002-12-12 17:27 ` Curt Mills, WE7U
2002-12-12 17:36 ` Kelly Black
2002-12-12 18:21 ` And another question Michael Willems
2002-12-12 21:14 ` Tomi Manninen
2002-12-19 0:09 ` BBS - recommendations? mvw
2002-12-19 3:59 ` Michael Melanson
2002-12-12 21:44 ` Success! TWO questions remain Hamish Moffatt
2002-12-12 17:34 ` Ken Koster
2002-12-12 20:54 ` Tomi Manninen
2002-12-12 21:45 ` Hamish Moffatt
2002-12-13 3:12 ` Jack Zielke
2002-12-14 15:35 ` listen, permissions mvw
2002-12-14 15:43 ` Luc Langehegermann
2002-12-14 15:59 ` mvw
2002-12-14 17:48 ` Tomi Manninen
2002-12-14 16:07 ` Dennis Boone
2002-12-16 18:36 ` Curt Mills, WE7U
2002-12-24 5:15 ` Simple BBS, again, sorry for asking twice mvw
2002-12-24 6:54 ` Wilbert Knol
2002-12-24 21:43 ` mvw
2002-12-25 2:11 ` Tomi Manninen
2002-12-25 3:55 ` mvw
2002-12-25 4:36 ` fbb compile mvw
2002-12-25 5:13 ` FBB mvw
2002-12-25 9:14 ` FBB Cees Tool
2002-12-25 10:23 ` FBB Joop Stakenborg
2002-12-25 14:54 ` FBB mvw
2002-12-25 23:08 ` FBB Joop Stakenborg
2002-12-26 19:13 ` FBB... any more help? mvw
2002-12-26 23:21 ` Chuck Gelm
2002-12-27 0:05 ` mvw
2002-12-27 2:50 ` Chuck Gelm
2002-12-25 20:01 ` FBB mvw
2002-12-25 21:31 ` FBB Cees Tool
2002-12-25 22:02 ` FBB mvw
2002-12-25 22:38 ` FBB Cees Tool
2002-12-25 22:05 ` FBB... (follow up) mvw
2002-12-25 22:11 ` Tomi Manninen
2002-12-26 4:12 ` mvw
2002-12-25 22:34 ` FBB Tomi Manninen
2002-12-25 22:45 ` FBB Joop Stakenborg
2002-12-25 21:18 ` FBB Tomi Manninen
2002-12-25 5:32 ` Simple BBS, again, sorry for asking twice Steve Fraser
2002-12-25 9:30 ` Wilbert Knol
2002-12-25 21:59 ` Steve Fraser
2002-12-26 0:31 ` Wilbert Knol
2002-12-26 4:10 ` Bob Nielsen
2002-12-26 10:23 ` Wilbert Knol
2002-12-25 8:43 ` Kernel compile option? Vivi Kusumo
2002-12-25 20:24 ` Tomi Manninen
2002-12-29 19:35 ` packet radio indoor Vivi Kusumo
2002-12-29 23:30 ` Wilbert Knol
2002-12-30 21:48 ` packet radio indoor :-( Vivi Kusumo
2002-12-31 6:55 ` Wilbert Knol
2002-12-30 2:39 ` packet radio indoor Chuck Gelm
2002-12-27 7:16 ` Simple BBS, again, sorry for asking twice Robin Gilks
2002-12-27 13:50 ` mvw
2002-12-27 17:41 ` ax25 pakcet problem: any ideas? mvw
2002-12-27 19:14 ` Tomi Manninen
2002-12-27 20:00 ` mvw
2002-12-27 20:14 ` Tomi Manninen
2002-12-30 3:18 ` tcp.ip over ax25, when sent? mvw
2002-12-30 3:24 ` Hamish Moffatt
2002-12-30 3:32 ` Henrique Miranda
2002-12-30 5:28 ` Wilbert Knol
2002-12-30 6:12 ` Bob Nielsen
2002-12-30 6:45 ` Bob Nielsen
2002-12-30 6:58 ` Tomi Manninen OH2BNS
2002-12-30 23:37 ` Bob Nielsen
2002-12-12 17:40 ` Success! TWO questions remain Ken Koster
2002-12-12 18:09 ` Michael Willems
2002-12-12 17:24 ` Curt Mills, WE7U
2002-12-12 14:09 ` cyberdoc
2002-12-17 17:37 ` Thomas Osterried
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=19525@9A0TCP \
--to=9a4gl@9a0tcp.ampr.org \
--cc=linux-hams@vger.kernel.org \
--cc=mctylr@privacy.nb.ca \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.