From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail114-241.sinamail.sina.com.cn (mail114-241.sinamail.sina.com.cn [218.30.114.241]) (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 C86232CA8 for ; Mon, 6 Jan 2025 11:08:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=218.30.114.241 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736161732; cv=none; b=JvFSMxDFH2XLSFViOux3jZKFmy4cFwF53xBLD2mPkU/i7LRgRTcBGcRI/4pg3C4fYnQYfl/eLZDOm8Q9EfD2r0jsLOF+CxA9G+I+IEcybTuV9DJXg7SMO6WV1zY2kS6X51B3Elry58JKOSukG8xVSksypEGXNRTMocuQ++yszxE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736161732; c=relaxed/simple; bh=ZoraOenru2tzVlqnSAR2c/0tyTObUlPwVVZ1+7EdeOI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kwJ9ielcUYebX2EFpfmr6xbRtr+yFvgsAIe2zp0WTekx1WyXiWjU2ceMxjWNGUAGJ/fuXFVNXLztHYGdGPHU4BP1ccHxDFIMgtyaz1GuN6CWZ17zWjaOIcyXmA+6dYl4AmRBxK3/TAQ1J6g4LAmyNlqqMBs8XRyHBoVowfRzFjE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; arc=none smtp.client-ip=218.30.114.241 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([116.24.9.62]) by sina.com (10.185.250.23) with ESMTP id 677BB9B200005A74; Mon, 6 Jan 2025 19:08:36 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 2451328913343 X-SMAIL-UIID: 2A12966CAC554E87B4B34185784F09C5-20250106-190836-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [input?] possible deadlock in input_ff_flush Date: Mon, 6 Jan 2025 19:08:24 +0800 Message-ID: <20250106110825.1430-1-hdanton@sina.com> In-Reply-To: <677a7db3.050a0220.380ff0.0012.GAE@google.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Sun, 05 Jan 2025 04:40:19 -0800 > syzbot found the following issue on: > > HEAD commit: ccb98ccef0e5 Merge tag 'platform-drivers-x86-v6.13-4' of g.. > git tree: upstream > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17bd56df980000 #syz test --- x/drivers/input/input.c +++ y/drivers/input/input.c @@ -642,17 +642,11 @@ EXPORT_SYMBOL(input_open_device); int input_flush_device(struct input_handle *handle, struct file *file) { struct input_dev *dev = handle->dev; - int retval; - - retval = mutex_lock_interruptible(&dev->mutex); - if (retval) - return retval; if (dev->flush) - retval = dev->flush(dev, file); + return dev->flush(dev, file); - mutex_unlock(&dev->mutex); - return retval; + return 0; } EXPORT_SYMBOL(input_flush_device); --- x/mm/vmstat.c +++ y/mm/vmstat.c @@ -2122,9 +2122,11 @@ static void __init start_shepherd_timer( { int cpu; - for_each_possible_cpu(cpu) + for_each_possible_cpu(cpu) { INIT_DEFERRABLE_WORK(per_cpu_ptr(&vmstat_work, cpu), vmstat_update); + disable_delayed_work(per_cpu_ptr(&vmstat_work, cpu)); + } schedule_delayed_work(&shepherd, round_jiffies_relative(sysctl_stat_interval)); --