On 08/26/14 at 06:00pm, Madhu Challa wrote: > call odp_execute_actions__ only if there are any subactions to prevent null > pointer dereference in nl_attr_get(). > > Signed-off-by: Madhu Challa <cha...@noironetworks.com> > --- > lib/odp-execute.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/lib/odp-execute.c b/lib/odp-execute.c > index e1e9b57..607af03 100644 > --- a/lib/odp-execute.c > +++ b/lib/odp-execute.c > @@ -194,6 +194,9 @@ odp_execute_sample(void *dp, struct dpif_packet > *packet, bool steal, > } > } > > + if (subactions == NULL) > + return; > +
Or we call odp_execute_actions__() in the OVS_SAMPLE_ATTR_ACTIONS case directly and avoid the checks in the fast path. OVS is controlling the attribute ordering and we rely on it in a lot of other places. A probability attribute after the sub actions should be considered a bug. An OVS_NOT_REACHED() after the loop can handle the no sub actions case with an assert without affecting the fast path. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev