Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3929050imm; Mon, 8 Oct 2018 11:51:11 -0700 (PDT) X-Google-Smtp-Source: ACcGV61WWPDAxZvzEZl8stRVID1s4PzPqsUYkU1oOlOS9FYBxl8GKqNDm7dAAJcaXdXAy0Js3t3h X-Received: by 2002:a62:3a43:: with SMTP id h64-v6mr26297196pfa.119.1539024671698; Mon, 08 Oct 2018 11:51:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539024671; cv=none; d=google.com; s=arc-20160816; b=A6Il3H4qdQz+tKcYiyvMXaRXl83SYbLAAcPLpVdPbHUp6LRi2DnRaoD6WpC0ZZZan7 fcptioftvrJlR4kI8Ol4JpB7dTTQZRnjBp6G2CzHtOvXM7tPpecgjBOICwJ9ZVyQemiF twCWrUVc8Y8KnvlIbapnTYaUEXcP5+Hp2qCEzTn99RORJk7qDL6f49rXIIgnDxuxuyQV PzKcLmN+7N+Q1y90lZ70+MW05tsMg88Js/HJ3tdECRo1C4IZ1oTZLsvRyI1ky+9F1wHp j+fBgp5mXcTvikDTJ0/vXD2W+BIwOLoKkUQKzMqhhBQZ3j9x+SCSVjvPAU5/NiFA/saY i3Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Vo704XSQ248qkOKuomhge1yC0xiJUDrZNkX9AemWGmM=; b=lz0wnbNBYmCeE/HHBy6CHp8IOyFyxQ9hpFXKURVLyH13NFvMFv8UIvCvU1EJifdinr 7nWHyloJWgPEjQTCirodFVlhFGAdJMPIdcBHTXd9JRIlIbxZihodrsxuPqsPX+3Z0toO rcY9bJyZejlJ2SvnT7YzvnB3zCEqfJFSf/URYu0sFdq9Mc99RBXCKWYGkJRqIBrRvzmo egacWQCWUrnn1eQ+PDMM0dGCPiF2EC4aTA2aOr3PUwfRhoDFbe32abFmB+I5B8mxImoN d+qg7wKaj9g7ape+EUQLM7l1OChT/l7yCEVl67wQUWa2J6rCLQYiTGie7dH5YrTu25hG yrPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XRSxI9aZ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z31-v6si19319460plb.58.2018.10.08.11.50.56; Mon, 08 Oct 2018 11:51:11 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=XRSxI9aZ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732193AbeJICD7 (ORCPT + 99 others); Mon, 8 Oct 2018 22:03:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:53570 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729987AbeJICD5 (ORCPT ); Mon, 8 Oct 2018 22:03:57 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 91816204FD; Mon, 8 Oct 2018 18:50:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539024650; bh=WUyLizhGMYnGgJeu3NhnCvFcDhh9M6efxpNKY1bUqGE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XRSxI9aZ6EAYQ+wA5qyOwy/XM4Nkwjy40kAPAbp3o4pv5/BXgOPa19NBdxYdzvct9 HENqCIOHl4GEFYVQ6yM+RJaESXaQq0gBOU2cWaYojs/b8dB4Bahd7ts9zHb3JoytAD GuEndFpHxpNO9Gu4bEAAcDjebNRRn0e70o+b8+4k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ben Skeggs , Sasha Levin Subject: [PATCH 4.18 108/168] drm/nouveau: fix oops in client init failure path Date: Mon, 8 Oct 2018 20:31:28 +0200 Message-Id: <20181008175624.154890608@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181008175620.043587728@linuxfoundation.org> References: <20181008175620.043587728@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ben Skeggs [ Upstream commit a43b16dda2d7485f5c5aed075c1dc9785e339515 ] The NV_ERROR macro requires drm->client to be initialised, which it may not be at this stage of the init process. Signed-off-by: Ben Skeggs Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/nouveau/nouveau_drm.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -230,7 +230,7 @@ nouveau_cli_init(struct nouveau_drm *drm mutex_unlock(&drm->master.lock); } if (ret) { - NV_ERROR(drm, "Client allocation failed: %d\n", ret); + NV_PRINTK(err, cli, "Client allocation failed: %d\n", ret); goto done; } @@ -240,37 +240,37 @@ nouveau_cli_init(struct nouveau_drm *drm }, sizeof(struct nv_device_v0), &cli->device); if (ret) { - NV_ERROR(drm, "Device allocation failed: %d\n", ret); + NV_PRINTK(err, cli, "Device allocation failed: %d\n", ret); goto done; } ret = nvif_mclass(&cli->device.object, mmus); if (ret < 0) { - NV_ERROR(drm, "No supported MMU class\n"); + NV_PRINTK(err, cli, "No supported MMU class\n"); goto done; } ret = nvif_mmu_init(&cli->device.object, mmus[ret].oclass, &cli->mmu); if (ret) { - NV_ERROR(drm, "MMU allocation failed: %d\n", ret); + NV_PRINTK(err, cli, "MMU allocation failed: %d\n", ret); goto done; } ret = nvif_mclass(&cli->mmu.object, vmms); if (ret < 0) { - NV_ERROR(drm, "No supported VMM class\n"); + NV_PRINTK(err, cli, "No supported VMM class\n"); goto done; } ret = nouveau_vmm_init(cli, vmms[ret].oclass, &cli->vmm); if (ret) { - NV_ERROR(drm, "VMM allocation failed: %d\n", ret); + NV_PRINTK(err, cli, "VMM allocation failed: %d\n", ret); goto done; } ret = nvif_mclass(&cli->mmu.object, mems); if (ret < 0) { - NV_ERROR(drm, "No supported MEM class\n"); + NV_PRINTK(err, cli, "No supported MEM class\n"); goto done; }