Re: [PATCH] net: check for NULL net_device in FIB tables

2016-07-04 Thread Julian Anastasov
Hello, On Tue, 5 Jul 2016, Vegard Nossum wrote: > > [PATCH RFC] ipv4: reject RTNH_F_LINKDOWN for incompatible routes > > > > The RTNH_F_LINKDOWN flag is used only for link routes. > > Reject it for error routes and local routes. > > > > Signed-off-by: Julian Anastasov > > Tested your p

Re: [PATCH] net: check for NULL net_device in FIB tables

2016-07-04 Thread Vegard Nossum
On 07/04/2016 11:24 PM, Julian Anastasov wrote: Hello, On Mon, 4 Jul 2016, Vegard Nossum wrote: Alright. Thanks for the review! I can submit a new patch to only check the one place above that actually crashed. Otherwise, if you think it's better to go with your fc_flags suggestion, f

Re: [PATCH] net: check for NULL net_device in FIB tables

2016-07-04 Thread Julian Anastasov
Hello, On Mon, 4 Jul 2016, Vegard Nossum wrote: > Alright. > > Thanks for the review! I can submit a new patch to only check the one > place above that actually crashed. Otherwise, if you think it's better > to go with your fc_flags suggestion, feel free to send a patch for that. > As y

Re: [PATCH] net: check for NULL net_device in FIB tables

2016-07-04 Thread Vegard Nossum
On 07/04/2016 09:45 PM, Julian Anastasov wrote: Hello, On Mon, 4 Jul 2016, Vegard Nossum wrote: struct fib_nh->nh_dev can be NULL, so we should check it before calling __in_dev_get_rcu on it. Multiple places seem to want this (and check the return value), so we can add a convenience

Re: [PATCH] net: check for NULL net_device in FIB tables

2016-07-04 Thread Julian Anastasov
Hello, On Mon, 4 Jul 2016, Vegard Nossum wrote: > struct fib_nh->nh_dev can be NULL, so we should check it before calling > __in_dev_get_rcu on it. > > Multiple places seem to want this (and check the return value), so we can > add a convenience wrapper for this. > > This fixes a crash

Re: [PATCH] net: check for NULL net_device in FIB tables

2016-07-04 Thread Vegard Nossum
On 07/04/2016 02:47 PM, Vegard Nossum wrote: struct fib_nh->nh_dev can be NULL, so we should check it before calling __in_dev_get_rcu on it. That should say __in_dev_get_rtnl(), obviously. Multiple places seem to want this (and check the return value), so we can add a convenience wrapper for

[PATCH] net: check for NULL net_device in FIB tables

2016-07-04 Thread Vegard Nossum
struct fib_nh->nh_dev can be NULL, so we should check it before calling __in_dev_get_rcu on it. Multiple places seem to want this (and check the return value), so we can add a convenience wrapper for this. This fixes a crash in AF_NETLINK sendmsg(). Please double check that I caught all the call