Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp787442imm; Wed, 20 Jun 2018 06:39:44 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLGcvF+GDAJKF754DfgBnv907Grn6V+1A3HlBz2405ktT75QHw2/0yohdZcIn2/5YvPQE3v X-Received: by 2002:a17:902:8341:: with SMTP id z1-v6mr24122717pln.40.1529501984834; Wed, 20 Jun 2018 06:39:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529501984; cv=none; d=google.com; s=arc-20160816; b=UuuUGH0F7OSJQZRixc8c6lJl9OGJU2uli2ByllMvP/NVmmFaRiS6a3la3xLLMEeoUW B1EOecpG0PNGVWB9RgM0EtBlt3SOD/TaC5jK+xeOnYe13ycqaHPlzEMw8SGDx7zTO5Uv OFd5hr2cFP6lV+XC3qcVFZSDB6RyYOqcjvNOc6MYZjY3uujkf2gzsTjp7P8+c9+1Oenl VWi9F2Hc/fb2qYhtvs3OUCS30qJ2uKDlB75MxIYqsWKpEp7OnHKx/JWElyiYaIgH75Ad 4Va6Me7OB4xYKzbP4isz1KQJoKAhc3zfMH26mXXLHn6uy50637Z2kCf3QJBVnkzngFon E43g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=OcH99cOtOZSl7x+jqNkGrPT+nIwC4TbjiI48N+fANOM=; b=bPfvkKx/L7PoabEAd2A/o/CD/8McEhaj53fT5WxyYN/mzksrD1Qqe09iGgj/REg2Dn SPuIwDK0u8CTH/JsOSfiVwEHgKvZsTwnPmg5lTpJ6EUMwiM9zaN9OSsBA3C0MADElSlL 6p/bS3reV5dQNcUDhoK4aW07SSHOU0ysacfdgaD9w2yDiqUhS3l+fJlezPMcYTMOZkav Y7m3LAFQwVkgPXZFWQ3T38QNsnZ3SBvbo25yVb+3qGaVd9YGcT7chroarxKWzE+Ppf2k QTOsvd7qANUb0PP2DLTUoTmAMPtLMdtfN7jqrDAnq1QrAS6qrf5hlF/25ldbG7Y15OKu N2yQ== 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 q14-v6si2358340pll.324.2018.06.20.06.39.30; Wed, 20 Jun 2018 06:39:44 -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 S932419AbeFTNis (ORCPT + 99 others); Wed, 20 Jun 2018 09:38:48 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:59797 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753202AbeFTNir (ORCPT ); Wed, 20 Jun 2018 09:38:47 -0400 X-Originating-IP: 208.88.110.46 Received: from localhost (mtl.savoirfairelinux.net [208.88.110.46]) (Authenticated sender: hle@owl.eu.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 13ACD40020; Wed, 20 Jun 2018 13:38:42 +0000 (UTC) Date: Wed, 20 Jun 2018 09:38:41 -0400 From: Hugo Lefeuvre To: Dan Carpenter Cc: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Marcus Wolf , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] staging: pi433: fix race condition in pi433_open Message-ID: <20180620133841.GB17525@hle-laptop.local> References: <20180620023326.GA30440@hle-laptop.local> <20180620083439.6ouovmhsc235aprw@mwanda> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="9amGYk9869ThD9tj" Content-Disposition: inline In-Reply-To: <20180620083439.6ouovmhsc235aprw@mwanda> User-Agent: Mutt/1.10.0 (2018-05-17) X-Spam-Level: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 20, 2018 at 11:34:39AM +0300, Dan Carpenter wrote: > On Tue, Jun 19, 2018 at 10:33:26PM -0400, Hugo Lefeuvre wrote: > > @@ -1178,6 +1152,11 @@ static int pi433_probe(struct spi_device *spi) > > device->tx_active =3D false; > > device->interrupt_rx_allowed =3D false; > > =20 > > + /* init rx buffer */ > > + device->rx_buffer =3D kmalloc(MAX_MSG_SIZE, GFP_KERNEL); > > + if (!device->rx_buffer) > > + return -ENOMEM; >=20 > We need to free device. Fixed in v3. Thanks ! regards, Hugo --=20 Hugo Lefeuvre (hle) | www.owl.eu.com 4096/ 9C4F C8BF A4B0 8FC5 48EB 56B8 1962 765B B9A8 BACA --9amGYk9869ThD9tj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEE5LpPtQuYJzvmooL3LVy48vb3khkFAlsqWNIACgkQLVy48vb3 khlKggf/fce3HJfIuJDLnq/PxVVkn91Bcx8YDR8vrI+ZZDt7Annl49mnzis03pqO tfq1Y3anBpnOCcFJ8gsGUwvc/bBn/pEqoSjnV9s6JrFRConxCTVByYzR1Rz/Mi7I PSS5u5HJqlwc36aBMENgcC9bGtZYinSejLlBTR8f5QCTIDIhTG44a/8IOqOJUkdp tky91MVh9+a/6mxsBWe2k0WfOwTfik2pj/x2TATZ5MhYYi87/J2qz8SiljvdXFUZ yKMD1tEJNaHY9SN83u7+XvhKMbF6gMpXvPinpit5Ehn6qs1M2Kv/Y9uTIexkbrut /GxYkKUvjOUWEVHxvNEVOin8i448/g== =WncX -----END PGP SIGNATURE----- --9amGYk9869ThD9tj--