Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp299957imm; Tue, 3 Jul 2018 19:41:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfgkldXunu4fuLv7HRilyY7ZTjf16b1OrLlFUAfwuAorJsRr+psSjflhPe8l+KXtFOMNGZd X-Received: by 2002:a17:902:2702:: with SMTP id c2-v6mr197036plb.297.1530672119479; Tue, 03 Jul 2018 19:41:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530672119; cv=none; d=google.com; s=arc-20160816; b=KyS7VbVVXhbx2F3KhAcnpRWlp7E2cFzVdJ0jEIsJkphX1WA698CV+i4VtitIGcs67o tN12Dd5Un53ltrGhqgOr8i7jX0gaDoewwo5OGILEy9roWiEW5OkgkuUjX1Gdp+9sNmS3 Yin0ZK+vkoVsIF7Zvb4UoMja0fto84T+xGTAbQKkhqel4rQQkSnXl9I2xrdUNXpynWao oa9BHdkWXQCmCLw60MDM5BjWnRNDdL3aDqcAgrG3ClRZEWdOkCzMxNncZf8qEhGfnNPp caowlhhWTkCBHucX4/xDDPWdNWFnF9vgUu5tHDF2p4VqMpH4zpZyEUzKsULMoDfLDU8B xNeA== 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=eaEky0Zva/5zvSo6BQAIixmIgmPi4x8jqlnqbn0DwmU=; b=KPrLzjJOM4QH20tehJ2uw+gIwA2hHhTg9RkBolNCNZUCVZLt+Yo4YSh2C8wdQBgFHD j3lg9mRuLQvQ59sE8UfRLbs49nSRx3Wcxx0fmFyzoMcdcgPkbQDN2ApMXtWQMEzxpYcr 97hpKkGO1UobTzGzQGaea32dVZQsyZvN1csaDpVTLaX7ktjFj1K717dNuZydDwXVbTHc DdhTTDYTExmoyhLKlBGVddkoReJgUkUkpez3s5wu9D1V55CmdvOsagvk6WanXvdwsd/N RvozRptWOlT9uMMyMvQjtgeu5TQbQSY8TSoDhumxahy/RlwqhAOHZQTHHZM3nLT04jr4 TbIg== 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 f3-v6si2288730plr.214.2018.07.03.19.41.44; Tue, 03 Jul 2018 19:41: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 S933191AbeGDClG (ORCPT + 99 others); Tue, 3 Jul 2018 22:41:06 -0400 Received: from bmailout2.hostsharing.net ([83.223.90.240]:56481 "EHLO bmailout2.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932999AbeGDClF (ORCPT ); Tue, 3 Jul 2018 22:41:05 -0400 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id 9635D2800C7D8; Wed, 4 Jul 2018 04:41:03 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 35D6722153; Wed, 4 Jul 2018 04:41:03 +0200 (CEST) Date: Wed, 4 Jul 2018 04:41:03 +0200 From: Lukas Wunner To: Lyude Paul Cc: nouveau@lists.freedesktop.org, David Airlie , dri-devel@lists.freedesktop.org, Ben Skeggs , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] drm/nouveau: Fix runtime PM leak in drm_open() Message-ID: <20180704024103.GA23762@wunner.de> References: <20180703220602.16664-1-lyude@redhat.com> <20180703220602.16664-2-lyude@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180703220602.16664-2-lyude@redhat.com> 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 [cc -= stable] On Tue, Jul 03, 2018 at 06:05:59PM -0400, Lyude Paul wrote: > Noticed this as I was skimming through, if we fail to allocate memory > for cli we'll end up returning without dropping the runtime PM ref we > got. Additionally, we'll even return the wrong return code! (ret most > likely will == 0 here, we want -ENOMEM). > > Signed-off-by: Lyude Paul Reviewed-by: Lukas Wunner