Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3518451ybt; Tue, 30 Jun 2020 05:03:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw87p1fDo1U4M1mmJqSaAllslknDkchFSkLFS7OnlymWSIHhF7zPRVEVTjFXy9P+1HhGqRc X-Received: by 2002:a17:906:5657:: with SMTP id v23mr18658132ejr.196.1593518590528; Tue, 30 Jun 2020 05:03:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593518590; cv=none; d=google.com; s=arc-20160816; b=g3hImfhQRHv+cgFa2ROpjIqsFMNJPLSLUWn7wjnX2YZZZgv2QXYCMq9K6DYGfywtCJ 7AtilMjCdxXDOfnUMrOOK1l9t9Fmb0BLalhrhblj3vAw42mtvFM75yUfzlCaL5l/4dZw KHUa9aXIQZOi0WLc0VjMya4hPP9Pvhwza9cCfghROTXXC/txTpr+xgoX9/54+36Ey4rg moA6BPSVJfXVFQtm9XaQH6k9/h/aqqljmQuqlwIV5+qHDbfkfhMGkXWyPblptxu9b0vI Kedt2SOsgqxVgZ893R7ybxL5C29qu5C3h8gSz/emRFXlbklDd9FmVgPSrl+abWgoBrj5 V5dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from:ironport-sdr :ironport-sdr; bh=wQm0Spffln06jz1nihykKCysrqC352xNhA+eDXkAprM=; b=lUdO8OsU+sI7KC1dVYZGL2NqlMuIMJK7pPXe6XGRduvTTvFFJpF1+R4sSMPhws9vBO dp7pt+XAY3UyktIfdhy4RE6EKDAb4vMO7uZp1Esb13hEr2LBvsppJEQ8Zdb0Gyr2xAG6 yA7TqCdehjZ3BMbEjahTYekpe1qrDpzUzdb8CLwG//XN2aLMeCvbw/a7iAfsT8AiA12/ +8CkRx6YGNJHUo/RDJaiDuJ4DLQCfYdv0+9wxOj/9hofT/ix0EzuU7nGbXeWJSFVJP7m AWpWvh0bcT8avnDJxukDdJFLwKsEPgnMNi2pS6xIWpDOJHQjxolrHz31mBf8bRt4Hz1v y8cg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id co19si1474006edb.605.2020.06.30.05.02.46; Tue, 30 Jun 2020 05:03:10 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730874AbgF3L2z (ORCPT + 99 others); Tue, 30 Jun 2020 07:28:55 -0400 Received: from mga17.intel.com ([192.55.52.151]:35428 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727108AbgF3L2y (ORCPT ); Tue, 30 Jun 2020 07:28:54 -0400 IronPort-SDR: 42fqf3TZudVnPWsI4Mmb4scvv1Ss5Ggl4/YKScFT5AB12zq9zbIR8JVtIIORvwT8WdwYaMo6ax q9dtUeZbVqXw== X-IronPort-AV: E=McAfee;i="6000,8403,9666"; a="126328317" X-IronPort-AV: E=Sophos;i="5.75,297,1589266800"; d="scan'208";a="126328317" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2020 04:28:54 -0700 IronPort-SDR: 8FsIScqUd6XybB4TwPoVe8ouT1DyWB0gS+2ZZaba3IiTPySeeIJ6mL1Cf72uTSXvRhBPL4oqws 3hpPziN9TlAw== X-IronPort-AV: E=Sophos;i="5.75,297,1589266800"; d="scan'208";a="454578729" Received: from rgrotewx-mobl.ger.corp.intel.com (HELO localhost) ([10.252.38.12]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2020 04:28:49 -0700 From: Jani Nikula To: Colin Ian King , Dan Carpenter Cc: 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 In-Reply-To: <45e8594c-14e5-ba67-9708-1b72fa2c51d3@canonical.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20200616114221.73971-1-colin.king@canonical.com> <20200616115459.GN4151@kadam> <45e8594c-14e5-ba67-9708-1b72fa2c51d3@canonical.com> Date: Tue, 30 Jun 2020 14:28:47 +0300 Message-ID: <877dvon66o.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 16 Jun 2020, Colin Ian King wrote: > On 16/06/2020 12:54, Dan Carpenter wrote: >> 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". > > :-) Pushed, thanks for the patch and smile. BR, Jani. > >> >> regards, >> dan carpenter >> > -- Jani Nikula, Intel Open Source Graphics Center