From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F2F31B2188 for ; Wed, 4 Dec 2024 10:32:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733308363; cv=none; b=md6K6UhPixjBm+hFrTPwISdU0azj92mOoZTFs+pcigaT+oPMlPu5HFw49MY0auJJzNaCG+iWNSqwuk4aSVHLmg1irShg+Ie88ReVtptBRuawr56I/i9jHYQ8MviKAmKndXXb/O/Ao6tgVwQnD6hzIRqVKtwiDRsgh9IRAtNXxms= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733308363; c=relaxed/simple; bh=OLoUPjBgCdDsMMwtWaFtL6apVxOZyumCKfzBGuwQTvI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cKpbRtM2V3kSRU3WO4O3CKcFTsOpowi5ANAO3ql81mMytRARD6/Qrf+Xh9+qaOOzR7IcO5v9CqxpRzpT9HQJLMeHmxt7IVtf4XmXM3AeMVyisRPDZu+EdQ+QX9/5gke21zVKGzVWWLOP1NCoMID5o787ws7XlzK2X7qBIAl4wY8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=NivLQqTw; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NivLQqTw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733308361; x=1764844361; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=OLoUPjBgCdDsMMwtWaFtL6apVxOZyumCKfzBGuwQTvI=; b=NivLQqTwG17wpaR+LeROlZlgtzPAiG/omACMdywlQNIsaCH4Pr1btQgU jC+9NidiM5Fw7ApMS2g9i6l/AP50prFxjvXtq5iH6+VvvQhwAZRwEeV5J bxtvNvOLhcFkA7ZsKnpMXBKj1GsWTkPbUYHe6eaAShATBQXnw5qvyF5tq YUwUrDeRefDTraN0Ns/AdJJx40RyTcCoYqj56bW95Zhe0loDErgF/jfZn yM3zEBhJQV0i3p2D6qT4x/ahbH6EJBid+k7VNDaK1wyKgSDwTkXBwtqB/ e8ypVyxQjZ+DFQBWL1ZPKyOe62baiPeug8qA+uvntl6bEhQLrJ0CL/pSp w==; X-CSE-ConnectionGUID: OL0yAOPSQ/Wp3tvn09MP9Q== X-CSE-MsgGUID: DgtDKlNfSUuetVLdKMLyDg== X-IronPort-AV: E=McAfee;i="6700,10204,11275"; a="44177506" X-IronPort-AV: E=Sophos;i="6.12,207,1728975600"; d="scan'208";a="44177506" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2024 02:32:41 -0800 X-CSE-ConnectionGUID: igVmwB1QQO62SIyFnDRerQ== X-CSE-MsgGUID: fZ+m8N5MQcmaHTBhsu0gzw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,207,1728975600"; d="scan'208";a="93812257" Received: from slindbla-desk.ger.corp.intel.com (HELO intel.com) ([10.245.246.225]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2024 02:32:38 -0800 Date: Wed, 4 Dec 2024 11:32:35 +0100 From: Andi Shyti To: Michal Wajdeczko Cc: Eugene Kobyak , intel-gfx@lists.freedesktop.org, John.C.Harrison@intel.com, andi.shyti@linux.intel.com, jani.nikula@linux.intel.com, stable@vger.kernel.org Subject: Re: [PATCH v6] drm/i915: Fix NULL pointer dereference in capture_engine Message-ID: References: <053cc89a-0b20-4fb0-b93c-1e864a6b6f6a@intel.com> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <053cc89a-0b20-4fb0-b93c-1e864a6b6f6a@intel.com> Hi Michal, > > + if (rq && !i915_request_started(rq)) { > > + /* > > + * We want to know also what is the gcu_id of the context, > > typo: guc_id > > > + * but if we don't have the context reference, then skip > > + * printing it. > > + */ > > but IMO this comment is redundant as it's quite obvious that without > context pointer you can't print guc_id member I recommended to add a comment because there is some code redundancy that, I think, needs some explanation; someone might not spot immediately the need for ce, unless goes a the end of the drm_info parameter's list. > > + if (ce) > > + drm_info(&engine->gt->i915->drm, > > + "Got hung context on %s with active request %lld:%lld [0x%04X] not yet started\n", > > + engine->name, rq->fence.context, rq->fence.seqno, ce->guc_id.id); > > + else > > + drm_info(&engine->gt->i915->drm, > > + "Got hung context on %s with active request %lld:%lld not yet started\n", > > + engine->name, rq->fence.context, rq->fence.seqno); > > since you are touching drm_info() where we use engine->gt then maybe > it's good time to switch to gt_info() to get better per-GT message? I think the original reason for using drm_info is because we are outside the GT. But, because the engine belongs to the GT, it makes also sense to use gt_info(), I don't oppose. It would make more sense to move this function completely into gt/. Thanks, Andi