Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1119478ybg; Thu, 4 Jun 2020 01:16:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweigUXgpMEl0qt69Osmd9/XfZVyExypQghZHZNpE/m2EOqlUzf11ekZppsclZy2mgVFota X-Received: by 2002:a17:906:f189:: with SMTP id gs9mr2768714ejb.203.1591258568404; Thu, 04 Jun 2020 01:16:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591258568; cv=none; d=google.com; s=arc-20160816; b=m+QerR/LK9Rh2VARtrGEcB2O5zJefK/EYFfEp6r4K3nRCHKUb2IqxYzfH6hPqiX4pl DwOpHjQcXxOB96H58ZMzDWMpug1lyATcTlWFBYw7bK2O8g+OD957LQLZWfBGzM9rXrII aU7kjTHldQw1sRPQjGCzf9BHqKKnYkfQVsuC3NA6U9pRPakIDD7T4yqpLxbgwAfQA7vO hrkvCv2w1IQTsJKBk2U/YsbcAx69tY+walGbS0GaSJp7FxFyJt8K3+2rQkh19w0b+rM1 oplEfXQ8LB4A9O4yNlHiZZRjclgLAoGrYL41iI3OiUSYaZxSbaWRjKY71YGnH6JpTYpB VVVA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OK1ZbpoTNfccVSYFcsXj8JWZN2H8wb6NBSYBSiY0g+w=; b=O/hs+GMBeMtWBJEaxLn/QdxPHFxAGOTp/IkgEPC5SiIo8C1OwRLv+ccGcix0UHB/Xt O4b84z0orNPHKDVq4kQE8yzM/3FGJXBWoOyBCTM+N2eRwUxrl97oZ2/ROXcg8nUh03c+ eM8p3lb4oM122k2vJFTf6CAl2O+rsuRu3gALV07JOfvgdaIeO+83cLEgsWLy0QzvhAKl zLc/N4NCa1mGJDJ8fu+OYdkVnzxtXpTeIpLfU1REmB0qwJvDdGQAUrVYfh1qCFc//Z3v 6QWpat9ERTIQ6bM4ViD33ysqFu/1HJepQBtAx1fDmOax0K05tNsbdpWizelKWbGQ1QFt QLYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=VVvxH1bH; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w9si1255900edu.326.2020.06.04.01.15.45; Thu, 04 Jun 2020 01:16:08 -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=@ffwll.ch header.s=google header.b=VVvxH1bH; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728090AbgFDINe (ORCPT + 99 others); Thu, 4 Jun 2020 04:13:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727826AbgFDIMu (ORCPT ); Thu, 4 Jun 2020 04:12:50 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE0C3C03E96E for ; Thu, 4 Jun 2020 01:12:48 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id f5so4624678wmh.2 for ; Thu, 04 Jun 2020 01:12:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OK1ZbpoTNfccVSYFcsXj8JWZN2H8wb6NBSYBSiY0g+w=; b=VVvxH1bHV9p97ank/8LpaorTHKGsJwZyd+JirwJXy0+qZG4TB8H7Oydr9fEe+RFC1/ k1imVqgdJmEqRkZpgw7mIlLcSS5DA0RAvO2zX5M6vZPa7o9dsbw1v3gmCBgImxZgGaXs civc/FbkkhZ5D3KeU5JL9OxvPlSRme8vDYfYA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OK1ZbpoTNfccVSYFcsXj8JWZN2H8wb6NBSYBSiY0g+w=; b=tr6CZfaZmSCDALkHEbFxY3hhFroxF7NlEOpki+p3P6HnybpuQ4/tMY3lti6B3OxHIK oSax6GV9MkvA2xm+IUJ+NeOghBdPcGHxJXsjq2H8CbkoeHQLDo/V/VlHk2H5/WfDBrl4 YEQ7NVfNe+7mgpt+cCBwPXXuYw/LzRGy2AS7KhciqWzad0znHf2iq15yZwff8G2m1Vua BSN9XwvS24j5rBZJDXsIhocJcR6qIbTY1zm9M+Ogmy9LtmlCrf8ikMZ5jGpPsgV920/a 3+BGwvGX3e5pQ2cl5/KW3KyBNy3cOUS7nOJyv32h1PW7kwFFDYCCJK5OOPjy0i83F+iF IvfA== X-Gm-Message-State: AOAM532lDBFNbc3FBENIFCwEdj7wxzm6DQxV8IOrfUz3BK8eMnUVevGL 3cnxouWUdue3RvSwtJtCogQuA3JcZgQ= X-Received: by 2002:a1c:df57:: with SMTP id w84mr3077102wmg.52.1591258367556; Thu, 04 Jun 2020 01:12:47 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id f11sm6873305wrj.2.2020.06.04.01.12.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jun 2020 01:12:46 -0700 (PDT) From: Daniel Vetter To: DRI Development Cc: Intel Graphics Development , LKML , linux-rdma@vger.kernel.org, amd-gfx@lists.freedesktop.org, Daniel Vetter , linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, Chris Wilson , Maarten Lankhorst , =?UTF-8?q?Christian=20K=C3=B6nig?= , Daniel Vetter Subject: [PATCH 12/18] drm/amdgpu: DC also loves to allocate stuff where it shouldn't Date: Thu, 4 Jun 2020 10:12:18 +0200 Message-Id: <20200604081224.863494-13-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200604081224.863494-1-daniel.vetter@ffwll.ch> References: <20200604081224.863494-1-daniel.vetter@ffwll.ch> 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 Not going to bother with a complete&pretty commit message, just offending backtrace: kvmalloc_node+0x47/0x80 dc_create_state+0x1f/0x60 [amdgpu] dc_commit_state+0xcb/0x9b0 [amdgpu] amdgpu_dm_atomic_commit_tail+0xd31/0x2010 [amdgpu] commit_tail+0xa4/0x140 [drm_kms_helper] drm_atomic_helper_commit+0x152/0x180 [drm_kms_helper] drm_client_modeset_commit_atomic+0x1ea/0x250 [drm] drm_client_modeset_commit_locked+0x55/0x190 [drm] drm_client_modeset_commit+0x24/0x40 [drm] v2: Found more in DC code, I'm just going to pile them all up. Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Cc: linux-rdma@vger.kernel.org Cc: amd-gfx@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Cc: Chris Wilson Cc: Maarten Lankhorst Cc: Christian König Signed-off-by: Daniel Vetter --- drivers/gpu/drm/amd/amdgpu/atom.c | 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/atom.c b/drivers/gpu/drm/amd/amdgpu/atom.c index 4cfc786699c7..1b0c674fab25 100644 --- a/drivers/gpu/drm/amd/amdgpu/atom.c +++ b/drivers/gpu/drm/amd/amdgpu/atom.c @@ -1226,7 +1226,7 @@ static int amdgpu_atom_execute_table_locked(struct atom_context *ctx, int index, ectx.abort = false; ectx.last_jump = 0; if (ws) - ectx.ws = kcalloc(4, ws, GFP_KERNEL); + ectx.ws = kcalloc(4, ws, GFP_ATOMIC); else ectx.ws = NULL; diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index adabfa929f42..c575e7394d03 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -6833,7 +6833,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, struct dc_stream_update stream_update; } *bundle; - bundle = kzalloc(sizeof(*bundle), GFP_KERNEL); + bundle = kzalloc(sizeof(*bundle), GFP_ATOMIC); if (!bundle) { dm_error("Failed to allocate update bundle\n"); diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 45cfb7c45566..9a8e321a7a15 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -1416,8 +1416,10 @@ bool dc_post_update_surfaces_to_stream(struct dc *dc) struct dc_state *dc_create_state(struct dc *dc) { + /* No you really cant allocate random crap here this late in + * atomic_commit_tail. */ struct dc_state *context = kvzalloc(sizeof(struct dc_state), - GFP_KERNEL); + GFP_ATOMIC); if (!context) return NULL; -- 2.26.2