From: David Miller <davem@davemloft.net>
To: sfeldma@gmail.com
Cc: netdev@vger.kernel.org, jiri@resnulli.us,
simon.horman@netronome.com, makita.toshiaki@lab.ntt.co.jp
Subject: Re: [PATCH net-next] rocker: move netevent neigh update to processes context
Date: Thu, 21 May 2015 23:29:45 -0400 (EDT) [thread overview]
Message-ID: <20150521.232945.93773536631316420.davem@davemloft.net> (raw)
In-Reply-To: <1432184707-27252-1-git-send-email-sfeldma@gmail.com>
From: sfeldma@gmail.com
Date: Wed, 20 May 2015 22:05:07 -0700
> From: Scott Feldman <sfeldma@gmail.com>
>
> In review of Simon's patchset "rocker: transaction fixes". it was noted
> that rocker->neigh_tbl_next_index was unprotected in the call path below
> and could race with other contexts calling rocker_port_ipv4_neigh():
>
> arp_process()
> neigh_update()
> rocker_neigh_update()
> rocker_port_ipv4_neigh()
>
> To fix, move the neigh_update() event processing to process contexts and
> hold rtnl_lock to call rocker_port_ipv4_neigh(). This will protect
> rocker->neigh_tbl_next_index accesses and is more consistent with the rest
> of the driver code where non-I/O processing is done under process context
> with rtnl_lock held.
>
> Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Are you sure that the workqueue mechanism all by itself will ensure
that operations queued up will be processed in-order?
I do not know of any such explicit guarantee.
Therefore I think you will need a per-device workqueue with a list,
or something like that.
I could be wrong.
prev parent reply other threads:[~2015-05-22 3:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-21 5:05 [PATCH net-next] rocker: move netevent neigh update to processes context sfeldma
2015-05-21 7:37 ` Simon Horman
2015-05-21 8:00 ` Jiri Pirko
2015-05-21 8:53 ` Toshiaki Makita
2015-05-22 3: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=20150521.232945.93773536631316420.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jiri@resnulli.us \
--cc=makita.toshiaki@lab.ntt.co.jp \
--cc=netdev@vger.kernel.org \
--cc=sfeldma@gmail.com \
--cc=simon.horman@netronome.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;
as well as URLs for NNTP newsgroup(s).