Re: [PATCH net-next] netlink: Add nla_memdup() to wrap kmemdup() use on nlattr

2016-10-29 Thread David Miller
From: Thomas Graf Date: Wed, 26 Oct 2016 10:53:16 +0200 > Wrap several common instances of: > kmemdup(nla_data(attr), nla_len(attr), GFP_KERNEL); > > Signed-off-by: Thomas Graf Applied.

Re: [PATCH net-next] netlink: Add nla_memdup() to wrap kmemdup() use on nlattr

2016-10-26 Thread Johannes Berg
On Wed, 2016-10-26 at 11:52 +0200, Thomas Graf wrote: > On 10/26/16 at 10:59am, Johannes Berg wrote: > > > > > > > > > >  /** > > > + * nla_memdup - duplicate attribute memory (kmemdup) > > > + * @src: netlink attribute to duplicate from > > > + * @gfp: GFP mask > > > > Actually, is there any p

Re: [PATCH net-next] netlink: Add nla_memdup() to wrap kmemdup() use on nlattr

2016-10-26 Thread Thomas Graf
On 10/26/16 at 10:59am, Johannes Berg wrote: > > >  /** > > + * nla_memdup - duplicate attribute memory (kmemdup) > > + * @src: netlink attribute to duplicate from > > + * @gfp: GFP mask > > Actually, is there any point in passing a GFP mask? None of the current > users need it, and it seems fair

Re: [PATCH net-next] netlink: Add nla_memdup() to wrap kmemdup() use on nlattr

2016-10-26 Thread Daniel Borkmann
On 10/26/2016 10:53 AM, Thomas Graf wrote: Wrap several common instances of: kmemdup(nla_data(attr), nla_len(attr), GFP_KERNEL); Signed-off-by: Thomas Graf Thanks! Acked-by: Daniel Borkmann

Re: [PATCH net-next] netlink: Add nla_memdup() to wrap kmemdup() use on nlattr

2016-10-26 Thread Johannes Berg
>  /** > + * nla_memdup - duplicate attribute memory (kmemdup) > + * @src: netlink attribute to duplicate from > + * @gfp: GFP mask Actually, is there any point in passing a GFP mask? None of the current users need it, and it seems fairly unlikely to be needed since this is typically used on the

Re: [PATCH net-next] netlink: Add nla_memdup() to wrap kmemdup() use on nlattr

2016-10-26 Thread Johannes Berg
On Wed, 2016-10-26 at 10:53 +0200, Thomas Graf wrote: > Wrap several common instances of: > kmemdup(nla_data(attr), nla_len(attr), GFP_KERNEL); Makes sense Acked-by: Johannes Berg johannes

[PATCH net-next] netlink: Add nla_memdup() to wrap kmemdup() use on nlattr

2016-10-26 Thread Thomas Graf
Wrap several common instances of: kmemdup(nla_data(attr), nla_len(attr), GFP_KERNEL); Signed-off-by: Thomas Graf --- include/net/netlink.h | 10 ++ net/sched/act_bpf.c| 4 +--- net/sched/cls_bpf.c| 4 +--- net/wireless/nl80211.c | 3 +-- 4 files changed, 13 insertions