Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp318960ybi; Fri, 31 May 2019 01:54:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxGECRYJUMF8NfwuASsvmbtWKFjUXlaAGyNUlYO7/IdchP7En5vwSgFtC1FpksrSOJD8UKx X-Received: by 2002:a63:8f09:: with SMTP id n9mr7628311pgd.249.1559292899250; Fri, 31 May 2019 01:54:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559292899; cv=none; d=google.com; s=arc-20160816; b=NAEh/G6adbaYy9jk3gvm+lxl0LYwU/LJuObcd7uZYrUdl+iFlJNaVS4v3ySWuHBvEP 54TPgeVf4/6l/KzCskideFGo723epMVKyPMwqGZtYOHB0K1i/ZDiXMzGn+KR9I6lBsUS tXw24PHHyYGoZQD0nrm0v9l1u0fwBQtxaU7rZ0PPwW2Zj8+4ne6edpY6VVjfdGRxwrlv czAo4PWEU/j4aiilDm0ipM/RresSKXtn9dVsHJzbQblgc1w5xLCDydSCGmo1dNQnnR0K sOY3o0Cz2oOCIR6V4q6Ddlt8xAs+J3DkeCPjB0rxuF4hMv2On1W+rZd9lfZ5G0jgcd16 Rs3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date; bh=K2EqYkmSJnhmWeTSwwdSkJQdjsdqB22YDvmD9IpG4x4=; b=JMUuWtS20mLmEbGksjdU4QNmrCmfYooE/K43HQh+ahcaWZqzlhVYX/N9TfV+XfIPCM bXtOtIuSz56MVW6134LSrxOC+EVywQTbunl5/rxLnprOUJUVKCLGNmhk18a9zc+VclXP BYYGJAJdJNuh0V9hDWRVYMRxMmWhO/dXkjqojnOm1HHKWRHNE3UfI+y7pGXWJZF3zCwJ s7wxmwJv1pfArgJ6ukqFq//pyvfJam8J7epAlKsqOJXt/kUp07bZPB92JP3228if/nye n/pBuVPPR/6U3HtdR8Fke9+/tE7DlSh7xnNPfttxqtpwzOU8UcZWPdnr+nf2iBWCufbq IgNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u21si4918338pgm.431.2019.05.31.01.54.42; Fri, 31 May 2019 01:54:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726668AbfEaIwM (ORCPT + 99 others); Fri, 31 May 2019 04:52:12 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:50246 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726002AbfEaIwM (ORCPT ); Fri, 31 May 2019 04:52:12 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id C6B4F80233; Fri, 31 May 2019 10:52:00 +0200 (CEST) Date: Fri, 31 May 2019 10:52:10 +0200 From: Pavel Machek To: kernel list , dmitry.torokhov@gmail.com, gregkh@linuxfoundation.org, teheo@suse.de, sre@kernel.org Subject: devm_* vs. PROBE_DEFFER: memory leaks? Message-ID: <20190531085209.GA20964@amd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rwEMma7ioTxnRzrJ" Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! Is devm_ supposed to work with EPROBE_DEFFER? Probe function is now called multiple times; is memory freed between calling probe()? Will allocations from failed probe()s remain after the driver is inserted successfully, leaking memory? Thanks, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --rwEMma7ioTxnRzrJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlzw6zkACgkQMOfwapXb+vL0igCeJvVsNfBl8H8xvikYrAeaSVJm t2oAn360LyefEazCKa/r0oLjLL+fhRNn =dPKe -----END PGP SIGNATURE----- --rwEMma7ioTxnRzrJ--