On Fri, Apr 26, 2019 at 2:57 PM Gregory Rose <[email protected]> wrote:
>
>
> On 4/26/2019 2:42 PM, Yifeng Sun wrote:
> > CC: Greg Rose <[email protected]>
> > CC: Yi-Hung Wei <[email protected]>
> > Fixes: f72469405eec9 ("datapath: meter: Use struct_size() in kzalloc()")
> > Signed-off-by: Yifeng Sun <[email protected]>
> > ---
> > v1->v2: Update 4.14.111 in travis by Greg's suggestion, thanks!
> > v2->v3: Fix patch title and comment of endif, thanks Yi-Hung!
> > .travis.yml | 2 +-
> > acinclude.m4 | 2 ++
> > datapath/linux/compat/include/linux/overflow.h | 4 ++--
> > datapath/meter.c | 1 +
> > 4 files changed, 6 insertions(+), 3 deletions(-)
> >
> > diff --git a/.travis.yml b/.travis.yml
> > index 32d5f1918495..468c39ecd505 100644
> > --- a/.travis.yml
> > +++ b/.travis.yml
> > @@ -39,7 +39,7 @@ env:
> > - KERNEL=4.17.19
> > - KERNEL=4.16.18
> > - KERNEL=4.15.18
> > - - KERNEL=4.14.63
> > + - KERNEL=4.14.111
> > - KERNEL=4.9.149
> > - KERNEL=4.4.148
> > - KERNEL=3.19.8
> > diff --git a/acinclude.m4 b/acinclude.m4
> > index 301aeb70d82a..b532a4579266 100644
> > --- a/acinclude.m4
> > +++ b/acinclude.m4
> > @@ -920,6 +920,8 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
> > [OVS_DEFINE([HAVE_INET_FRAGS_RND])])
> > OVS_GREP_IFELSE([$KSRC/include/linux/overflow.h], [__LINUX_OVERFLOW_H],
> > [OVS_DEFINE([HAVE_OVERFLOW_H])])
> > + OVS_GREP_IFELSE([$KSRC/include/linux/overflow.h], [struct_size],
> > + [OVS_DEFINE([HAVE_STRUCT_SIZE])])
> > OVS_GREP_IFELSE([$KSRC/include/linux/mm.h], [kvmalloc_array],
> > [OVS_DEFINE([HAVE_KVMALLOC_ARRAY])])
> > OVS_GREP_IFELSE([$KSRC/include/linux/mm.h], [kvmalloc_node],
> > diff --git a/datapath/linux/compat/include/linux/overflow.h
> > b/datapath/linux/compat/include/linux/overflow.h
> > index ff84356db16c..13ae6cf6a94a 100644
> > --- a/datapath/linux/compat/include/linux/overflow.h
> > +++ b/datapath/linux/compat/include/linux/overflow.h
> > @@ -1,5 +1,5 @@
> > /* SPDX-License-Identifier: GPL-2.0 OR MIT */
> > -#ifdef HAVE_OVERFLOW_H
> > +#if defined(HAVE_OVERFLOW_H) && defined(HAVE_STRUCT_SIZE)
> > #include_next <linux/overflow.h>
> > #else
> > #ifndef __LINUX_OVERFLOW_H
> > @@ -310,4 +310,4 @@ static inline __must_check size_t __ab_c_size(size_t n,
> > size_t size, size_t c)
> > sizeof(*(p)))
> >
> > #endif /* __LINUX_OVERFLOW_H */
> > -#endif /* HAVE_OVERFLOW_H */
> > +#endif /* defined(HAVE_OVERFLOW_H) && defined(HAVE_STRUCT_SIZE) */
> > diff --git a/datapath/meter.c b/datapath/meter.c
> > index 51ec1495033a..eda14682fb96 100644
> > --- a/datapath/meter.c
> > +++ b/datapath/meter.c
> > @@ -13,6 +13,7 @@
> > #include <linux/ip.h>
> > #include <linux/kernel.h>
> > #include <linux/openvswitch.h>
> > +#include <linux/overflow.h>
> > #include <linux/netlink.h>
> > #include <linux/rculist.h>
> >
> LGTM - passes travis, no check-kmod regressions...
>
> Tested-by: Greg Rose <[email protected]>
> Reviewed-by: Greg Rose <[email protected]>
>
Acked-by: Yi-Hung Wei <[email protected]>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev