From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 8B9B53BCD21 for ; Fri, 29 May 2026 10:31:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780050671; cv=none; b=qYm07tkmxpfw+TIlDRNFZo1wG191YVksMzZKRT7CGbUQBvJRkSUSC9W8/wYGcnSEexKMtoqCDu4231JOGnhmJWIqEJFk94c1V30qRUSUT4ADPGKY+jRNbYFMjcmM9gUgR5Uy6GqiSKGbM9ZOPM/9iTehlY87oylK2LbgW03bbt8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780050671; c=relaxed/simple; bh=TnQ9Pz7fsUBXLgOheDV2t6F0iPGT1NGiYVSE4Vaf550=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Kr4Wj0nG5CMPyLkBpNcmAgb1swc8K6ZgNEILpOY1tbOEWPhcAISWidzmkzcfHonrKGOgKkx5SNfdiV0nYTx3eqRhR8CMkXLLdqQZX15/uMpnfMGhMsxENuti2Ffc5aCDfYkdsWA8jDk1z8OD1F1NEw03vNeyyozXV+VUsr4fYwQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=g41+KBg0; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="g41+KBg0" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4891c0620bcso88801485e9.1 for ; Fri, 29 May 2026 03:31:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1780050669; x=1780655469; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=AnWegkTJYjsTiRlpCjBocEuV+DyykuuRTv5OiUPKgrc=; b=g41+KBg0McHkaVSlua/ACtPi0rdk+DcJM9lpfLqgZbBkY57djQ2Cic04p+d2PMYGVv T0z8H6L0yOUX9v53bus3/O7LSwXxz12SHIe9Ogq8rOkx4fpdWE37q9Kc3RAbUfCxchEH DmY9p7GokJIrtIwLXc6OMApvo2lSXtlsS6auG1LLTxg142+P0uFSl7aaMDRnZGUvDg96 Z9i2xMS3evossShX7ImceOUYlFSpBpB5SkWxpSIIRPVZX8tMSjjjs2M5yNY3rNTtbnkz rxCHWy21Ej6tzYA+Rr7AZnqUI+xBfR6F8+jvumzIyv4aXHspd8z8FkhZVtnGi+CIp0Ho XQ9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780050669; x=1780655469; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AnWegkTJYjsTiRlpCjBocEuV+DyykuuRTv5OiUPKgrc=; b=Wuw1XFIWhov9OKe6HzqlnLfFKnLSRPfPqKWCANgVkPQ7ADv9lm3XvqklAr0wCXmyvk GuJIJrKdnWRvQUR6CwjEKAFHLhCVvyZIJWDZcy1HQ4NFErmHbzQUs2HVKnthgzRP1Imy 9WM8MKTFzSDnVRMX3DZVNW/EjuPq/Z1/b6uLxZY/2dHyZ4pfzmaVcw+snlNy//dLYKfS Tcc+jFIIby4S9E39uh53yI52LTkGYCVDdb1qBekp5boOa/VfYxkdEmdI2Z16goZxlsVa SNZOKeDf6miGQE5ri0Ycum3OOuLVbtF7cTYHTBbiNJzUQiCidknCAXVB2vhb6uBTxuuc FVGQ== X-Forwarded-Encrypted: i=1; AFNElJ873/ewD6/UfwO4KUK3u8sSJamiaTgi7Ed4Rn8/LGoIjJQOMk1I0oHJQevhVnCmSZp2mqPp4zSOHFejgr8=@vger.kernel.org X-Gm-Message-State: AOJu0YzB48WPYEioroueOpguuAzCTeVjs4ugXYDE/yJyWfTnGiTg/VMo hko85E/LGYIKbYI1XU+NoneT8eZjSwuDE1E4qCeyGaKiKiR/l/JjH40w5+6JJ/xnu9Y= X-Gm-Gg: Acq92OEcB7EwgfqotYcGLKJQh0CoksyU+RxHykaLT2ZpKtvnjFQDCE14QqgHYQHHD5W c741446QRnRZw+4qmfRNlEVOCPYwDH/cTi6CE+i2DEWlXnGLzr1jPTDt0s0PoYu37HiPXQGMugs /nL/RozlyvjIX7T4iWBZ/R7xEzPTmnLndLsSB1mt9Yzx4k4mN02e7Z/HW7cRZYQkujg6e4EF/on OUnkO+fFwo+fY8Z+5cTR5pswvWYStbfKvjS0qC9W9S3CJJtseDMhFU/JDn+vX1OQpTwDCEA86uL pf2hUOTAWs0mXhrG8jtYDq2GKwu74KEXvbT2+1x1nRVxLRrk6oTSCD4qYL5z/2cbwiNalBnv6A1 Dv4eFJbHize1WtIQ8HgUI7OwC7/r7nHYcwP24Uc2vqUD9qsmsiqi1OXpDxsk3WkzO2J9UK8JGQN LnV/jRAG74tvWk7WO4V93jpCwwxOmhbg2teiAAv8r2biqeiHv+aCSL3fkJFzM+j0mO0Ewpdesmi sE= X-Received: by 2002:a05:600c:250:b0:48a:5821:5ff2 with SMTP id 5b1f17b1804b1-4909c0813a2mr26657805e9.8.1780050668957; Fri, 29 May 2026 03:31:08 -0700 (PDT) Received: from ?IPV6:2001:a61:13e8:2801:7422:57b5:ac0:e7e6? ([2001:a61:13e8:2801:7422:57b5:ac0:e7e6]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45ef34b47eesm2827353f8f.9.2026.05.29.03.31.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 May 2026 03:31:08 -0700 (PDT) Message-ID: <7f78b968-3cb3-4194-b709-28e45946697c@suse.com> Date: Fri, 29 May 2026 12:31:07 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] usb: misc: yurex: fix ordering of usb_deregister_dev() and usb_set_intfdata() To: Ginger Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260528082751.204898-1-ginger.jzllee@gmail.com> <5099d6cc-c8bc-4fdc-97cf-31e96a57e0c1@suse.com> Content-Language: en-US From: Oliver Neukum In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 29.05.26 08:58, Ginger wrote: > I think the intuition is that the global exposure (i.e., the > 'usb_minors') of usb fops should be disabled first, so that the > subsequent nullification of internal fields can be considered local to > prevent concurrent accesses. Hi, if I understand the logic correctly, the order in yurex_disconnect() makes sure if yurex_open() and yurex_disconnect() race, yurex_open() will never see an unregistered device with intfdata != NULL. That is, precisely because without a lock the race is unavoidable the newly opening task will be guaranteed to know that it has lost the race. Regards Oliver