Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1873867ybz; Thu, 23 Apr 2020 07:31:22 -0700 (PDT) X-Google-Smtp-Source: APiQypJ7K6QcpuUjBFVj7IGNIK7oq3RcYaIuBzpb1+wWhxnjCjjp7ofXS2xrLOwpaOOBIdB3Mhoi X-Received: by 2002:a50:9e8f:: with SMTP id a15mr2833449edf.68.1587652281908; Thu, 23 Apr 2020 07:31:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587652281; cv=none; d=google.com; s=arc-20160816; b=FDoDKH/az7MWgH5HskL857kC/G6GXTHiJJlI8QVOqmS3PyPoHX2P27TdE3DjLqM6YO XHi5cH+K22RBYDNBEthkaGpwnwd16Gq1tf9dYjnsX78Vb7O+41odtm6qarK4kGmOUQNV DjgES8LF7dOXKMXyGgZ6X/Jk3rVJCJyg7nrwm2CkZxKK39oVfwAYBiTaIipc7FcJii+x uWrLVrfWjSf7irGARDoE8vffNm/a+s5GCc8TRuokrSs41ezj4Ax+UlziKqddr0p8Q0B1 8lnKb/ncZU/Q3+alfkSYU/7pLT6S13K61SPK2GmpcSIgMMeMeOlQZpx8O+WfrWviM8K9 S9fQ== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=euZIJ/M801FkiIRohqJykf0KTV1d7R1eB6u3qEkTjI0=; b=zdOQm1YmWCRbOr9T/K7wZOSw86qpwHfxBqeTq/m6/lJHjm1pywbnO6W3NIVjOng1Kq mjm87fF6ciudAq2TGVfl2KsYTXWrL4GlBkQXOmzMN8ARwfuqXd8IgW86wOnnv+GgaGdL KJkKo90JlVbt0p957OfhMyt9e38/2zZDDlqDkUwQ2Fm+j2C1DLlk3D0rGYJnBRLZvK4Y 5NqgjCGW2oZODERSgxwmYQ829GoCA+d98ZWPikNjwfk0wKDKv/dv/puWMcYwRp3WjmMu fEoTiC+eb9s5a5BAc9Awf7HG/XhP5aI9IKyRVXruseMAiz/9TB4GstlQQ7y/sl8v0Bdk MrwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ko6BUx5m; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x2si1228615ejw.475.2020.04.23.07.30.56; Thu, 23 Apr 2020 07:31:21 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ko6BUx5m; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726963AbgDWO3O (ORCPT + 99 others); Thu, 23 Apr 2020 10:29:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726307AbgDWO3N (ORCPT ); Thu, 23 Apr 2020 10:29:13 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7F05C08E934; Thu, 23 Apr 2020 07:29:13 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id f7so3017698pfa.9; Thu, 23 Apr 2020 07:29:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=euZIJ/M801FkiIRohqJykf0KTV1d7R1eB6u3qEkTjI0=; b=Ko6BUx5ma8P13bvtmuvtoClR1kdW1PNfQ5Mdcb5ut/b6dbYDkx4snP1pcDRIaxOAWt OrjLtoxwLINDnrWAmg7a5CQU5PcYxBNmj260qRjWiFDyutI3obuDy12DDb+0FtQabOsJ /3rVzC3AOzR+z+YJlDXnT1BweMe1w5xONexIwTNdYDkMCNDJRsU1inGD2jUIRLgKCL0k 1bpmI47cx+gGudFoSqsQaGbVCfn+4Mj1YLSG3N0PQxFoc3IwdALS/MkBBF2+D3kD6rLt XH+krkBwKgcXAWWSnTzI88j3+8S+pBK0gz36DD/o1UpqdI95hODX2seSYE5abCiWGtNs 2Z5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=euZIJ/M801FkiIRohqJykf0KTV1d7R1eB6u3qEkTjI0=; b=BWE75bbEnls+v0wtezc7btijxW0BiIzpDT8nvkiR9I+d4lKq30D/e40Wscdx6ReMfH xErSW1Nq9xWKxSv63Jv7I8ycXxmBD5V62B9fAsdansMS1OQqbFE1FObG1AtoSrdntjj0 AwIG49X20oiGxA9gaadOpqawqRZwls3G97p31CdSffgtz7FFKL99E2xXzPcYODfdJ/fF y/RNwy2PeXqFqOcXwscuudUhLqUfRZf6VuDR+VYcA8nbAQ2kVlN6r49ItRgWYdJz7zLD qkO/TjH92JIZWPXRjGhqFZyC7CYWbmjNBtC6q+qTp/4ZKeRi+sKoi3d43T0z1fHQc1Wd 2jOA== X-Gm-Message-State: AGi0PuYbDJGvKgNYrrtftyqKEynHOZlMIBV8xAkvtPNfGvoJmMRpN0ro 9nnp8CSywumgF9KJjQpuFB4= X-Received: by 2002:aa7:96c1:: with SMTP id h1mr4085226pfq.212.1587652153207; Thu, 23 Apr 2020 07:29:13 -0700 (PDT) Received: from localhost (176.122.158.71.16clouds.com. [176.122.158.71]) by smtp.gmail.com with ESMTPSA id h5sm2537837pjv.4.2020.04.23.07.29.12 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 Apr 2020 07:29:12 -0700 (PDT) Date: Thu, 23 Apr 2020 22:29:09 +0800 From: Dejin Zheng To: Markus Elfring Cc: Bartlomiej Zolnierkiewicz , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, Coccinelle , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Andy Shevchenko , Greg Kroah-Hartman , Florian Tobias Schandinat , Ralf =?utf-8?Q?B=C3=A4chle?= , Thomas =?utf-8?Q?Bogend=C3=B6rfer?= , Thomas Gleixner Subject: Re: [PATCH v1] console: fix an issue about ioremap leak. Message-ID: <20200423142909.GB1562@nuc8i5> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 23, 2020 at 01:10:14PM +0200, Markus Elfring wrote: > > if do_take_over_console() return an error in the newport_probe(), > > due to the io virtual address is not released, it will cause a leak. > > How do you think about a wording variant like the following? > > Subject: > [PATCH v2] console: Complete exception handling in newport_probe() > > Change description: > A call of the function “do_take_over_console” can fail here. > The corresponding system resources were not released then. > Thus add a call of the function “iounmap” together with the check > of a failure predicate. > Thanks! > > I would like to point out that there is a script for the semantic > patch language which would detect other questionable source code. > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/scripts/coccinelle/free/iounmap.cocci > > How do you think about to extend presented software analysis approaches? > Sorry, I am not familiar with it, I don't know. BR, Dejin > Regards, > Markus