[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20160517.140036.1802823189592173373.davem@davemloft.net>
Date: Tue, 17 May 2016 14:00:36 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: jiri@...nulli.us
Cc: netdev@...r.kernel.org, idosch@...lanox.com, eladr@...lanox.com,
yotamg@...lanox.com, nogahf@...lanox.com, ogerlitz@...lanox.com,
sfeldma@...il.com
Subject: Re: [patch net] switchdev: pass pointer to fib_info instead of copy
From: Jiri Pirko <jiri@...nulli.us>
Date: Tue, 17 May 2016 18:58:08 +0200
> From: Jiri Pirko <jiri@...lanox.com>
>
> The problem is that fib_info->nh is [0] so the struct fib_info
> allocation size depends on number of nexthops. If we just copy fib_info,
> we do not copy the nexthops info and driver accesses memory which is not
> ours.
Oops.
> Given the fact that fib4 does not defer operations and therefore it does
> not need copy, just pass the pointer down to drivers as it was done
> before.
>
> Fixes: 850d0cbc91 ("switchdev: remove pointers from switchdev objects")
> Signed-off-by: Jiri Pirko <jiri@...lanox.com>
Applied and queued up for -stable, thanks Jiri.
Powered by blists - more mailing lists