[ovs-dev] [PATCH] ofproto:fix use-after-free

0-day Robot robot at bytheb.org
Fri Mar 6 13:59:03 UTC 2020


Bleep bloop.  Greetings guohongzhi, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
WARNING: Line is 89 characters long (recommended limit is 79)
#72 FILE: ofproto/ofproto.c:1744:
    /* Inorder to keep the code logical as before, we ref for ofproto when ofproto create

Lines checked: 138, Warnings: 1, Errors: 0


build:
mv -f ofproto/.deps/ofproto_libofproto_la-names.Tpo ofproto/.deps/ofproto_libofproto_la-names.Plo
/bin/sh ./libtool  --tag=CC   --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -I ./include -I ./include -I ./lib -I ./lib    -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wformat -Wformat-security -Wswitch-enum -Wunused-parameter -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers -fno-strict-aliasing -Wshadow -Werror -Werror   -g -O2 -MT ofproto/ofproto_libofproto_la-netflow.lo -MD -MP -MF ofproto/.deps/ofproto_libofproto_la-netflow.Tpo -c -o ofproto/ofproto_libofproto_la-netflow.lo `test -f 'ofproto/netflow.c' || echo './'`ofproto/netflow.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I ./include -I ./include -I ./lib -I ./lib -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wformat -Wformat-security -Wswitch-enum -Wunused-parameter -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers -fno-strict-aliasing -Wshadow -Werror -Werror -g -O2 -MT ofproto/ofproto_libofproto_la-netflow.lo -MD -MP -MF ofproto/.deps/ofproto_libofproto_la-netflow.Tpo -c ofproto/netflow.c -o ofproto/ofproto_libofproto_la-netflow.o
mv -f ofproto/.deps/ofproto_libofproto_la-netflow.Tpo ofproto/.deps/ofproto_libofproto_la-netflow.Plo
/bin/sh ./libtool  --tag=CC   --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I.    -I ./include -I ./include -I ./lib -I ./lib    -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wformat -Wformat-security -Wswitch-enum -Wunused-parameter -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers -fno-strict-aliasing -Wshadow -Werror -Werror   -g -O2 -MT ofproto/ofproto_libofproto_la-ofproto.lo -MD -MP -MF ofproto/.deps/ofproto_libofproto_la-ofproto.Tpo -c -o ofproto/ofproto_libofproto_la-ofproto.lo `test -f 'ofproto/ofproto.c' || echo './'`ofproto/ofproto.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I ./include -I ./include -I ./lib -I ./lib -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wformat -Wformat-security -Wswitch-enum -Wunused-parameter -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers -fno-strict-aliasing -Wshadow -Werror -Werror -g -O2 -MT ofproto/ofproto_libofproto_la-ofproto.lo -MD -MP -MF ofproto/.deps/ofproto_libofproto_la-ofproto.Tpo -c ofproto/ofproto.c -o ofproto/ofproto_libofproto_la-ofproto.o
ofproto/ofproto.c: In function 'ofproto_rule_create':
ofproto/ofproto.c:5290:5: error: passing argument 1 of 'ovs_refcount_ref' from incompatible pointer type [-Werror]
     ovs_refcount_ref(ofproto);
     ^
In file included from ./lib/ovs-rcu.h:161:0,
                 from ./lib/cmap.h:22,
                 from ./lib/classifier.h:301,
                 from ofproto/connmgr.h:20,
                 from ofproto/bundles.h:24,
                 from ofproto/ofproto.c:26:
./lib/ovs-atomic.h:535:1: note: expected 'struct ovs_refcount *' but argument is of type 'struct ofproto *'
 ovs_refcount_ref(struct ovs_refcount *refcount)
 ^
cc1: all warnings being treated as errors
make[2]: *** [ofproto/ofproto_libofproto_la-ofproto.lo] Error 1
make[2]: Leaving directory `/var/lib/jenkins/jobs/upstream_build_from_pw/workspace'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/lib/jenkins/jobs/upstream_build_from_pw/workspace'
make: *** [all] Error 2


Please check this out.  If you feel there has been an error, please email aconole at redhat.com

Thanks,
0-day Robot


More information about the dev mailing list