From nobody Tue Feb 10 04:23:20 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 6D297326921 for ; Sun, 25 Jan 2026 16:07:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769357273; cv=none; b=p1nSNLaglNX2q1rNjUYHR2p506cP5ZjT3VXW23TTQt6iKZq84uq+hCM2Z8/vDEFCnvS7UuCFj1JPX8yuCM/lEV9Fb/dMXLEUJURKdCbEogzbe52Qw08PTpPUfBKz3ljMxcNtUEKu1vAF1QYATnozHBdGqQWF0UAvoDn0hDjMNdg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769357273; c=relaxed/simple; bh=VJ5cSYp2xK2SbdPZbmh3iaP2IOZw+qeby9FVKdtFbpY=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=tbZA25YzPtGcLlGVt1BBfU0UwBY49/b1zjUvKdtNrSlTksdKVUkco7gGcy0upUCYSZLOuSgDGvVHKZQqassOFqraj8kjxuC/kJ7UN5AXtVCucxTEIBykDu6oWHsq+exfw3KouGS6nCF5QCdIGdn7WHgmGBwCxYSkHgDXS3pWiwU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=FV0NObKJ; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="FV0NObKJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769357271; 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; bh=HX7g4ZyLO3QeN4rHwQXwu4GirpPKoFXznz/m5O/wqpg=; b=FV0NObKJnN+AoPnAJ2lOx2WgFZSfPpEbnFPbJnWAptrKOgY0FNOOdJDdorHN90+VN3ZqRm 2h0WmY0ePGBsu3pi2gHF9Xj7RzS9aeNN0Z14M/g2/pQiI698lmOzGvhTeh6xvhTM9GF7rq FigC8ymkDbg5O1blWvD6F2C28HAVtIk= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-433-8vLhMG4tMRe8EuN-kyIaCA-1; Sun, 25 Jan 2026 11:07:46 -0500 X-MC-Unique: 8vLhMG4tMRe8EuN-kyIaCA-1 X-Mimecast-MFC-AGG-ID: 8vLhMG4tMRe8EuN-kyIaCA_1769357264 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B313A195608D; Sun, 25 Jan 2026 16:07:43 +0000 (UTC) Received: from fedora (unknown [10.45.224.8]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id EDD351800665; Sun, 25 Jan 2026 16:07:37 +0000 (UTC) Received: by fedora (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Sun, 25 Jan 2026 17:07:43 +0100 (CET) Date: Sun, 25 Jan 2026 17:07:36 +0100 From: Oleg Nesterov To: Andrew Morton Cc: Alice Ryhl , Boris Brezillon , Christian =?iso-8859-1?Q?K=F6nig?= , Felix Kuehling , Leon Romanovsky , Steven Price , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-rdma@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v2 4/7] drm/amd: kill the outdated "Only the pthreads threading model is supported" checks Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Content-Type: text/plain; charset="utf-8" Nowaday task->group_leader->mm !=3D task->mm is only possible if a) task is not a group leader and b) task->group_leader->mm =3D=3D NULL because task->group_leader has already exited using sys_exit(). I don't think that drm/amd tries to detect/nack this case. Signed-off-by: Oleg Nesterov Reviewed-by: Christian K=C3=B6nig Acked-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 --- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 10 ---------- 2 files changed, 13 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/a= mdgpu/amdgpu_vm.c index a0f8ba382b9e..e44f158a11f0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -2551,9 +2551,6 @@ void amdgpu_vm_set_task_info(struct amdgpu_vm *vm) vm->task_info->task.pid =3D current->pid; get_task_comm(vm->task_info->task.comm, current); =20 - if (current->group_leader->mm !=3D current->mm) - return; - vm->task_info->tgid =3D current->tgid; get_task_comm(vm->task_info->process_name, current->group_leader); } diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd= /amdkfd/kfd_process.c index a085faac9fe1..f8ef18a3aa71 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c @@ -833,12 +833,6 @@ struct kfd_process *kfd_create_process(struct task_str= uct *thread) if (!(thread->mm && mmget_not_zero(thread->mm))) return ERR_PTR(-EINVAL); =20 - /* Only the pthreads threading model is supported. */ - if (thread->group_leader->mm !=3D thread->mm) { - mmput(thread->mm); - return ERR_PTR(-EINVAL); - } - /* If the process just called exec(3), it is possible that the * cleanup of the kfd_process (following the release of the mm * of the old process image) is still in the cleanup work queue. @@ -918,10 +912,6 @@ struct kfd_process *kfd_get_process(const struct task_= struct *thread) if (!thread->mm) return ERR_PTR(-EINVAL); =20 - /* Only the pthreads threading model is supported. */ - if (thread->group_leader->mm !=3D thread->mm) - return ERR_PTR(-EINVAL); - process =3D find_process(thread, false); if (!process) return ERR_PTR(-EINVAL); --=20 2.52.0