[ovs-dev] [PATCH] ofproto-dpif-upcall: Properly initialize 'recv_buf'.
Justin Pettit
jpettit at nicira.com
Thu Aug 14 22:51:59 UTC 2014
On August 14, 2014 at 3:50:03 PM, Ethan Jackson (ethan at nicira.com) wrote:
> Due to a typo, the latest upcall refactoring caused dpif_recv() to be
> called on an un-initialized chunk of memory.
>
> Signed-off-by: Ethan Jackson
> Reported-by: Justin Pettit
> ---
> ofproto/ofproto-dpif-upcall.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c
> index 3b4ff5f..180684c 100644
> --- a/ofproto/ofproto-dpif-upcall.c
> +++ b/ofproto/ofproto-dpif-upcall.c
> @@ -586,7 +586,7 @@ recv_upcalls(struct handler *handler)
> struct flow flow;
> int error;
>
> - ofpbuf_use_stub(&recv_buf[n_upcalls], recv_stubs[n_upcalls],
> + ofpbuf_use_stub(recv_buf, recv_stubs[n_upcalls],
> sizeof recv_stubs[n_upcalls]);
> if (dpif_recv(udpif->dpif, handler->handler_id, &dupcall, recv_buf)) {
> ofpbuf_uninit(recv_buf);
Acked-by: Justin Pettit <jpettit at nicira.com>
--Justin
More information about the dev
mailing list