* [PATCH net-next] net: add missing dev_put() in __netdev_adjacent_dev_insert
@ 2013-10-23 13:28 Nikolay Aleksandrov
2013-10-23 13:36 ` Veaceslav Falico
2013-10-25 23:04 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Nikolay Aleksandrov @ 2013-10-23 13:28 UTC (permalink / raw)
To: netdev; +Cc: davem, Nikolay Aleksandrov, Veaceslav Falico
I think that a dev_put() is needed in the error path to preserve the
proper dev refcount.
CC: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
---
net/core/dev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/core/dev.c b/net/core/dev.c
index 0918aad..bdffd65 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4648,6 +4648,7 @@ remove_symlinks:
free_adj:
kfree(adj);
+ dev_put(adj_dev);
return ret;
}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: add missing dev_put() in __netdev_adjacent_dev_insert
2013-10-23 13:28 [PATCH net-next] net: add missing dev_put() in __netdev_adjacent_dev_insert Nikolay Aleksandrov
@ 2013-10-23 13:36 ` Veaceslav Falico
2013-10-25 23:04 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Veaceslav Falico @ 2013-10-23 13:36 UTC (permalink / raw)
To: Nikolay Aleksandrov; +Cc: netdev, davem
On Wed, Oct 23, 2013 at 03:28:56PM +0200, Nikolay Aleksandrov wrote:
>I think that a dev_put() is needed in the error path to preserve the
>proper dev refcount.
True, forgot about it. Thanks for spotting this!
Acked-by: Veaceslav Falico <vfalico@redhat.com>
>
>CC: Veaceslav Falico <vfalico@redhat.com>
>Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
>---
> net/core/dev.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/net/core/dev.c b/net/core/dev.c
>index 0918aad..bdffd65 100644
>--- a/net/core/dev.c
>+++ b/net/core/dev.c
>@@ -4648,6 +4648,7 @@ remove_symlinks:
>
> free_adj:
> kfree(adj);
>+ dev_put(adj_dev);
>
> return ret;
> }
>--
>1.8.1.4
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: add missing dev_put() in __netdev_adjacent_dev_insert
2013-10-23 13:28 [PATCH net-next] net: add missing dev_put() in __netdev_adjacent_dev_insert Nikolay Aleksandrov
2013-10-23 13:36 ` Veaceslav Falico
@ 2013-10-25 23:04 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2013-10-25 23:04 UTC (permalink / raw)
To: nikolay; +Cc: netdev, vfalico
From: Nikolay Aleksandrov <nikolay@redhat.com>
Date: Wed, 23 Oct 2013 15:28:56 +0200
> I think that a dev_put() is needed in the error path to preserve the
> proper dev refcount.
>
> CC: Veaceslav Falico <vfalico@redhat.com>
> Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-25 23:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-23 13:28 [PATCH net-next] net: add missing dev_put() in __netdev_adjacent_dev_insert Nikolay Aleksandrov
2013-10-23 13:36 ` Veaceslav Falico
2013-10-25 23:04 ` 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).