[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20131209.202900.593427287326860030.davem@davemloft.net>
Date: Mon, 09 Dec 2013 20:29:00 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: nyushchenko@....rtsoft.ru
Cc: claudiu.manoil@...escale.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, dkrivoschokov@....rtsoft.ru,
kbaidarov@....rtsoft.ru
Subject: Re: [PATCH] net: gainfar: fix race between issuing and completing
Tx
From: Nikita Yushchenko <nyushchenko@....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@....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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists