diff mbox

[ovs-dev,v1] socket-util: Fix recursion issue in sendmmsg

Message ID 20170714150650.10256-1-sysugaozhenyu@gmail.com
State Accepted
Headers show

Commit Message

Gao Zhenyu July 14, 2017, 3:06 p.m. UTC
The wrap_sendmmsg has infinite recursion issue.
Fix it by undef sendmmsg.

Signed-off-by: Zhenyu Gao <sysugaozhenyu@gmail.com>
---
 lib/socket-util.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Ben Pfaff July 14, 2017, 3:41 p.m. UTC | #1
On Fri, Jul 14, 2017 at 03:06:50PM +0000, Zhenyu Gao wrote:
> The wrap_sendmmsg has infinite recursion issue.
> Fix it by undef sendmmsg.
> 
> Signed-off-by: Zhenyu Gao <sysugaozhenyu@gmail.com>

Thanks!  I applied this to master.
Joe Stringer July 14, 2017, 8:11 p.m. UTC | #2
On 14 July 2017 at 08:41, Ben Pfaff <blp@ovn.org> wrote:
> On Fri, Jul 14, 2017 at 03:06:50PM +0000, Zhenyu Gao wrote:
>> The wrap_sendmmsg has infinite recursion issue.
>> Fix it by undef sendmmsg.
>>
>> Signed-off-by: Zhenyu Gao <sysugaozhenyu@gmail.com>
>
> Thanks!  I applied this to master.

It looks like this breaks Travis:
https://travis-ci.org/openvswitch/ovs/builds/253660557

Can we look into this or revert the change?
Ben Pfaff July 14, 2017, 9:20 p.m. UTC | #3
On Fri, Jul 14, 2017 at 01:11:01PM -0700, Joe Stringer wrote:
> On 14 July 2017 at 08:41, Ben Pfaff <blp@ovn.org> wrote:
> > On Fri, Jul 14, 2017 at 03:06:50PM +0000, Zhenyu Gao wrote:
> >> The wrap_sendmmsg has infinite recursion issue.
> >> Fix it by undef sendmmsg.
> >>
> >> Signed-off-by: Zhenyu Gao <sysugaozhenyu@gmail.com>
> >
> > Thanks!  I applied this to master.
> 
> It looks like this breaks Travis:
> https://travis-ci.org/openvswitch/ovs/builds/253660557
> 
> Can we look into this or revert the change?

Oops.

I sent a fix:
        https://mail.openvswitch.org/pipermail/ovs-dev/2017-July/335657.html
diff mbox

Patch

diff --git a/lib/socket-util.c b/lib/socket-util.c
index de7df67..04401d4 100644
--- a/lib/socket-util.c
+++ b/lib/socket-util.c
@@ -1043,6 +1043,9 @@  sendmmsg(int fd, struct mmsghdr *msgs, unsigned int n, unsigned int flags)
     return emulate_sendmmsg(fd, msgs, n, flags);
 }
 #else
+/* sendmmsg was redefined in lib/socket-util.c, should undef sendmmsg here
+ * to avoid recursion */
+#undef sendmmsg
 int
 wrap_sendmmsg(int fd, struct mmsghdr *msgs, unsigned int n, unsigned int flags)
 {