git: if_start: Fix a race that could delay the packets transmission

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Sun Dec 16 20:21:35 PST 2012


commit 404c9fd95265d91463b866582cac4972bcdd13d5
Author: Sepherosa Ziehau <sephe at dragonflybsd.org>
Date:   Mon Dec 17 12:18:08 2012 +0800

    if_start: Fix a race that could delay the packets transmission
    
    Since if_start_need_schedule is called w/ the cached IFF_OACTIVE out
    side of ifnet's TX serializer, there could be a race that IFF_OACTIVE
    could be cleared before if_start_need_schedule but after releasing
    ifnet's TX serializer.  This could delay already queued packets
    transmission until the new packet is coming.  Fix this race by calling
    if_start_need_schedule inside ifnet's TX serializer.

Summary of changes:
 sys/net/if.c |   49 ++++++++++++++++++++++---------------------------
 1 files changed, 22 insertions(+), 27 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/404c9fd95265d91463b866582cac4972bcdd13d5


-- 
DragonFly BSD source repository



More information about the Commits mailing list