From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796302352; b=efDOuMFuBXuiWcXnwkwyo1N48U6NfxpBUx9oDQ/Rj36r9mThnfFpzRoEBZi4akMPJA+x mKbfGiLazPfpasqsXuJ1d43Jjq1J04PwdFFaPkUOxr18zsq/deJ0OCs40WArrfdI2r23x gjC81XMp5P29lAzTT7PVROESpl+ECkwc6V+7FpvxUHBot/CCwLnWZoqTiZK/axgBgk7LS 25VTcGh28Jg8dFEqQbSXgPllt/t4bqO++tj0zKriUUwHqGwM3rwbiXTdekRtU5a9oW7rR ATtEpLMdQLcSzGZJ05DKH2L/e1GIv0s6UQtjI4mDuxXpX0C7cibJDFdUf3Sv/NwBo3Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796302352; h=DMARC-Filter:DKIM-Signature:Received:X-MC-Unique: X-Mimecast-MFC-AGG-ID:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received: X-Received:Received:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=YcfCdRHDKCuW+gCiQdegso9X+X4jQ2tIMBsMErdWhb4=; b=dHQmQj89wrYSo5/ryAeHdARlDm0+Nuj25+Dsd4UXLdXS1T+iR3/QKOkbXmy/HOfR7hPc BUy/xUgC1BnSMlQVkrFUDG1J8hXtLyARsSPWKZSnENn2xSYqithISfzCDbA41IasIIux0 en2QzSe3zzFaSTmvLxmJZsEbfP5qPA15ZYaXWLx0+twY1zjgoBc9nEaEL4LNqr3b8DUd/ h7fCQfsQUtZuZj8/IW9QmHzrnQFPdtaFmjdGKzgMakyo2hAdKvwg8c+7HaKjr5P60eA6u zd1YeWectTHgiQArpQIxekmuzCSaYQPeL5JQYjo2m+UM5pW1kkqCs3XI1q5DcPI5HvQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Hrzw3Uqe; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=google header.b=pw5Z3NjM; arc=none smtp.remote-ip=170.10.129.124 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B5B1606A32C for ; Thu, 3 Dec 2026 12:52:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7B5B1606A32C 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.a=rsa-sha256 header.s=mimecast20190719 header.b=Hrzw3Uqe; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=google header.b=pw5Z3NjM DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1796302350; 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: in-reply-to:in-reply-to:references:references; bh=YcfCdRHDKCuW+gCiQdegso9X+X4jQ2tIMBsMErdWhb4=; b=Hrzw3Uqe6kL3Hcu3fJGhcriXslUbpKdrmgr6K8N7Ruytn+y2xKcUfusRXb/z6ce3ouZKSL YVVmsYI/MsPLhhm1I3TpxFDLiLHv8sHWMsgfg+VImu141iPoEOUkH5eC8GOk0SfM+Qsce9 N0Q3qB97kjSNmOvzOUmEdodV1J6HHwk= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-613-TvctQDRcNiqFsFfZXr88Kw-1; Thu, 3 Dec 2026 12:52:29 +0000 X-MC-Unique: TvctQDRcNiqFsFfZXr88Kw-1 X-Mimecast-MFC-AGG-ID: TvctQDRcNiqFsFfZXr88Kw_1796302348 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4a204ac318aso68476695e9.2 for ; Thu, 03 Dec 2026 04:52:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1796302348; x=1796907148; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=YcfCdRHDKCuW+gCiQdegso9X+X4jQ2tIMBsMErdWhb4=; b=pw5Z3NjMxNWJJyvMbJjHAX4EhWcuG+QcX55q6ppjeRFqqx5yV0S3N15aVH8gGfE5LM diWHzNV3Pnm+UzQ5Afvk6Fl449qvGcapXIRFM+BC9BQ4IVU6UloIEfyon3DI++cWPD/p 0tUfb6awF+jWY0IzbEVc+TyYIWmNH+L9GGH+HkU6GC/SufO3IgkiX192zLsqr0nA2MhK tJl38rfx4mSa1cglt/pMcIRvjAhRAgtG+PHElohcMj5PsSHRQ1RnYnb1D1Nfox0KGW7X j1zl6zEP/shSSjXcsMccsPZcheCaVPmYUBU2BMUp73y0YzrUUoumEfZ2J66SNs5j6d+G ao1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796302348; x=1796907148; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=YcfCdRHDKCuW+gCiQdegso9X+X4jQ2tIMBsMErdWhb4=; b=JP8TpYa2AGr3AcucbNOMjpo/Dt2wRrAznTCPKBUKpv4jCIdx59TCB3IIaXLMX3SCdP n9Osh2yePG3A/Z4kAeucEu+8+bPWpdGGeexuh0QkqlEfxLK8wnxvdvwyGr8F1XeJ8RJZ fZekVGXjNA6ccOVERsxSiDw8vSmuHRqJxlpYhiqwXqql6PGVr3eDdWl0w1DUqof01pr+ 3HDraO7s83o2EvYni0Qt8fZrY8pc10Tg3EPzj6/X8WZmhhzopfNIp2QluE0NdOEmyMBr kpsv/oGxU32eTH6F/V7x1Bqb3oDtRrcR8V26b9BOC1OeR+b8URvuwLQ/cMTEjpZALHnM XiQw== X-Forwarded-Encrypted: i=1; AL+hErHLn7W9iLHhqDpbyxVcsqaNi1W98SCJPj2j1JZAs2LmShpHue69+cLV+Ai5T1S6FXt1/xwpq2Y=@vger.kernel.org X-Gm-Message-State: APuU4Z/6gKPAU/GoDS7+T6pXv9YJPTmLlxJb9eFZ2c12MnPZUM7cBgk3 oLrsnijferygI9lJxwuNRbk5WfCDHyTojdPbfYOOMl84nRXxi6gIn/wRIF8zlVO1vH52QUnsWkE azHvvpbYUeUqxwtggNAsjwzSYsS99l+6+AhzaTfmpjKs8jdH5S4vB9wyHog== X-Gm-Gg: AZFdTZemspMMIGS5LRcf01N8IHss3zgciBMtW8i43cX6FkeVtdHZAiyCzGUPR1H0hVk fLtbeMsq71D5o8knlR4Pm/DWJabgVFVr9QZ5rDx3kcV/bzT2szRrXplzHfvc7NQUKgxJscdn96x ch/MXU/+4VsSJuvvIge596XuT9VbcP3LMtnYFXTjWAG9gmKM/Y4zmbit+YDYehR89tctrOooUyr ZCGmmXqTmoT31LX1jdk3e5GbGTjHOB8h9TBgMYh0LZnUHKe5spIalM3mzlsyvHXUqxf/P2jOXVF CYzeQaGD3SuAz3kI0saA7orcfmIGr1RRLeaKQiIlId9jS7b1YtEEydKqDswWw8zhBGUneP/oTTy 8lqrsTa8F2ZqxubwyA3iuHqv/alE1IWC3W0qPUTbhDg== X-Received: by 2002:a05:600c:530f:b0:4bb:781f:6067 with SMTP id 5b1f17b1804b1-4bb887e21e4mr847715345e9.1.1796302347485; Thu, 03 Dec 2026 04:52:27 -0800 (PST) X-Received: by 2002:a05:600c:530f:b0:4bb:781f:6067 with SMTP id 5b1f17b1804b1-4bb887e21e4mr847714625e9.1.1796302346850; Thu, 03 Dec 2026 04:52:26 -0800 (PST) Received: from redhat.com ([2a0d:6fc0:153a:4c00:6468:7acf:febf:a046]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbe0066414sm71732635e9.10.2026.12.03.04.52.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 04:52:26 -0800 (PST) Date: Thu, 3 Dec 2026 07:52:23 -0500 From: "Michael S. Tsirkin" To: forfortuna@naver.com Cc: Harald Mommer , Matias Ezequiel Vara Larsen , Marc Kleine-Budde , Vincent Mailhol , Mikhail Golubev-Ciuchea , Francesco Valla , virtualization@lists.linux.dev, linux-can@vger.kernel.org, linux-kernel@vger.kernel.org, Jason Wang , stable@vger.kernel.org Subject: Re: [PATCH v2 0/2] can: virtio: fix NAPI stall and virtqueue use before DRIVER_OK Message-ID: <20261203075217-mutt-send-email-mst@kernel.org> References: <20261120-virtio-can-ready-v2-0-0defda2af8cb@naver.com> X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261120-virtio-can-ready-v2-0-0defda2af8cb@naver.com> On Fri, Nov 20, 2026 at 03:56:02PM +0900, Seonghyeon Lim via B4 Relay wrote: > This series fixes two issues in the virtio CAN driver. > > Patch 1 fixes an RX/TX stall when an interrupt arrives after the START > command but before NAPI is enabled in virtio_can_open(). > > Patch 2 calls virtio_device_ready() before the first virtqueue use in > probe and restore. Without it, resume hangs if the interface was up. > > Patch 1 goes first: without patch 2, restore hangs waiting for the > START reply before it reaches that window, so patch 2 alone would > expose the stall. > > The interrupt handlers could also use virtqueue_napi_schedule() like > virtio-net does. I left that for a follow-up cleanup. Acked-by: Michael S. Tsirkin > Tested with QEMU 8.2 and vhost-device-can: > - With the interface up, suspend/resume (pm_test=devices) hangs > without patch 2 and completes with the series. > - With a temporary delay before napi_enable() and continuous traffic, > RX interrupts arrive while NAPI is disabled and napi_schedule_prep() > fails. With patch 1, NAPI is scheduled right after napi_enable() and > the RX poll runs without waiting for another interrupt. > vhost-device-can keeps sending interrupts, which hides the stall > without patch 1. > - RX traffic and repeated down/up work. No lockdep warnings. > > --- > Changes in v2: > - Add patch 1 for the NAPI stall reported by sashiko-bot. With patch 2 > the restore path can reach it (Michael's question about callbacks > after virtio_device_ready()). > - Patch 2: describe the callbacks, add the hung task trace and > Cc: stable. > - Link to v1: https://patch.msgid.link/20261111-virtio-can-ready-v1-1-0b4dd020af0b@naver.com > > --- > Seonghyeon Lim (2): > can: virtio: fix RX/TX stall on interrupt before NAPI is enabled > can: virtio: fix virtqueue use before DRIVER_OK > > drivers/net/can/virtio_can.c | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > --- > base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b > change-id: 20261111-virtio-can-ready-85cefff06a84 > > Best regards, > -- > Seonghyeon Lim >