Received: by 2002:a05:7208:2204:b0:82:bbfa:f723 with SMTP id s4csp334150rbb; Thu, 18 Apr 2024 07:08:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXxCx38MJeRPTrAg9obEoOSx9JO3/oPeKB8f+pTtnvaeYztHDCc2jo//iND54zWjKfSklXnpRKyLvInjnYmcpDCAVxihfQ7ORzG/1rdHw== X-Google-Smtp-Source: AGHT+IEIqEnEN+6bg6/SWJA3bNzrmvCHQ1mSVu2nWOIJxSKmilPPmutj8xg/K8LLcYefo3o4D8Gn X-Received: by 2002:a17:90b:124a:b0:2ac:2d72:71d9 with SMTP id gx10-20020a17090b124a00b002ac2d7271d9mr424982pjb.41.1713449291263; Thu, 18 Apr 2024 07:08:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713449291; cv=pass; d=google.com; s=arc-20160816; b=1LhQEykWwcQn/TY8j6UPFYsveamgciSbJpFItYA+9LGCME3iM0YUsqh2r1kg8Ii8Gt 4DFgqDucV8MZOdHjhl5N7RYp63C0RtmkVmmIO9wFiNUxT+V2U/QCArnymyekTfFOJLZx F6EAsuTF9MVAsRUDso3wAYwff1YYsYbDPGWHC+8BaCPx2PLXN5kpME7Q6IYAfUHQbBlt C6Ixg9Xu59RfLarQkQloQQMnEh44QCly/8L1qUftyt+FHrCa3BEB/Xxu9Wg9p4FM2VvU XmQsnPFR2x0xKmvDzMIHNwwxYqkUFpSUBlQi+6OuzyqJ/8VO5MjUrQ+z3hih5ta/BAMS F/8A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:dkim-signature:dkim-signature:date; bh=MdvgBf6ZpsA4n+BoYvD1NnnaPdS5+NDIXIaVMmgP4hU=; fh=rySpTkvy1LdorUcIUNydQdqT0wF+aeJ7/5Bp64WisA0=; b=fk5yJRt8QXLwv8OPxsnIDwayqLEsAebiKkOHgckl4G/lcOqD+JQOSoCNt4+JqhH8V7 9uHnb3KSpTmZUM0U6HA7dXB4CRK8M8HR9siqwPR/08U72dNixB3H9EG/NgQCjWUoFe2r TgqVwCyCkoo4eWEXjIlnWR4j7axsBCw/h/rPwTO5Exj3towYyuebjekXkbUFkOOzyEFu +QgtUbkC0LTYWUla7P0oBmxVNjz1c8YcJKv7OZOcEnqOkFGScBzRgRbHRV+tgCN6AKN1 tPsnQ50JMm/rfgrljHGksP0+9wet025sjh+SZm1LfgfDycE6HFKDTZbfzTLnd21ktnaC PV/g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Wu93NQS1; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-150245-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150245-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id gb23-20020a17090b061700b002a092f4c4b0si3210191pjb.164.2024.04.18.07.08.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 07:08:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150245-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Wu93NQS1; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-150245-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150245-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D13ED286B7E for ; Thu, 18 Apr 2024 14:05:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4803A165FAF; Thu, 18 Apr 2024 14:05:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Wu93NQS1"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="gqs+4Wd3" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 995CB165FB3; Thu, 18 Apr 2024 14:05:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713449142; cv=none; b=NIjqMX1YoMQmHInuU8OwArqiWiraLDEzYccP3l8MmOk1zZjUWRlU0+82AXen3fcTcEN3JaeMnC8RY2Ptm05zt0D7zk9DBQlwn8R89OjbDLE96unHPbeHJtpzZRwkhR9XVu1HJSkyyr7eXFzoyUNcTVpItkVqOdVv1KUMjRR9sIY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713449142; c=relaxed/simple; bh=ybtstFCIQIBh/h+bTa3AowDxZdhqZXHjP7CMzjXMl2c=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dvO1JNWvAvg/HIN9mzPS5LxeONCpMZxWqNLbEPdNISpKB4bcru6evan1vxUzpVpW691Ux4DXVwjVzECUDbyRpHd0I4KxXJjwPNGHnFHkvNv5zZBx8pS6fuK/9J97VgJau4rDQ7AOZAccNZOzGeBjWIHFANjxuinJWlVIvb/WuXg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Wu93NQS1; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=gqs+4Wd3; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Thu, 18 Apr 2024 16:05:26 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1713449128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MdvgBf6ZpsA4n+BoYvD1NnnaPdS5+NDIXIaVMmgP4hU=; b=Wu93NQS1Iz2e7QuZtENBDdrlllSJjvCgf3fn/D4KJTe7mIoe907CKwFSkJ4vcoHBfDgzt5 0aD0nIh0fAk2xY64eYSssFby3uybIltLqPaLyDz1uA3VDX0xiEc6TtiNHaiZfWZrNTSfVJ BL64QPsCzkIqpV0gPY5T/ywIVa7y0m3pLDRnbXzFPKIVg+3KGrmpsdALVmEUotkxmOl+T5 UkTIRKffnude85aVxnGmuMwKmH5CM5HRoHL98stWY2jV61m7ZvL0df+cJKFPngrUf1iL5B 4uGFoFeLoEPbpbwauSObHWyUkGuyhFtKApyOgq4AXwHCS4KvfRHTDAhampTEyA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1713449128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MdvgBf6ZpsA4n+BoYvD1NnnaPdS5+NDIXIaVMmgP4hU=; b=gqs+4Wd3U0rfgEjP80HwkKZ4qF3kQb0jGka9A+b37lMDO0zvuizvVSj2HFl1TbSt4JzOKl GMPiRTk6EfmtCHCw== From: Nam Cao To: Patrik Jakobsson Cc: Harshit Mogalapalli , jayalk@intworks.biz, Daniel Vetter , deller@gmx.de, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, tiwai@suse.de, bigeasy@linutronix.de, LKML , Vegard Nossum , George Kennedy , Darren Kenny , chuansheng.liu@intel.com Subject: Re: [bug-report] task info hung problem in fb_deferred_io_work() Message-ID: <20240418160526.3b3c385f@namcao> In-Reply-To: References: <271372d6-e665-4e7f-b088-dee5f4ab341a@oracle.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On 2024-04-18 Patrik Jakobsson wrote: > This sounds similar to the SUSE bug [1]. We fixed it by reverting [2] > in the SUSE kernel. The problem seems to be that flush_delayed_work() > kills the timer and re-queues the work but doesn't guarantee that it > is finished when returning. So when the device is closed, the > fb_deferred_io_work() function can still be queued and tries to access > memory that's been freed. flush_delayed_work() *does* guarantee the work is finished before returning. > Patch [2] tries to solve the problem of not throwing away pending data > when closing the device. Perhaps calling cancel_delayed_work_sync() > and then follow up with a manual call to fb_deferred_io_work() would > be enough to flush the remaining data? > > -Patrik > > [1] https://bugzilla.suse.com/show_bug.cgi?id=1221814 > [2] 33cd6ea9c067 fbdev: flush deferred IO before closing > > > > > > > Thanks, > > Harshit