Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2388344pxj; Mon, 31 May 2021 00:27:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyb6wF9Vyuhu0+EMkRmOKPkk2Pdrlqpx86GQmvTVd+NaodQ/tftSFvrfxblXOFlfRPvhPvQ X-Received: by 2002:a05:6402:4313:: with SMTP id m19mr23662632edc.263.1622446042179; Mon, 31 May 2021 00:27:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622446042; cv=none; d=google.com; s=arc-20160816; b=VEanEM5fY6A83sBCxj2GlNXSBoLL2dbzyV/W8rWSxjKwWFedsS275pFV/ijJQZg+bq IKTr+fZiCRs5ddBxIGSS3q+EDbwNAo7MrNdYYs2G8bRvaWHQLEn8eWuiPGFZ7t51zudz 1qyGAeUCXYmtaBOKIMEVqM9QP6Mbxv9C6nh9SAtEX/hdjY6rHqe66OoijtHYgkhJoAVC utP/mx7YxuLZ4xzf5hyW4EYVmfZCt6oY84EfWAi+9t4t04IyFlnHoyKAxhHVFcuxRZoW m4ZF6+gQcaDOs8OTAFOIZkRec2qY2Y9op+zmAhh7ZeOFW0Meh7+HOZ12ouiPKy3S9CWo J6sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=yCQkAamaqjzLvYlJjCOp6ATLrw+uII+84I0DAql6qao=; b=ZP9lGfFqW6Si+jRx9+XyFHPwss0+LBxQa86xvmoMf5OEH4LAOU3P/Ev5FtHKahdyIt Eh5CQ0CbrV2VYXVxIiGVXig99aqW1t4UnpL6rx6avs7np+NYojUUYJSa413x9it4WI3b 87dtQ9ixi50ijNY8vIs4BNOwiK1nb9ss3+ntGhm11hwiMF5hMT8uaXSI4AGm6pU82OK4 QMZ7Af3v/O0+Kjwfiss1tKpQC985ROvmMz8fUTAiM5MWysKajjjaQKbnwxkE54o088UG KcUgY1YKY0fehMg9Q/EbSh2gEpju5AY7QWot+S2qSjVqy3W78HMsI3dRFHb3tAEUZKb2 VINQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kt7si11630192ejb.630.2021.05.31.00.26.59; Mon, 31 May 2021 00:27:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230143AbhEaHZ0 (ORCPT + 99 others); Mon, 31 May 2021 03:25:26 -0400 Received: from mail-vs1-f54.google.com ([209.85.217.54]:37887 "EHLO mail-vs1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230070AbhEaHZX (ORCPT ); Mon, 31 May 2021 03:25:23 -0400 Received: by mail-vs1-f54.google.com with SMTP id s15so5564882vsi.4; Mon, 31 May 2021 00:23:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yCQkAamaqjzLvYlJjCOp6ATLrw+uII+84I0DAql6qao=; b=I0mp7wLdffOtLyPYNA1Yzr5makkrsAl6KlvblaJ/tyHpz1szQaFRdpGtpT+1RagC07 tgJSHuuzl1C0MVRqeiEVk5vdJA1Lq2MWepVYI7bd4x0KzKhHsAv8urDr33/5usUxF1ZT SqwSf0Qqs33f92AHl6pHH3dBv7EWED5j2iKzoHZ1Ooztki2oorRkuij5bVBYyBUImDA3 F+duYMqdfG0tbid6c1ORi2+f5p281kgbSFcNNvZ6wf8GuIooYlEySq4U0FT/dshsGG9W oymdM9iO60NHg5O09nUyYQ/JWlrTrtfb6tcrvgRh7XSXObILzJgY+oza4Myl89etHUp1 RBog== X-Gm-Message-State: AOAM532swbXjbyknLvGK43WTLcqWyM4ievGbWrnqRzRp3CYL597sSSQi 0GwdNIhbxf31LtuJQ/7ryqWwfPLFiqukki0Q2MzeGaHT X-Received: by 2002:a67:fb8c:: with SMTP id n12mr1679834vsr.18.1622445823003; Mon, 31 May 2021 00:23:43 -0700 (PDT) MIME-Version: 1.0 References: <1622442963-54095-1-git-send-email-zou_wei@huawei.com> In-Reply-To: <1622442963-54095-1-git-send-email-zou_wei@huawei.com> From: Geert Uytterhoeven Date: Mon, 31 May 2021 09:23:31 +0200 Message-ID: Subject: Re: [PATCH -next] dmaengine: rcar-dmac: Fix PM reference leak in rcar_dmac_probe() To: Zou Wei Cc: Vinod , Yoshihiro Shimoda , Wolfram Sang , Laurent Pinchart , Robin Murphy , dmaengine , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 31, 2021 at 8:17 AM Zou Wei wrote: > pm_runtime_get_sync will increment pm usage counter even it failed. > Forgetting to putting operation will result in reference leak here. > Fix it by replacing it with pm_runtime_resume_and_get to keep usage > counter balanced. > > Reported-by: Hulk Robot > Signed-off-by: Zou Wei Reviewed-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds