From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) (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 BB72F31ED80; Thu, 26 Mar 2026 19:18:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774552735; cv=none; b=LQ7eb+ZVieSLE71NxVhA7wFeGJuNcA98jwTSJd9DsG8+Df5jmXiejrSYv8KBB8C+2y7IFJwdXn97Hxk1b8/kL6MRN8lrB5sw/zZk95TdtaqREYvFTrrLarFLYZFBlfp+w6wbkY5xbMGnLuwIqQCfYQbpxfUE+ukJX69DiwfKLEA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774552735; c=relaxed/simple; bh=PsrYfTmQrZHHnAcsRgaMikiSSJ3FgQWb6eTiJbFOmYM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MTOhcd/Qy1hM5GaPBZkQnOI9yleu/g1+jPGTpZodoZQiIp28XpVmUn5TVte1ypUaJAQYhx+Hzwmxr+zRQeiqfLY0lYh5jIfvDRtNHnS/8qcid1Jj3TwjbLEw0pFrc5zG6zTPnhwQ1/ZMQMNlDZ/mJOeqhNN4E2L7qdX8yO4H7hk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=brf6p5QZ; arc=none smtp.client-ip=192.198.163.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="brf6p5QZ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1774552734; x=1806088734; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=PsrYfTmQrZHHnAcsRgaMikiSSJ3FgQWb6eTiJbFOmYM=; b=brf6p5QZL9QaYGrLZzCkxclnyhwxUYJLFXqFGGgRzN7ON6i/qdsQEqMF qKTRX6fmGSYYsXtXSd4fA1e6lVXGfQOFu8fwza5bVgr6CGLF6TuRQXcib E+rzDPb1Wx6hhOfaHwtIVztr1lUwTq9GTChKC9t6ilYbIVWkf6DNjkfXk tejPxH8fM8QXRSiqAnxaaEwYr7wFZolVZSAFi+Zc9X99NumzTp4+r1kJm tnhYopXJAGTp8fHDS1xZz92hrCecbLnIJq5ZpknDUXKmwhx7TnNiU+5Cj PZlSE3AwPF/cKHnoSKNoyd3YO2omvFSomcqF2/IYUL9FyUC0Y71QVQKq5 w==; X-CSE-ConnectionGUID: mBRPdRrUST+sjNtpeD1FNw== X-CSE-MsgGUID: p3dDX/PFR8eEUeq4Y+6VWw== X-IronPort-AV: E=McAfee;i="6800,10657,11741"; a="74806985" X-IronPort-AV: E=Sophos;i="6.23,142,1770624000"; d="scan'208";a="74806985" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2026 12:18:41 -0700 X-CSE-ConnectionGUID: 6GhBGAblRPe82ogoVeJO7A== X-CSE-MsgGUID: nRp5t4b1SaK0TSm8RMcvbA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,142,1770624000"; d="scan'208";a="263005323" Received: from smoticic-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.245.216]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2026 12:18:38 -0700 Date: Thu, 26 Mar 2026 21:18:35 +0200 From: Andy Shevchenko To: Guangshuo Li Cc: Andy Shevchenko , Geert Uytterhoeven , =?iso-8859-1?Q?Jean-Fran=E7ois?= Lessard , Ingo Molnar , Thomas Gleixner , linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] auxdisplay: line-display: fix NULL dereference in linedisp_release Message-ID: References: <20260326171412.1109402-1-lgs201920130244@gmail.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: <20260326171412.1109402-1-lgs201920130244@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo On Fri, Mar 27, 2026 at 01:14:12AM +0800, Guangshuo Li wrote: > linedisp_release() currently retrieves the enclosing struct linedisp via > to_linedisp(). That lookup depends on the attachment list, but the > attachment may already have been removed before put_device() invokes the > release callback. This can happen in linedisp_unregister(), and can also > be reached from some linedisp_register() error paths. > > In that case, to_linedisp() returns NULL and linedisp_release() > dereferences it while freeing the display resources. > > The struct device released here is the embedded linedisp->dev used by > linedisp_register(), so retrieve the enclosing object directly with > container_of() instead. Makes sense to me. How did you find the issue? Geert, do you agree with this change? -- With Best Regards, Andy Shevchenko