Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp175584imu; Sun, 4 Nov 2018 21:58:35 -0800 (PST) X-Google-Smtp-Source: AJdET5fRSPifk9pOAok6jU9qw8Y7G+fpcv7I0tY+s2QMwZV7YT7tAquau+f6x2PHTCBOeunmp0Jm X-Received: by 2002:a63:a112:: with SMTP id b18mr19020144pgf.440.1541397515288; Sun, 04 Nov 2018 21:58:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541397515; cv=none; d=google.com; s=arc-20160816; b=Uv3h5YZQEinzb7q/HNty3RpfJ7xGOPjMZ7DSf56NT6mki030L3hKEPDXh+C9ukF9ft PQppaWvobp0yetCRfHuKBcPR9lM8vrH7dZ8kof7eZ4efchAzL4Ev6X6BmM7z5WOfzdCd 5Ja70NT6NInWCzglN0aTBaoErpG4cgW0P3twDRdNpynFcpDcqJlNm74+vLQcOSbyFNNq uFv27t7Ric8jde4IrO7l/ZX0N7StfqWVIas+0m525YiAEqVlV/Mi076D1RtqQWxzPSOb A1gL7Jh9FHvjAloqczX0shAEzime2bl8yaOkyeaIMZeJeSGL3ZqbcvS2WwAoAbA09iHy F9kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:date:subject:to:from; bh=GExVOXBdPXUNfKpSqPLiIlpPI3NH/Ni1IGnH+/iEf60=; b=VchuUb4LIkdB1z2oYn5LXdUjksnUVWyEfXQYWrkZjcQx0Sg8vmc9UBLsZ0OTHT6eYA CKIIAZmabBeanIYtzVsQsB9XSvAGFZq+gDOYwP+7YTXQY66w6KkaEAcTGjD4BrxoQr6A uW+EoHzIbEWtzhjeoF3b4lHu0Wr1E8NNmfnuWUfHWjAv7nALnAwlLxvo0rz0ewNSrX3w /GWSGELqdxMq9Lqp7ZbJ1typfk/fbkOFADGL+dluZQ0VM/SfdM8TcQMM6FjCnS77vUSR kwvJ6d1482eW33Y+jB2jMkJvzsz881pJ95aH5DCz4d7ju39brfsOgZKtyWZyutXq7NrK TwoA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3si744891pgi.391.2018.11.04.21.58.19; Sun, 04 Nov 2018 21:58:35 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729344AbeKEPP4 (ORCPT + 99 others); Mon, 5 Nov 2018 10:15:56 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:37186 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727136AbeKEPP4 (ORCPT ); Mon, 5 Nov 2018 10:15:56 -0500 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wA55rbo3135368 for ; Mon, 5 Nov 2018 00:57:57 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2njen1atue-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 05 Nov 2018 00:57:57 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 5 Nov 2018 05:57:55 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 5 Nov 2018 05:57:52 -0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wA55vpKD49283132 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 5 Nov 2018 05:57:51 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5893342045; Mon, 5 Nov 2018 05:57:51 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 046BF42042; Mon, 5 Nov 2018 05:57:51 +0000 (GMT) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 5 Nov 2018 05:57:50 +0000 (GMT) Received: from tungsten.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id 84448A00D2; Mon, 5 Nov 2018 16:57:48 +1100 (AEDT) From: Sam Bobroff To: airlied@redhat.com, airlied@linux.ie, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/2] Two AST driver fixes Date: Mon, 5 Nov 2018 16:57:46 +1100 X-Mailer: git-send-email 2.19.0.2.gcad72f5712 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 18110505-0008-0000-0000-0000028B4E2F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18110505-0009-0000-0000-000021F580A8 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-11-05_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=785 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1811050053 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Here are two (attempted) fixes for the AST DRM driver. The issues they fix are both seen when the ast driver is unloaded (tested on Power9, although it looks like the second one is architecture independent). I'm fairly confident about the first fix, as it looks pretty straight forward. I'm not sure if the second patch uses the right approach, so I'd appreciate some feedback. I've had a good look around, and it does seem to fix the problem but I don't know this area at all. Note that while it does seem odd to take a reference just before calling drm_framebuffer_remove(), that seems to be be necessary because drm_framebuffer_remove() is expecting the framebuffer to be dynamically allocated (but the AST driver directly contains it) (I saw some references to this being legacy behaviour). Cheers, Sam. Sam Bobroff (2): drm/ast: Fix incorrect free on ioregs drm/ast: Fix connector leak during driver unload drivers/gpu/drm/ast/ast_fb.c | 4 ++++ drivers/gpu/drm/ast/ast_main.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) -- 2.19.0.2.gcad72f5712