[ovs-dev] [PATCH] ofproto-dpif-upcall: Fix a free of uninitialized memory.

Ben Pfaff blp at nicira.com
Mon Sep 8 18:18:57 UTC 2014


On Mon, Sep 08, 2014 at 11:13:34AM -0700, Alex Wang wrote:
> On current master, when 'upcall_receive()' returns error, the
> ofpbuf 'upcall->put_actions' is uninitialized.  In some usecase,
> the failure of 'upcall_receive()' will cause uninitialize of
> 'upcall->put_actions' and free of uninitialized pointer.
> 
> This commit fixes the issue by making the caller not conduct
> the uninitialize of the 'upcall' when there is error.
> 
> Found by inspection.
> 
> Signed-off-by: Alex Wang <alexw at nicira.com>
> 
> ---
> PATCH -> V2:
> 1. make the caller just return the error.
> 2. fix the comment to warn the user.

Acked-by: Ben Pfaff <blp at nicira.com>



More information about the dev mailing list