[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1506517514.2108.2.camel@sipsolutions.net>
Date: Wed, 27 Sep 2017 15:05:14 +0200
From: Johannes Berg <johannes@...solutions.net>
To: "Jason A. Donenfeld" <Jason@...c4.com>,
David Miller <davem@...emloft.net>,
Netdev <netdev@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Cc: stable@...r.kernel.org
Subject: Re: [PATCH] netlink: do not proceed if dump's start() errs
On Wed, 2017-09-27 at 14:50 +0200, Jason A. Donenfeld wrote:
> On Wed, Sep 27, 2017 at 2:39 PM, Jason A. Donenfeld <Jason@...c4.com>
> wrote:
> > - if (cb->start)
> > - cb->start(cb);
> > + if (cb->start) {
> > + ret = cb->start(cb);
> > + if (ret)
>
> I need to sock_put(sk); before returning. I'll fix this for v2, but
> will for additional comments in case anybody has some.
I guess you could change it to
if (cb->start)
ret = cb->start(cb);
if (!ret)
ret = netlink_dump(sk);
johannes
Powered by blists - more mailing lists