From nobody Fri Apr 17 10:34:48 2026 Received: from mail-oo1-f69.google.com (mail-oo1-f69.google.com [209.85.161.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7139229BDB5 for ; Sat, 21 Feb 2026 06:27:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.69 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771655247; cv=none; b=IsXzJADZsmguaNiZGpjxZsparOJyBP9DGpJtz4ldeTsV5f+ewaTncibzgvn97Ei8zTTlLH81iIhtEtDgv4p3QuJGZJBODLzgSHscyg0vudQyjRdo9gQ8hHVXvrOiVCm0f9QMYERXbdI/ineM1dUF1nCcsPdj2+b4Busof2JWUNU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771655247; c=relaxed/simple; bh=8qK5hAuubdK5bezjRWSkWq6iJF9ujDzbLlH3j2yE/VI=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=r9gWvP/N8/sjblz4vbj6L+k66+L0W7Wy1lCHfIiiN7UkoIGi3eNd9UaGeE3MDifO6W4dzeFqa97++nsMrGVBGExtIdx+2quuXcXFaLgdy7QGFX9GoNyXndeDZR9KBmh1c/299U35EsZLvn77eAlJfgYVqKuM8VGaN+gYtQ29qiE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.161.69 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-oo1-f69.google.com with SMTP id 006d021491bc7-6799654a158so17757360eaf.0 for ; Fri, 20 Feb 2026 22:27:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771655245; x=1772260045; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=m3k8ix8oAZmUe235+TKZXsp0kvdqTV8k//gfH8tS58U=; b=I1zf9gjD0nal3RNtYxTquIXh1ICCmLk1hpqIwrfgagxHF9zHoPhWS96BLBjEG3sC8v kl40p3tnBCPYkf2vSXY8+t24iTZ8UCN9SzH9Ksml9LjNJ8WiYzYz5aYhqul3xmuG6Ryw diePCYPeQwoDyzeOBc7qz1Q9Wm50Meoo/yV4TOahNRPzg4a7huF5WQIz/4xzaxliq+Z8 rmbRCkLoRUbr6ZV3l3OFzEtsLMHQbM6xXFGpySDoTznUcxe1GID0vi1vYCw7GwDspBDs BgT/XJXuBjGSUW2oc1gTP7dpFGFq3+Sq/Wm4XI0lPff3mXPhZ+LM6c8quhQfP0UeB9sJ H+sg== X-Gm-Message-State: AOJu0YxUkvtJfX7UNvCGNk4uChpQISo3B6lKrZyNpDh2gJzkpoFAAzQY RNaacyFeqqmQ7f5zUNuXFZ/a1i7JUEGC68dHXgE8xzer7tP2FvTxrkbNvjHly4X9QUELYLm8BCv Ndv0//r0Epl0EdqCnhgfKVtjWBUfvUmRVR/baODyIEmFVbMXv93A2YiO6Nl8= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6820:4810:b0:661:cc1:50c0 with SMTP id 006d021491bc7-679c424cc83mr1080619eaf.11.1771655245245; Fri, 20 Feb 2026 22:27:25 -0800 (PST) Date: Fri, 20 Feb 2026 22:27:25 -0800 In-Reply-To: <69984159.050a0220.21cd75.01bb.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <6999504d.a70a0220.2c38d7.0154.GAE@google.com> Subject: Forwarded: Re: [syzbot] [kernel?] INFO: task hung in restrict_one_thread_callback From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com. *** Subject: Re: [syzbot] [kernel?] INFO: task hung in restrict_one_thread_call= back Author: dingyihan@uniontech.com #syz test diff --git a/security/landlock/tsync.c b/security/landlock/tsync.c index 0d2b9c646030..4a6b9d99e594 100644 --- a/security/landlock/tsync.c +++ b/security/landlock/tsync.c @@ -447,6 +447,19 @@ int landlock_restrict_sibling_threads(const struct cre= d *old_cred, shared_ctx.new_cred =3D new_cred; shared_ctx.set_no_new_privs =3D task_no_new_privs(current); =20 + /* + * We must serialize concurrent TSYNC requests within the same thre= ad group. + * However, we cannot use a blocking mutex_lock() here. If Thread A= holds + * the lock and queues task_work on Thread B, and Thread B calls TS= YNC and + * blocks on the lock, Thread B will never return to user-mode to e= xecute + * Thread A's task_work, resulting in a deadlock. + * + * Using mutex_trylock() allows us to fail gracefully, returning + * -ERESTARTNOINTR to process pending task_work and retry the sysca= ll. + */ + if (!mutex_trylock(¤t->signal->cred_guard_mutex)) + return -ERESTARTNOINTR; + /* * We schedule a pseudo-signal task_work for each of the calling ta= sk's * sibling threads. In the task work, each thread: @@ -557,5 +570,7 @@ int landlock_restrict_sibling_threads(const struct cred= *old_cred, =20 tsync_works_release(&works); =20 + mutex_unlock(¤t->signal->cred_guard_mutex); + return atomic_read(&shared_ctx.preparation_error); }