* [PATCH net-next] tipc: add missing dev_put() on error in tipc_enable_l2_media
@ 2018-07-25 10:00 YueHaibing
2018-07-26 2:18 ` Jon Maloy
2018-07-26 21:05 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2018-07-25 10:00 UTC (permalink / raw)
To: davem, jon.maloy, ying.xue
Cc: linux-kernel, netdev, tipc-discussion, YueHaibing
when tipc_own_id failed to obtain node identity,dev_put should
be call before return -EINVAL.
Fixes: 682cd3cf946b ("tipc: confgiure and apply UDP bearer MTU on running links")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
net/tipc/bearer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
index fd6d8f1..418f03d 100644
--- a/net/tipc/bearer.c
+++ b/net/tipc/bearer.c
@@ -395,6 +395,7 @@ int tipc_enable_l2_media(struct net *net, struct tipc_bearer *b,
tipc_net_init(net, node_id, 0);
}
if (!tipc_own_id(net)) {
+ dev_put(dev);
pr_warn("Failed to obtain node identity\n");
return -EINVAL;
}
--
2.7.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH net-next] tipc: add missing dev_put() on error in tipc_enable_l2_media
2018-07-25 10:00 [PATCH net-next] tipc: add missing dev_put() on error in tipc_enable_l2_media YueHaibing
@ 2018-07-26 2:18 ` Jon Maloy
2018-07-26 21:05 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Jon Maloy @ 2018-07-26 2:18 UTC (permalink / raw)
To: YueHaibing, davem, ying.xue; +Cc: linux-kernel, netdev, tipc-discussion
Acked
///Jon Maloy
> -----Original Message-----
> From: netdev-owner@vger.kernel.org <netdev-owner@vger.kernel.org> On Behalf Of YueHaibing
> Sent: Wednesday, 25 July, 2018 05:01
> To: davem@davemloft.net; Jon Maloy <jon.maloy@ericsson.com>; ying.xue@windriver.com
> Cc: linux-kernel@vger.kernel.org; netdev@vger.kernel.org; tipc-discussion@lists.sourceforge.net; YueHaibing
> <yuehaibing@huawei.com>
> Subject: [PATCH net-next] tipc: add missing dev_put() on error in tipc_enable_l2_media
>
> when tipc_own_id failed to obtain node identity,dev_put should
> be call before return -EINVAL.
>
> Fixes: 682cd3cf946b ("tipc: confgiure and apply UDP bearer MTU on running links")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> net/tipc/bearer.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
> index fd6d8f1..418f03d 100644
> --- a/net/tipc/bearer.c
> +++ b/net/tipc/bearer.c
> @@ -395,6 +395,7 @@ int tipc_enable_l2_media(struct net *net, struct tipc_bearer *b,
> tipc_net_init(net, node_id, 0);
> }
> if (!tipc_own_id(net)) {
> + dev_put(dev);
> pr_warn("Failed to obtain node identity\n");
> return -EINVAL;
> }
> --
> 2.7.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] tipc: add missing dev_put() on error in tipc_enable_l2_media
2018-07-25 10:00 [PATCH net-next] tipc: add missing dev_put() on error in tipc_enable_l2_media YueHaibing
2018-07-26 2:18 ` Jon Maloy
@ 2018-07-26 21:05 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-07-26 21:05 UTC (permalink / raw)
To: yuehaibing; +Cc: jon.maloy, ying.xue, linux-kernel, netdev, tipc-discussion
From: YueHaibing <yuehaibing@huawei.com>
Date: Wed, 25 Jul 2018 18:00:49 +0800
> when tipc_own_id failed to obtain node identity,dev_put should
> be call before return -EINVAL.
>
> Fixes: 682cd3cf946b ("tipc: confgiure and apply UDP bearer MTU on running links")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Applied to net-next, thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-26 21:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-25 10:00 [PATCH net-next] tipc: add missing dev_put() on error in tipc_enable_l2_media YueHaibing
2018-07-26 2:18 ` Jon Maloy
2018-07-26 21:05 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).