[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20150521.232945.93773536631316420.davem@davemloft.net>
Date: Thu, 21 May 2015 23:29:45 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: sfeldma@...il.com
Cc: netdev@...r.kernel.org, jiri@...nulli.us,
simon.horman@...ronome.com, makita.toshiaki@....ntt.co.jp
Subject: Re: [PATCH net-next] rocker: move netevent neigh update to
processes context
From: sfeldma@...il.com
Date: Wed, 20 May 2015 22:05:07 -0700
> From: Scott Feldman <sfeldma@...il.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@...il.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.
--
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