From: Ben Greear <greearb@candelatech.com>
To: netdev <netdev@vger.kernel.org>
Subject: question on pktgen shutdown logic.
Date: Wed, 22 May 2013 16:15:39 -0700 [thread overview]
Message-ID: <519D519B.8040406@candelatech.com> (raw)
While looking at pktgen.c in 3.9.3, I cannot explain how
it does not race on shutdown.
The thread worker checks for pktgen_exiting, and will bail out
of it's main loop and initiate cleanup if this is true.
The pg_net_exit sets the pktgen_exiting to true, and then
proceedes to call
kthread_stop(t->tsk);
kfree(t);
What I don't understand is what keeps the kfree(t) from happening
before the thread has noticed pktgen_exiting is set and properly
bailed out of it's loop and finished cleanup?
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next reply other threads:[~2013-05-22 23:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-22 23:15 Ben Greear [this message]
2013-05-22 23:22 ` question on pktgen shutdown logic Eric Dumazet
2013-05-22 23:28 ` Ben Greear
2013-05-22 23:35 ` Eric Dumazet
2013-05-22 23:52 ` Ben Greear
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=519D519B.8040406@candelatech.com \
--to=greearb@candelatech.com \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).