Thread (2 messages) 2 messages, 1 author, 2017-09-27

Re: [PATCH] netlink: do not proceed if dump's start() errs

From: "Jason A. Donenfeld" <Jason@zx2c4.com>
Date: 2017-09-27 12:51:01
Also in: lkml, stable

On Wed, Sep 27, 2017 at 2:39 PM, Jason A. Donenfeld [off-list ref] 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.
+                       return ret;
+       }

        ret = netlink_dump(sk);
        sock_put(sk);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help