From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail78-36.sinamail.sina.com.cn (mail78-36.sinamail.sina.com.cn [219.142.78.36]) (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 4537963CF for ; Sun, 12 Jan 2025 01:49:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=219.142.78.36 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736646561; cv=none; b=OCtO+bztGWTPjrq3jUFJlY/kO651cpKSMovfkT0CL8fK202Ps9bLJMvqtBitrKIh5VBmZ+1A3PDMxrE1yTUp3hT4CwR5xXdtBQzyT0rox6D1vDxQ4k6oofIcaEeh2tD26kgXIekhsOm1CLM6GXE80H7Jk6FZkTOWufD7dYpvFfw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736646561; c=relaxed/simple; bh=DxZoK3IDRxg2eyiDbrewan6rVQaX+5vuC6QLcF2vgeg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nj4/rJaad+LY8P6LRK3g2SQMUc53rsrzVuBSNIv1lKfFwJKBCScxt7KDyUh4mUBUT4BA/l0lZzfQDyHkPN1EjVNot3ZFOHZ0lr8Faxwogppk/CyhC4NXS5TB6EOD1YpD7NQ1aWhjNaLhT3Gd7eesJJSz+eEKzanckSspxsC7ys0= 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=219.142.78.36 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.118.69.152]) by sina.com (10.185.250.24) with ESMTP id 67831F9100007965; Sun, 12 Jan 2025 09:49:07 +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: 98403510748364 X-SMAIL-UIID: 2E91A3B706544B67A4D9CFC5B2CCA5C2-20250112-094907-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [kernel?] possible deadlock in binder_alloc_free_page Date: Sun, 12 Jan 2025 09:48:55 +0800 Message-ID: <20250112014856.1791-1-hdanton@sina.com> In-Reply-To: <6782483e.050a0220.216c54.001d.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 Sat, 11 Jan 2025 02:30:22 -0800 > syzbot found the following issue on: > > HEAD commit: 7b4b9bf203da Add linux-next specific files for 20250107 > git tree: linux-next > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10302dc4580000 #syz test --- x/drivers/android/binder_alloc.c +++ y/drivers/android/binder_alloc.c @@ -1245,10 +1245,12 @@ void binder_alloc_init(struct binder_all INIT_LIST_HEAD(&alloc->buffers); } +static struct lock_class_key key; int binder_alloc_shrinker_init(void) { int ret; + binder_freelist.key = &key; ret = list_lru_init(&binder_freelist); if (ret) return ret; --- x/fs/debugfs/file.c +++ y/fs/debugfs/file.c @@ -87,9 +87,6 @@ static int __debugfs_file_get(struct den if (!((unsigned long)d_fsd & DEBUGFS_FSDATA_IS_REAL_FOPS_BIT)) { fsd = d_fsd; } else { - if (WARN_ON(mode == DBGFS_GET_ALREADY)) - return -EINVAL; - fsd = kmalloc(sizeof(*fsd), GFP_KERNEL); if (!fsd) return -ENOMEM; --