From: David Miller <davem@davemloft.net>
To: gallatin@myri.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] prevent pktgen from using bad tx queue
Date: Wed, 13 Aug 2008 15:16:10 -0700 (PDT) [thread overview]
Message-ID: <20080813.151610.127721963.davem@davemloft.net> (raw)
In-Reply-To: <48A34541.6000008@myri.com>
From: Andrew Gallatin <gallatin@myri.com>
Date: Wed, 13 Aug 2008 16:34:09 -0400
>
> With the new multi-queue transmit code, it is possible to accidentally
> make pktgen pick a non-existing tx queue simply by using a stale
> script to drive pktgen. Access to this non-existing tx queue will
> then trigger a bad memory access and kill the machine.
>
> For example, setting "queue_map_max 2" will cause my machine to die
> when accessing a garbage spinlock in the non-existing tx queue:
>
> BUG: spinlock bad magic on CPU#0, kpktgend_0/564
> lock: ffff88001ddf6718, .magic: ffffffff, .owner: /-1, .owner_cpu: 0
> Pid: 564, comm: kpktgend_0 Not tainted 2.6.27-rc3 #35
>
> Call Trace:
> [<ffffffff803a1228>] spin_bug+0xa4/0xac
> [<ffffffff803a1253>] _raw_spin_lock+0x23/0x123
> [<ffffffff8055b06f>] _spin_lock_bh+0x17/0x1b
> [<ffffffff804cb57d>] pktgen_thread_worker+0xa97/0x1002
> [<ffffffff8022874d>] ? finish_task_switch+0x38/0x97
> [<ffffffff80242077>] ? autoremove_wake_function+0x0/0x36
> [<ffffffff80242077>] ? autoremove_wake_function+0x0/0x36
> [<ffffffff804caae6>] ? pktgen_thread_worker+0x0/0x1002
> [<ffffffff80241a40>] kthread+0x44/0x6d
> [<ffffffff8020c399>] child_rip+0xa/0x11
> [<ffffffff802419fc>] ? kthread+0x0/0x6d
> [<ffffffff8020c38f>] ? child_rip+0x0/0x11
>
> The attached patch adds some sanity checking to prevent
> these sorts of configuration errors.
>
> Signed-off-by: Andrew Gallatin <gallatin@myri.com>
Looks good, applied, thanks Andrew.
prev parent reply other threads:[~2008-08-13 22:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-13 20:34 [PATCH] prevent pktgen from using bad tx queue Andrew Gallatin
2008-08-13 22:16 ` David Miller [this message]
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=20080813.151610.127721963.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=gallatin@myri.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).