[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170815161132.GG16375@orbyte.nwl.cc>
Date: Tue, 15 Aug 2017 18:11:32 +0200
From: Phil Sutter <phil@....cc>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: netdev@...r.kernel.org
Subject: Re: [iproute PATCH 03/51] ipaddress: Make buffer for filter.flushb
static
On Tue, Aug 15, 2017 at 08:13:08AM -0700, Stephen Hemminger wrote:
> On Sat, 12 Aug 2017 14:04:22 +0200
> Phil Sutter <phil@....cc> wrote:
>
> > The buffer is accessed outside of the function defining it, so make it
> > static.
> >
> > Signed-off-by: Phil Sutter <phil@....cc>
>
> Where does a function access this buffer which is not a sibling?
flushb is (was) an auto-variable of ipaddr_flush() which makes
filter.flushb point to it. That pointer is dereferenced from
rtnl_send_check() called by flush_update() and from print_addrinfo(). I
have to admit, the code around flushing addresses is a bit of a mystery
to me, but I don't think it's safe to access function local storage from
outside of it's scope.
Cheers, Phil
Powered by blists - more mailing lists