Re: [RFC PATCH v2] ipv6: make ipv6_renew_options() interrupt/kernel safe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 4, 2018 at 1:29 AM David Miller <davem@xxxxxxxxxxxxx> wrote:
> From: Paul Moore <pmoore@xxxxxxxxxx>
> Date: Mon, 02 Jul 2018 14:20:52 -0400
>
> > -static int ipv6_renew_option(void *ohdr,
> > -                          struct ipv6_opt_hdr __user *newopt, int newoptlen,
> > -                          int inherit,
> > -                          struct ipv6_opt_hdr **hdr,
> > -                          char **p)
> > +static void ipv6_renew_option(int renewtype,
> > +                           struct ipv6_opt_hdr **dest,
> > +                           struct ipv6_opt_hdr *old,
> > +                           struct ipv6_opt_hdr *new,
> > +                           int newtype, char **p)
> >  {
>  ...
> > +     p += CMSG_ALIGN(ipv6_optlen(*dest));
>
> I don't think this actually advances the pointer in the caller,
> you need something like:
>
>         *p += CMSG_ALIGN(ipv6_optlen(*dest));

Yep, my mistake (typo); thanks for catching it.  Rebuilding a test
kernel now ...

-- 
paul moore
www.paul-moore.com
_______________________________________________
Selinux mailing list
Selinux@xxxxxxxxxxxxx
To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.



[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux