Re: [PATCH] netpoll: Fix extra refcount release in netpoll_cleanup()

2016-03-24 Thread David Miller
From: Bjorn Helgaas Date: Thu, 24 Mar 2016 11:13:34 -0500 > netpoll_setup() does a dev_hold() on np->dev, the netpoll device. If it > fails, it correctly does a dev_put() but leaves np->dev set. If we call > netpoll_cleanup() after the failure, np->dev is still set so we do another > dev_put(),

[PATCH] netpoll: Fix extra refcount release in netpoll_cleanup()

2016-03-24 Thread Bjorn Helgaas
netpoll_setup() does a dev_hold() on np->dev, the netpoll device. If it fails, it correctly does a dev_put() but leaves np->dev set. If we call netpoll_cleanup() after the failure, np->dev is still set so we do another dev_put(), which decrements the refcount an extra time. It's questionable to