Thread (7 messages) 7 messages, 3 authors, 2017-09-30

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

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2017-09-27 13:05:29
Also in: lkml, stable

Possibly related (same subject, not in this thread)

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 [off-list ref]
wrote:
quoted
-       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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help