Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2386581ybt; Tue, 16 Jun 2020 04:57:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7NtqfBYNhi1MuMIQLphACA45akPOxVdPXa2c1kgJVV9lvIIW+MEz7wZqx+QKS3uNolDn1 X-Received: by 2002:aa7:dd8e:: with SMTP id g14mr2197588edv.263.1592308676459; Tue, 16 Jun 2020 04:57:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592308676; cv=none; d=google.com; s=arc-20160816; b=bN6YRZeAp7i6zTzEb7wbk0yoANA9DKIjZaAG0KDKIHy4GzDd2RVQtKPpTCGP/UrXdU 8sfG0YKzcM58nvAawLriZXH0nhR7fOcvkoPyn4iLZkyZvhoi7Mc4paHgCptcNAv0VZ9b S0fJL16vHKkr/t8ZfqWjfs7W7lfgi1oF0pV5Hq46PkrYPl5SEdrCuZls8VoDlvZ2wnPz kZChi31mcqb7VhrpU5MMA79HZqx4Vh0tDy67LXzFnSC/VBBD2IYtX8dwmY0EpRMSvQgI DToxkpA5JdolNSm/NmIjCOLBayLrxK4JZOZwYxZjRO5HPagO1wV1/AtBhfhNmcN/6Dwi vDNg== 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:dkim-signature; bh=zXKmGqBgVfd/oRfTCZp+ZNOmz8ApTYrOEDY7rqEojb4=; b=FdXZguCNOiPUrDLAMqmo5o0I7T7ly0Kq/29i8+kj6vS4Lbyuu/0v2oOEFj8ywYhNwB EIpH5ykGE6SOm3espOCLUvRP3w3fuUTl9XhDmuj+GJ14Yk9P4KMM0+QIA+yF72ZLcIuN JlCwUUCjc6h+L1qA1GDQsKcG8vYRfFSwBiQbDMjRvDqAR4wRpDyRvjREnxRvEEhp4ufm TQRGswEQlLNZNcCZpytVRLkjgfvrflI3DJ6A1etkoLSgojld9x7VtA3jgZVx5XTBkX4+ 8PCfNPeuugs3qWIH4WsIAKaYAYbK38kYv+MnwYblH0C1C5U0FNvJ7PLjpPujH+gvLtvG 0B4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b="A/dby861"; 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=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q26si11145888eji.128.2020.06.16.04.57.33; Tue, 16 Jun 2020 04:57:56 -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=@oracle.com header.s=corp-2020-01-29 header.b="A/dby861"; 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=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728593AbgFPLza (ORCPT + 99 others); Tue, 16 Jun 2020 07:55:30 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:47682 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726261AbgFPLz3 (ORCPT ); Tue, 16 Jun 2020 07:55:29 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 05GBpulM014486; Tue, 16 Jun 2020 11:55:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=zXKmGqBgVfd/oRfTCZp+ZNOmz8ApTYrOEDY7rqEojb4=; b=A/dby861BGAp/7q1CQTGlDwIhW8VhVnxKwoWVVueI8C6Rg9aygu+LQSNoxUDc1wg1oxf HCiAolu7pUyHod0qTTIxJEnFHcZcIXNtacxPU4U4q0kEnIhkn30NrxGOc1OC6Q9Tr6Fn QDFhFKSKw70k6V6xXVdWllUI9K7lpaTSPbNhACRptQ8JDFBtTrRPUMGCE2y2bC9ikU4g 7L8msHxiO8K9lV89QKyEctwxzBfp2PL6EubYV/4a0CwXMOZN6LnnAJsQ8AOYSXsnX6hA Bkn7JKSdkDT37u06uvyUaVcINV0FKvmDSQQb7nszR/bKCevTgTVc6jt0wmeDgrgvvL14 aQ== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 31p6s268tb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 16 Jun 2020 11:55:16 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 05GBrJSi033107; Tue, 16 Jun 2020 11:55:16 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3020.oracle.com with ESMTP id 31p6dgcvwx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Jun 2020 11:55:15 +0000 Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 05GBt8Fp000378; Tue, 16 Jun 2020 11:55:08 GMT Received: from kadam (/41.57.98.10) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 16 Jun 2020 04:55:07 -0700 Date: Tue, 16 Jun 2020 14:54:59 +0300 From: Dan Carpenter To: Colin King Cc: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Animesh Manna , Maarten Lankhorst , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/i915/display: fix missing null check on allocated dsb object Message-ID: <20200616115459.GN4151@kadam> References: <20200616114221.73971-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200616114221.73971-1-colin.king@canonical.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9653 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 bulkscore=0 phishscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006160089 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9653 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 impostorscore=0 clxscore=1011 mlxscore=0 mlxlogscore=999 priorityscore=1501 phishscore=0 malwarescore=0 suspectscore=0 spamscore=0 cotscore=-2147483648 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006160089 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 16, 2020 at 12:42:21PM +0100, Colin King wrote: > From: Colin Ian King > > Currently there is no null check for a failed memory allocation > on the dsb object and without this a null pointer dereference > error can occur. Fix this by adding a null check. > > Note: added a drm_err message in keeping with the error message style > in the function. Don't give in to peer pressure! That's like being a lemming when Disney film makers come to push you off the cliff to create the 1958 nature film "White Wilderness". regards, dan carpenter