From: David Miller <davem@davemloft.net>
To: nyushchenko@dev.rtsoft.ru
Cc: claudiu.manoil@freescale.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, dkrivoschokov@dev.rtsoft.ru,
kbaidarov@dev.rtsoft.ru
Subject: Re: [PATCH] net: gainfar: fix race between issuing and completing Tx
Date: Mon, 09 Dec 2013 20:29:00 -0500 (EST) [thread overview]
Message-ID: <20131209.202900.593427287326860030.davem@davemloft.net> (raw)
In-Reply-To: <1386333359-18854-1-git-send-email-nyushchenko@dev.rtsoft.ru>
From: Nikita Yushchenko <nyushchenko@dev.rtsoft.ru>
Date: Fri, 6 Dec 2013 16:35:59 +0400
> gfar_poll() checked Tx queue status without locking, thus allowing
> gfar_start_xmit() to alter it in parallel, which caused hang on every
> other nfsroot boot with RT enabled.
>
> This patch raises locking from gfar_clean_tx_ring() up to gfar_poll().
> With this change applied, hangs are no longer reproduced.
>
> Signed-off-by: Nikita Yushchenko <nyushchenko@dev.rtsoft.ru>
This is not sufficient.
You've left a huge comment in gfar_start_xmit() which explains that
the current locking is correct.
Whoever wrote that comment thought there were no problems with the
current arrangement.
If you want to change it, you have to adjust this comment, and also
explain exactly what races without your proposed change.
If you are going to take this lock, you might want to consider using
netif_tx_lock() since that is held across the entirety of any
netdev_ops->ndo_start_xmit() invocation.
prev parent reply other threads:[~2013-12-10 1:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-06 12:35 Nikita Yushchenko
2013-12-10 1:29 ` 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=20131209.202900.593427287326860030.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=claudiu.manoil@freescale.com \
--cc=dkrivoschokov@dev.rtsoft.ru \
--cc=kbaidarov@dev.rtsoft.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nyushchenko@dev.rtsoft.ru \
/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
all inboxes | Powered by JetHome®