From: Martin Lucina <mato@kotelna.sk>
To: netdev@vger.kernel.org
Cc: Martin Sustrik <sustrik@250bpm.com>
Subject: Correct procedure to close an in-kernel TCP socket
Date: Wed, 6 Apr 2011 13:55:45 +0200 [thread overview]
Message-ID: <20110406115545.GA16094@dezo.moloch.sk> (raw)
Hi,
We're having some problems with code that uses in-kernel TCP sockets
created with sock_create_kern().
At the moment we are doing this when closing a socket:
write_lock_bh(&s->sk->sk_callback_lock);
s->sk->sk_state_change = old_sk_state_change;
s->sk->sk_data_ready = old_sk_data_ready;
s->sk->sk_write_space = old_sk_write_space;
write_unlock_bh(&s->sk->sk_callback_lock);
/* ... */
sock_release(s);
We then see that at some point in the future our s->sk->sk_state_change
callback is still being called despite the code above restoring the
original values.
Is there something we're doing wrong?
Thanks,
-mato
reply other threads:[~2011-04-06 12:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20110406115545.GA16094@dezo.moloch.sk \
--to=mato@kotelna.sk \
--cc=netdev@vger.kernel.org \
--cc=sustrik@250bpm.com \
/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