From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (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 7A389347BB5 for ; Tue, 23 Dec 2025 19:44:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766519049; cv=none; b=ZHZD5DvKnJ1cfpzPyAZSJ82IniFlx9cMecSUb6B9CPp87/sD/JXgZ5sJEZB3Q+aqiChvX0wz/Q9ooJzGLo9XgeSxRSyt6jQKIIyx9i5o1roK8i4AEX1VWipIueaCXhfZml07geog1WJ3IChS40Fcn7A3NYt4uIkYSS8a0sG5nZQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766519049; c=relaxed/simple; bh=bhPkIxjr5QonV1NiJwCZCMmc5Hdd6ExIKm7f35w1bTw=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=N2dRuQzINqIZnAZ/h2Y88XRdPzNhyUlQmZN55n5d5jmKpE6+7xYBo5Hj/jB3mFC8TpNN4uSdVkmXdboL84ATvuqAp+jUjzJPE0lczlWfkPBsCPpYS0Ai4bpBZI71+GE9r2fW8Hi7+Jg3+qDAiCBI4r5pyIlglt84YE6p3ja3CgY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=TN8dE+kP; arc=none smtp.client-ip=209.85.208.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TN8dE+kP" Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-64b4f730a02so8617715a12.0 for ; Tue, 23 Dec 2025 11:44:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766519044; x=1767123844; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=yVXjC/5Kqtd7TCP13ncle8giJLPf231wN+xT/bbGPW8=; b=TN8dE+kPGVi0rrH6oS7YBqQJP1GU+nYv78mEIC0RJLG4eR+evvY8Zn2cQS1ssZHAAi BAcbG+K72p/noWnJdx+TbtfK/c1ZTTt6tT0WyN06TX5z3jfSLbQLUALzUFo1QQDxLHUJ 17t8p3DMnjv7j5X9hIrHMIofYr/xDhhPvjB4y8gUbIQC0Vro58k1XzK4hiFYy6EKdEBw 3w/hyZprJSAAnIYP2VTta7iwFlU89m0JQDCYwJAtlkCcA2tSP6Diwd5Wvf1ZlWDESD8j OTk3yzyIgnmqciC2Fr208215J03/lL7FmSPOFAjFoilTFeDCGJmN2tEz8N1xa83jYR1A 0EnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766519044; x=1767123844; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=yVXjC/5Kqtd7TCP13ncle8giJLPf231wN+xT/bbGPW8=; b=JP8U0YbFOVDSkpfT/vRjBI8kFytf79de0McksK6Hp9KX1ASfRE3c2by/c6y0yhM9bx mwR0vuYqpKMnecDZ9RgMWQv3efhljzhTjnE3kNWIQxjoZdNouDetnmFd1X5Ae1Jxunt0 BW0kwpjfJQDMowbWoWP/9bPklPaolZ7se5jQlQKjvQjzJyq2Hxy4askHyCjOcjd+p76B Bxt7bRFHmgpD0bOtjKMlc0g/v1VTDvFNE2ID3oWcZGiV7WeWexT9y3Nx4jvj+UQZTrIb Avz+38C+OgibWg4Mf41PK/AEeMDqk0Xqx4VR3OGvVCwtojeVRIGqAWFFZr5dgLkhcZi+ gmDg== X-Forwarded-Encrypted: i=1; AJvYcCWb8+aCZsTb7KySJOXYb/Ts7Bi+VNgk43GDG3LCOlUWu5gmo8F6DUXY8Ml9l7WFGeyb939OODVkkUpUGAg=@vger.kernel.org X-Gm-Message-State: AOJu0Yzp+xU9jeJmXbexS6APUcYwuIpM60P4goyKMoRLj3lLYf6erw3l PnOybPMlfzktNtv/1TCHcpry3D+8zABWM/aSYnJZ6wsBRCDYFkEgI3Z1 X-Gm-Gg: AY/fxX4na6poEc5y9/iYWcmFnIFh0XaKe0XD1eVKpnL794qeGaBGCr54rOAnWbX5kNo rCCzf5DS9YHhNpNyCNPeBkojKDYFYbPpLoKnyal+hBxVERVHb54sB8VuGIiufq2SdDqkpcZoptK dnLugDxxs1VKA0kEt+rcqoa7j9NaqhfJZJrTrdcyq9D3qa6WSi9D3HNKsa8KTyKUcYKzk1H+FlH oZzAtjjOKl0iEsQQktYnLllPGIdj8eRRQTZFeObdY7CAw1bvq/Zqv2yj5PKZ2Qe6g7wFw7obOHk I55d7HpAOwjtYCh/fgLHpsayXmjSfdpptkNt+aUm/a5654YA5TT8amJ9RDxFYimQthNeswb6re1 KMSLGFx2hFwaF19uL24w742KXJFt+MfZtLHDrxRpKpnbIOFg+6/3MtvYJ6JyQ09sldvMfduKMd/ qqj8jWtlu+Dq8oMPGAwt3WlcE= X-Google-Smtp-Source: AGHT+IE4Ng6o8iSNIIbTrXTbC/qQWl68toPKF+Lw078aOBmUlm/XlL1hQP7yVmKyAVtbql9pFKCdnQ== X-Received: by 2002:a05:6402:1461:b0:64c:9e19:9831 with SMTP id 4fb4d7f45d1cf-64c9e199bd0mr12729240a12.12.1766519043454; Tue, 23 Dec 2025 11:44:03 -0800 (PST) Received: from foxbook (bfd193.neoplus.adsl.tpnet.pl. [83.28.41.193]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-64b9159a6d0sm14608822a12.28.2025.12.23.11.44.02 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 23 Dec 2025 11:44:03 -0800 (PST) Date: Tue, 23 Dec 2025 20:43:59 +0100 From: Michal Pecio To: Alan Stern Cc: =?UTF-8?B?6IOh6L+e5Yuk?= , Greg Kroah-Hartman , Lee Jones , Mathias Nyman , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] usb: xhci: check Null pointer in segment alloc Message-ID: <20251223204359.49141a2b.michal.pecio@gmail.com> In-Reply-To: References: <20251222064252.GA1196800@google.com> <2025122253-stopper-tweed-6e68@gregkh> <20251222085543.4d7430d5.michal.pecio@gmail.com> <20251222174934.4c9b62d2.michal.pecio@gmail.com> <38822950-6d69-4ad6-be28-fb8f328c8ae5@rowland.harvard.edu> <20251222220349.2d6c1a43.michal.pecio@gmail.com> <20251223110621.2b53f63d.michal.pecio@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 23 Dec 2025 13:37:41 -0500, Alan Stern wrote: > > So in the light of your explanation, the fact that xhci_resume() > > sets HW_ACCESSIBLE before actually completing resume and thus > > allows root hub resume to pretend to work, is obviously a bug. > > No, not really. The proper time to set HW_ACCESSIBLE is when it > becomes possible to do I/O to the HC's registers, i.e., when the > controller changes from D3 to D0 (and maybe a few other things like > pci_set_master() have been done). By the time xhci_resume() gets > called this should already have happened, so setting the flag > immediately is the right thing for it to do. OK, so no problem here, thanks. > Agreed, we can't do anything without more and better logs. Adding > dev_info() lines to the start and end of the various xhci-hcd suspend > and resume routines, as well as xhci_mem_cleanup() and > xhci_mem_init() and whatever else you can think of, would be a good > start. That code is packed with dev_dbg(), so seeing this reproduced with dynamic debug enabled would be a good start. It was the first thing I suggested before trying to find problems with USB or xHCI code. Regards, Michal