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

2014-09-08 Thread Alex Wang
Thx, applied to master, On Mon, Sep 8, 2014 at 11:18 AM, Ben Pfaff wrote: > 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

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

2014-09-08 Thread Ben Pfaff
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 uninitiali

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

2014-09-08 Thread Alex Wang
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

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

2014-09-08 Thread Alex Wang
Thx Ben, > It's a little unusual for an initialization function that fails to > still leave the object that it initializes ready to be destroyed. If > upcall_receive() fails, is there other data in 'upcall' that needs to > be destroyed? No, I don't think there is other data to be destroyed..

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

2014-09-08 Thread Ben Pfaff
On Mon, Sep 08, 2014 at 10:53:14AM -0700, Alex Wang wrote: > On current master, when 'upcall_receive()' returns error, the > ofpbuf 'upcall->put_actions' is uninitialized. In most cases, > the failure of 'upcall_receive()' will cause uninitialize of > 'upcall->put_actions' and free of uninitialize

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

2014-09-08 Thread Alex Wang
On current master, when 'upcall_receive()' returns error, the ofpbuf 'upcall->put_actions' is uninitialized. In most cases, the failure of 'upcall_receive()' will cause uninitialize of 'upcall->put_actions' and free of uninitialized pointer. This commit fixes the issue by making 'upcall_receive()