From: Thomas Osterried <thomas@osterried.de>
To: Tihomir Heidelberg <9a4gl@9a0tcp.ampr.org>
Subject: Re: AX.25 unaccepted socket makes problems
Date: Wed, 28 May 2003 12:25:31 +0200 [thread overview]
Message-ID: <20030528102531.GB4379@osterried.de> (raw)
In-Reply-To: <2278@9A0TCP>
> also I think that skb->sk->pair should be set to NULL, because from this
> point the pair (listening socket) does not exist any more and reference
> to this can cause problem, right ?
hmm. the listening socket exists as long the userspace application does
listen().
but i do not really understand the sk->pair concept.
also i have problems in understanding the concept in ax25_destroy_socket():
skb->sk->dead is set to 1, then ax25_start_heartbeat() is called, which
is a timer (which expires in +5s).
if we set it to skb->sk->state = TCP_LISTEN and our state is
AX25_STATE_0, then this timer will call ax25_destroy_socket() again.
due to the timer it is not a loop (hopefully), but after our first
ax25_destroy_socket() goes further down (ax25->sk == NULL), we will call
ax25_free_cb(ax25). what will our timer do, which we restarted above and
which will work on this ax25 control block?
and: if ax25->sk is != NULL and there are no in/outstanding buffer, there's
only an sk_free(ax25->sk). the socket is not destroyed, but ax25->sk is not
set to NULL. does it refer now to an unassigned memory segment? should'n
in this case ax25_free_cb() called too? here also the problem with a
potentially running ax25_std_heartbeat_expiry(), which will use ax25->sk->...
we have just free'd.
well, i deeply hope there's someone out there who knows how this code works ;)
> > [as i mentioned also, ax25rtd which adds ax25 route lists to the kernel,
> > causes troubles to the kernel. perhaps it's one of those routines which
> > messes up the ax25 cb lists as side effect]
>
> ax25rtd/axparms calls ioctl(SIOCADDRT) on ax.25 socket, I see that
> ax25_route_list is not protected with cli() stuff, maybe we should
> protect this list too ? dont know how this can hurt ax25_list, but
> protecting this list will not hurt anyone...
just thought the same some weeks ago.
i have done this (interested in?). after the observation that when
ax25rtd is running, the oops problem on ax25 cb's (which are independend
of the ax25 route list) occorued.
unfotunately, i never found a way to produce the corrupted ax25 cb list
by force. thus i only could wait for oopses. and my system where i tried
this never oopsed :(
> anyway, I read that Ralf is doing some things in 2.5 kernel tree,
> spinlock instead cli() protection should be used in future ax.25
> kernel, as I read Ralf works on spinlock in ax.25 code... should
> we move to spinlocks in 2.4 kernels too or we will wait for 2.6 ?
i'd advice not to hack too much in the current code. we may get more
problems or side-effects.
73,
- thomas
next prev parent reply other threads:[~2003-05-28 10:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-27 16:17 AX.25 unaccepted socket makes problems Tihomir Heidelberg
2003-05-28 0:04 ` Thomas Osterried
2003-05-28 6:46 ` Tihomir Heidelberg
2003-05-28 10:20 ` Steven Whitehouse
2003-05-28 10:25 ` Thomas Osterried [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-05-28 12:29 Tihomir Heidelberg
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=20030528102531.GB4379@osterried.de \
--to=thomas@osterried.de \
--cc=9a4gl@9a0tcp.ampr.org \
/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