[ovs-git] [openvswitch/ovs] 433330: dpif-netdev: Fix a race.
GitHub
noreply at github.com
Mon Dec 1 18:51:12 UTC 2014
Branch: refs/heads/master
Home: https://github.com/openvswitch/ovs
Commit: 433330a8bfaf38b41bbe3c482c57562202ba1e61
https://github.com/openvswitch/ovs/commit/433330a8bfaf38b41bbe3c482c57562202ba1e61
Author: Alex Wang <alexw at nicira.com>
Date: 2014-12-01 (Mon, 01 Dec 2014)
Changed paths:
M lib/dpif-netdev.c
Log Message:
-----------
dpif-netdev: Fix a race.
On current master, the 'struct dp_netdev_port' is destroyed
immediately when the ref count reaches 0. However, non-pmd
threads calling the dpif_netdev_execute() for sending packets
could hold pointer to 'port' that is not ref-counted. Thusly
those threads could possibly access freed memory when the port
is deleted.
To fix this bug, this commit makes non-pmd threads acquiring
the 'port_mutex' before doing the actual execution in
dpif_netdev_execute().
Signed-off-by: Alex Wang <alexw at nicira.com>
Acked-by: Pravin B Shelar <pshelar at nicira.com>
More information about the git
mailing list