Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752100AbbFNOcU (ORCPT ); Sun, 14 Jun 2015 10:32:20 -0400 Received: from isilmar-3.linta.de ([188.40.101.200]:60768 "EHLO linta.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751417AbbFNOcM (ORCPT ); Sun, 14 Jun 2015 10:32:12 -0400 Date: Sun, 14 Jun 2015 16:28:34 +0200 From: Dominik Brodowski To: Takeshi Yoshimura Cc: Greg Kroah-Hartman , Vaishali Thakkar , linux-pcmcia@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] pcmcia: Add missing free_irq() Message-ID: <20150614142834.GA3069@light.dominikbrodowski.net> References: <1434284081-7207-1-git-send-email-yos@sslab.ics.keio.ac.jp> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CE+1k2dSO48ffgeK" Content-Disposition: inline In-Reply-To: <1434284081-7207-1-git-send-email-yos@sslab.ics.keio.ac.jp> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2552 Lines: 75 --CE+1k2dSO48ffgeK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Takeshi, On Sun, Jun 14, 2015 at 09:14:41PM +0900, Takeshi Yoshimura wrote: > In yenta_probe(), an irq leak potentially happens when > pcmcia_register_socket() fails. I added the missed call. nice catch, many thanks. > index 965bd84..7922e30f 100644 > --- a/drivers/pcmcia/yenta_socket.c > +++ b/drivers/pcmcia/yenta_socket.c > @@ -1269,6 +1269,8 @@ static int yenta_probe(struct pci_dev *dev, const s= truct pci_device_id *id) > pcmcia_unregister_socket(&socket->socket); > } > =20 > + if (socket->cb_irq) > + free_irq(socket->irq, socket); > unmap: > iounmap(socket->base); > release: However, this should also handle the case for sock->cb_irq being zero, like it is done in yenta_close. Furthermore, when comparing yenta_close and this error path in yenta_probe(= ), I noticed a few other issues: - yenta_free_resources() is not called in yenta_probe() - pci_set_drvdata(dev, NULL) and kfree(socket) are not called in yenta_prob= e() - sock->base is always set to non-NULL when yenta_close() is called, therefore the check in yenta_close() may be removed. Would you be willing to update your patch to address also these issues? Then, I'll happily push it upstream. Best, Dominik --CE+1k2dSO48ffgeK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVfY+SAAoJEJqXYIlMjaMNRdIQAIMQbdJjb5XZcEfKGB4qAkdq MJNA1eWiZgVJcF/wEWBb7zrEaUzdaeknQVO4/PxwCNPJPxDMMfJhGhYYdGltkAun hbxhwFaschsqO5z3lnRJsj7Ej+lVJyIF4F2EHDl/S9tzuri1QAiA8OhzSZ9UsKPH P49uarxe66MINmqloWw6aYNGmY9uXeXmJo7KC2W0J8Nt7ob4klHYCrFBwDQNQ6i9 U6gBjGUoE2K3PK7CpO1tc11p+i8pPwXbNrZP6HhnxlRg5bCG31XO4Rb7mGh7OPey c9DbFRtknDtApkEks8KAWnQyluZ0JxPeNsUffYJEfFuGqzT0wJOsKgtou54NNFha l1Xkt5IKsCmfpOjcZZy4oxOROgN6sSu/uyJf7aHft2AktcEgnlSo8rP0xCsuddrS BUN/GRSFxChDiunkosNaSe06w6Tjb55E4S99yQzvpqhEC+Qaf5nNHXvBq2R2Hgn0 vgsoyiASPR5GkJjv90K+O0wmk8P9n/IPHZQhWiBKHX0+WPAlAVDkNCmTXGPlOzlG zkh6k6yiTocCGU4oEVt/AlgtfAfic8RlIEpV9NiOPRdjZfjagUIqMjuyVkTc7Mu4 51eUxon1W6GXs41ncWVh5LMGJHcrjco85RADbUxR1dH7gxMRIierkhw0Fyt6RJha Ltvs9ADCBrF7UWTAIsd8 =QCx8 -----END PGP SIGNATURE----- --CE+1k2dSO48ffgeK-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/