Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1707649lqo; Sat, 18 May 2024 16:02:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVuPWdsgOWiaPcZkmrWd4ptAQGHcGqduEBdrD1zkqj+YmjYKriAwlxSP7aOJzwhq4jarD+y1Y4zYQ3bgWVRsyBdG9coKBAmVayztjjfEw== X-Google-Smtp-Source: AGHT+IFIBaIWDJrRSDU7SKcrEWNsRDU7VAbmFz91BkUz8MzT55gpKQW7XbGrzfauU8bFmPPn5fki X-Received: by 2002:ac2:4c8c:0:b0:51d:a87e:27ec with SMTP id 2adb3069b0e04-5220fc735f1mr15974764e87.9.1716073336632; Sat, 18 May 2024 16:02:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716073336; cv=pass; d=google.com; s=arc-20160816; b=FQ0/3ZCQCcCtTasY5gcpxoMt/qZ0lQsQWeEXg0qbV6YlUL5ro4H/pBa+8FMwDU3kdc NilToa5OHOFagdjkwMbuA5SCptw4p4d2OwT/AP4dRRfYOXZ6DVdRxsWQzfWOIf63hPf4 ki7wyNj/RJX/igEomfCy7/AOsoVVHTRSFi1EEaKEzwjINjnSYUzafwv55VAi4h5YRP52 o+1Ue0Nm/zVWdGH6wADHfnFNh5uen4Wbz6FB7SpEWyCpWhnVrUza2QPFrU/8f2R+pMRZ pLe3CpcS7ketQQr0M9w5s/5UFS5YiaH9OU3GeM1yBXPiJbf6kRmqxkbmdCvGpqrAnAKa UQwg== 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 :date:subject:cc:to:from; bh=nvgqBwJG8mRKSzFz6MfUOdHBr9RI5kJtmJBd9cDaPKA=; fh=bvzqpv1KhgDske8lPdwfNbncVVF+km7yEH+PVs2pDWI=; b=eodgJ4y9npLAFH0fOs0BiLK7xkn4g7aZ1bLwCTT4nfmYKKSc2WzHuXwgHXQJ7qFVib 8SfOOFpNq0A0FAbzchjWBLuJkT/sZK3uR+mF+EBENNHzd4pCF9hgDIh+/hI55nutcvyH BWcl2c4U5BpDeyrkNUBRkjh12F9oGN6rUoqSLzbGrJVN+/s5wmcqz39A0/0NpjSSZ4Kh hlfNJQp31LGUVa3sxvDZGvuMeOQt9XZzzsseMCTpK9N4fG4wlSaqsFBTM5xY4l8rn2Ig zTk8SQgUWO71VYTUvHVFA1medUf7J2XveFGr63JQvSgh3co2bL4yTk1yXK+CzhAwgU9l tbIg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-182995-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182995-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17c2c67csi1174814866b.1017.2024.05.18.16.02.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 May 2024 16:02:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182995-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-182995-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182995-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 111FA1F21655 for ; Sat, 18 May 2024 23:02:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0AAC06BFA6; Sat, 18 May 2024 23:02:10 +0000 (UTC) Received: from mail115-63.sinamail.sina.com.cn (mail115-63.sinamail.sina.com.cn [218.30.115.63]) (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 2470C199B8 for ; Sat, 18 May 2024 23:02:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=218.30.115.63 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716073329; cv=none; b=ebDUCptS9XJMlH8Tc6f0QADFH4IqkZxwijPIAIC9+OlWDYnH+F2pUrAQWKRsVmlmcTYCRkOPMS1yvghHg6j3gq9tQP3Q0eujIt3KB9KbI9HfpS7rVoXzfryOL4gfxlV/nACjVdhir6XnEaN40/XzimQkFCptZ1qWBEfELXDBxf4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716073329; c=relaxed/simple; bh=G6vDf+lRemoblvucBh3laridfNHysm4v3Er3VZGWys4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RBmiuP5mprzunw6874iC8sn6Hyn8001Z0ZM3nDmWFGfRS79HOF4lX3eCkKRIpbAYtw4qo6iEud6KJzmDd2rMyhEBbJ9RjK/ZRlvNgjxlij4PjyhewgvQpjvyQgazE+JZ6unLlwWbxxXGkTjrkucoRyjZRn0WIaA1TRV+CCDZjsA= 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.115.63 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)([113.88.51.153]) by sina.com (10.75.12.45) with ESMTP id 6649336100005440; Sat, 19 May 2024 07:01:55 +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: 63390531457848 X-SMAIL-UIID: 3173DF573BBB437BB3E8A5340C7C8B6D-20240519-070155-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [input?] possible deadlock in evdev_cleanup (2) Date: Sun, 19 May 2024 07:01:44 +0800 Message-Id: <20240518230144.1856-1-hdanton@sina.com> In-Reply-To: <000000000000de2ee50618bb2490@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 Sat, 18 May 2024 07:18:36 -0700 > syzbot found the following issue on: > > HEAD commit: fda5695d692c Merge branch 'for-next/core' into for-kernelci > git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=134d3182980000 #syz test https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci --- l/drivers/input/misc/uinput.c +++ u/drivers/input/misc/uinput.c @@ -311,6 +311,7 @@ static int uinput_create_device(struct u struct input_dev *dev = udev->dev; int error, nslot; + lockdep_assert_held(&udev->mutex); if (udev->state != UIST_SETUP_COMPLETE) { printk(KERN_DEBUG "%s: write device info first\n", UINPUT_NAME); return -EINVAL; @@ -362,7 +363,9 @@ static int uinput_create_device(struct u input_set_drvdata(udev->dev, udev); - error = input_register_device(udev->dev); + mutex_unlock(&udev->mutex); + error = input_register_device(dev); + mutex_lock(&udev->mutex); if (error) goto fail2; --