Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp71217rdg; Tue, 10 Oct 2023 04:46:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHABAFw2Xm/AUorP0kyJL59AJqp9EM+GJfFoh5SIEzSObnQRQ2Br0sdWmxQOfRA1R2EevbM X-Received: by 2002:a05:6808:1a26:b0:3a9:ba39:6d6e with SMTP id bk38-20020a0568081a2600b003a9ba396d6emr25553793oib.0.1696938408759; Tue, 10 Oct 2023 04:46:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696938408; cv=none; d=google.com; s=arc-20160816; b=qkBcoBB7/kY0c96YpG9EX1FeRvVQEWmTxNH78SdPm7SM2DRLJ14bnxVN6rGbrcZfNA eouHTWivav66m3iHgCido+fpzwGv99Ht+8EKXpeSUFIaQABzJx0VulOwtJpbesHoMAbB 1LNVRMt3BP5SFMXuxz4Pc2bkrFwTPed6U4WpE2eBTLBIhwFYSpu3cnm8UJKAtOZl1YNS g8rtEUo1lSFlgbHd1yen92IRP1lpX952lYcB288H/Pmezt5Rv55GUx8jDfI2Y/x2fuNh bQj7w3XggQ1zIMEUsp5IMAymfzke9kEAWmvZwJnVRWrNLLO2WJNekqFoDiTtHD5i67yj +5xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=aiA4D11X2sFtXKvFj+BVZkBdxaJKzeEbh5cY8Yxytvg=; fh=bpexKLLvKJuMIovDmX0fKMVWqdOkj7LGGcW7dovthRE=; b=EvQZt4yHx5rzaCx9UnxL9mKedEkWYLzpwLRsxgAGRgCWG3B11vEcoCKGK6B1yPoAUU l/28A3aePXSFwb48GwrmgTW7H/Kh/CjCz2Ar63t84mZLH0mBg4cFXgR7qNc0uRZxT4Kb R0DRTh+bT+k4NIXjXGLmsAAqhzYBcjQzZ6mTT9U0m7NHuaUMBCmDkhfYi8Vrh4aK6w8n sRCykgfwbGhZLTK/ktpxDy6Ysswo6qK+IKAhFCRqZXanaJPHjusmRaXnIJXmkWDcH3jI YLQUyoemYqItC/aA/8jqy4Zk0LzjuIhLxCu5Q6lVw4vv4kyxDD8FDHWqww03DoyszgMf VCUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=GWGMs53o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id s20-20020a63af54000000b00578a2da0e4bsi12136102pgo.302.2023.10.10.04.46.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 04:46:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=GWGMs53o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id BB35B807C6FA; Tue, 10 Oct 2023 04:46:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230320AbjJJLqE (ORCPT + 99 others); Tue, 10 Oct 2023 07:46:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231244AbjJJLqD (ORCPT ); Tue, 10 Oct 2023 07:46:03 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D902EA4 for ; Tue, 10 Oct 2023 04:46:01 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-3232e96deaaso1349716f8f.0 for ; Tue, 10 Oct 2023 04:46:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; t=1696938360; x=1697543160; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=aiA4D11X2sFtXKvFj+BVZkBdxaJKzeEbh5cY8Yxytvg=; b=GWGMs53od8yUrlA7N4SoxSsh2ZToEPeBj3Rpp+VJFhZn5gtJWgk2cQfJ5xogoiQqUR jbV+gSb9JkOQS2z8iE6aFgQckIx8TNsSpye63zupsFBMDI1ULBRExnoNTE1r/7W2Nwv0 6vsSPucoUJzQO8M6+++2+Zc9IvadJXeA1sAnI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696938360; x=1697543160; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aiA4D11X2sFtXKvFj+BVZkBdxaJKzeEbh5cY8Yxytvg=; b=ry4pNs3RNtfzB0I8YgUrhTzcIbBZCHw4TJpz/dZBqKXwRx+nWUBIgvpeLZzA9IWxhG vZIJa3SNmsmdLXymsed4TL5LK1qXgRS8PKDP66VBMGiJspZzM1zV8AsPlT3BRvuz7Za6 iDlxiWHw0O+kRv2KkWvNJVvRuwmy586NCRVRY/jY37/+cp9G2jGId3D+mqZk4eh7gUxk O5fec8Pj2t3nMl/zmBEhJrNTOQePYE49cvNR0NpjGwya2IDXehc+Uxlhs5aVjIAqOxFR c9duyaDJSGtxcufrkpsvH2h3IGUNWTMm8yjKiTAgeV3GFx9mc5dfixZ6olJaM4Znn5ZA Er0w== X-Gm-Message-State: AOJu0Yxc32uFTAlbEZkZRWLlvYVKsYOS+K17Ux8gehojZdVH3aPbPuzc netquS/885wAhN4ScKBaI+sX8g== X-Received: by 2002:a5d:6909:0:b0:320:8f0:b93d with SMTP id t9-20020a5d6909000000b0032008f0b93dmr14892975wru.3.1696938360227; Tue, 10 Oct 2023 04:46:00 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id h9-20020a5d6889000000b0031c52e81490sm12640936wru.72.2023.10.10.04.45.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 04:45:59 -0700 (PDT) Date: Tue, 10 Oct 2023 13:45:57 +0200 From: Daniel Vetter To: Ondrej Zary Cc: Helge Deller , jiapeng.chong@linux.alibaba.com, linux-fbdev@vger.kernel.org, javierm@redhat.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, tzimmermann@suse.de, Zhang Shurong Subject: Re: [PATCH] video: fbdev: arkfb: fix possible object reference leak Message-ID: Mail-Followup-To: Ondrej Zary , Helge Deller , jiapeng.chong@linux.alibaba.com, linux-fbdev@vger.kernel.org, javierm@redhat.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, tzimmermann@suse.de, Zhang Shurong References: <202310061634.02110.linux@zary.sk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202310061634.02110.linux@zary.sk> X-Operating-System: Linux phenom 6.5.0-1-amd64 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 10 Oct 2023 04:46:08 -0700 (PDT) On Fri, Oct 06, 2023 at 04:34:01PM +0200, Ondrej Zary wrote: > On Friday 06 October 2023, Helge Deller wrote: > > On 10/5/23 09:01, Zhang Shurong wrote: > > > Add missing pci_disable_device() in error path in ark_pci_probe(). > > > > Do you have this hardware and tested your patch? > > I'm sure there is a reason, why "pci_disable_device()" was commented > > out in the original submission in commit 681e14730c73c... > > pci_disable_device() call is disabled in many fbdev drivers because > calling it might prevent display from working. Yeah I've recently hit some _really_ interesting regression report where essentially fbdev driver and vgacon where managing the hardware collaboratively. There's enormous amounts of "this shouldn't work like that, but it is how it does" going on in old fbdev drivers, and what you brought up is also what I immediately thought of. This patch feels way too risky to me that we should apply it ... -Sima > > > > > Additionally I'm wondering why your patch doesn't show up in > > the fbdev patchwork, although you added linux-fbdev mailing list. > > Probably a vger issue. > > > > Helge > > > > > > > Signed-off-by: Zhang Shurong > > > --- > > > drivers/video/fbdev/arkfb.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/video/fbdev/arkfb.c b/drivers/video/fbdev/arkfb.c > > > index 60a96fdb5dd8..6c4e5065646f 100644 > > > --- a/drivers/video/fbdev/arkfb.c > > > +++ b/drivers/video/fbdev/arkfb.c > > > @@ -1064,7 +1064,7 @@ static int ark_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) > > > err_dac: > > > pci_release_regions(dev); > > > err_request_regions: > > > -/* pci_disable_device(dev); */ > > > + pci_disable_device(dev); > > > err_enable_device: > > > framebuffer_release(info); > > > return rc; > > > @@ -1085,7 +1085,7 @@ static void ark_pci_remove(struct pci_dev *dev) > > > > > > pci_iounmap(dev, info->screen_base); > > > pci_release_regions(dev); > > > -/* pci_disable_device(dev); */ > > > + pci_disable_device(dev); > > > > > > framebuffer_release(info); > > > } > > > > > > > > -- > Ondrej Zary -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch