From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Gross Subject: Re: [PATCH] drm/msm: Fix error handling crashes seen when VRAM allocation fails Date: Thu, 3 Nov 2016 09:43:43 -0600 Message-ID: <20161103154343.GA3373@hector> References: <1478174778-8962-1-git-send-email-architt@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-yw0-f172.google.com ([209.85.161.172]:32999 "EHLO mail-yw0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758246AbcKCPoL (ORCPT ); Thu, 3 Nov 2016 11:44:11 -0400 Received: by mail-yw0-f172.google.com with SMTP id r204so51636157ywb.0 for ; Thu, 03 Nov 2016 08:44:11 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1478174778-8962-1-git-send-email-architt@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Archit Taneja Cc: robdclark@gmail.com, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org On Thu, Nov 03, 2016 at 05:36:18PM +0530, Archit Taneja wrote: > If VRAM allocation fails, the error handling path crashes in > msm_drm_uninit(). The following changes are made to fix this: > > msm_gem_shrinker_cleanup() is fixed to unregister the shrinker only > if it was init-ed in the first place. > > Before calling kms->funcs->destroy(), we check if kms->funcs is also > non-NULL. This is needed for MDP5, since during msm_drm_int(), priv->kms > becomes non-NULL early, but msm_kms_init() is called on it only later > in mdp5_kms_init(). > > Signed-off-by: Archit Taneja > --- Reviewed-by: Andy Gross