Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp834724ybh; Mon, 13 Jul 2020 02:29:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsu+9FgXoIqwnDLkNsIqSTgxR8OhW9Ao1rdSDvoNBPgSbY4nFckVz55ylyDyANCq7snKeJ X-Received: by 2002:a50:cf09:: with SMTP id c9mr50087825edk.90.1594632567422; Mon, 13 Jul 2020 02:29:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594632567; cv=none; d=google.com; s=arc-20160816; b=pvqSu4e366mEHS7G2tbFYRwvIhnZo4L01ziWC/6qoTUejI76I03UCRx8tsHQgQ9lbk +Ikin7IuePCrYe3SYIunX6RJu7VakafyBsY3z0lVzJkkhMCoLYIpIvhU0iRJdpQ9AAzd aKYv69BObcQ0m9Wm6O6uGq1wO5EMf7MHjkEnY0oaorwhN972ePcHmiQnx30a8dI0cyOH QHlIFTNB3+LoPbC5kSgoaM9PpRYzFYV+nZtN7kKVSztQyOT7CKrJkHKDRV0sm6Q/lBm1 xzCDd79viJWpoacAkV9i5G7e918blITXv07T7PjJz26B/FpA2ZRtJWbMXMOLjlCjApJF vqxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition:in-reply-to :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=P+elYLgq2j5qUQKLLEoBv4e9Ba57OCTVDx1n9MkHwGc=; b=KQgrJOVg2ALX3Buy9+1iA2l6DgaYzs9Woq1MrVHQqhbrgcyP28qax9tougckyOX8ke Rm7rK4PIOgMWkxO8DA5UVbyxDkHe9zths9uTI2ngK11+YFd5Fn6Xjug+dRV1CH90JxAF 6ZU10yYoOQ1s6DwmkRpYqG/OT6XB3xaMQzwbkv7R62YdP8V/kqo4zAoY+170ZrIpOc7Z FEcyIB1XDQUL1WGNyCl8jZnv7gR4evMsG+uJQZ5030HGYXqj3bakKOiZfGZ7HD9OUX2M I2KpVsi2tlRtVn8/VWxgvmqAflkJDru8VU9dMfV/7IXrVLTgz6ip5XLPFsl9hvF8SA4n 1yLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Shu73sr1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ds3si10924961ejc.545.2020.07.13.02.29.04; Mon, 13 Jul 2020 02:29:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Shu73sr1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729219AbgGMJ2t (ORCPT + 99 others); Mon, 13 Jul 2020 05:28:49 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:46201 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726991AbgGMJ2t (ORCPT ); Mon, 13 Jul 2020 05:28:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594632527; 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=P+elYLgq2j5qUQKLLEoBv4e9Ba57OCTVDx1n9MkHwGc=; b=Shu73sr1Ai4RiNhJTbavFg9vCUiYk4KN3C2ONoNz0PeeV4QgzMJZcui+02mLg8YhZyAaGR 7P1cuEEVcGspfE6i3EDUvtU9COxrBkP/fhOOFNxqBhY6MCau5V9tkZJ+XHHIl28SCtXW6+ E/bZLZomk4MtsiteAgyVL/+hixGbx9M= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-185-FwrGlKyLNL-IwTkG1UdoMw-1; Mon, 13 Jul 2020 05:28:45 -0400 X-MC-Unique: FwrGlKyLNL-IwTkG1UdoMw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 085F51080; Mon, 13 Jul 2020 09:28:44 +0000 (UTC) Received: from localhost (ovpn-114-66.ams2.redhat.com [10.36.114.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id B3B3D74F44; Mon, 13 Jul 2020 09:28:40 +0000 (UTC) Date: Mon, 13 Jul 2020 10:28:39 +0100 From: Stefan Hajnoczi To: Stefano Garzarella Cc: davem@davemloft.net, virtualization@lists.linux-foundation.org, "Michael S. Tsirkin" , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Jakub Kicinski , kvm@vger.kernel.org Subject: Re: [PATCH] vsock/virtio: annotate 'the_virtio_vsock' RCU pointer Message-ID: <20200713092839.GD28639@stefanha-x1.localdomain> References: <20200710121243.120096-1-sgarzare@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200710121243.120096-1-sgarzare@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="YToU2i3Vx8H2dn7O" Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --YToU2i3Vx8H2dn7O Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 10, 2020 at 02:12:43PM +0200, Stefano Garzarella wrote: > Commit 0deab087b16a ("vsock/virtio: use RCU to avoid use-after-free > on the_virtio_vsock") starts to use RCU to protect 'the_virtio_vsock' > pointer, but we forgot to annotate it. >=20 > This patch adds the annotation to fix the following sparse errors: >=20 > net/vmw_vsock/virtio_transport.c:73:17: error: incompatible types in = comparison expression (different address spaces): > net/vmw_vsock/virtio_transport.c:73:17: struct virtio_vsock [noder= ef] __rcu * > net/vmw_vsock/virtio_transport.c:73:17: struct virtio_vsock * > net/vmw_vsock/virtio_transport.c:171:17: error: incompatible types in= comparison expression (different address spaces): > net/vmw_vsock/virtio_transport.c:171:17: struct virtio_vsock [node= ref] __rcu * > net/vmw_vsock/virtio_transport.c:171:17: struct virtio_vsock * > net/vmw_vsock/virtio_transport.c:207:17: error: incompatible types in= comparison expression (different address spaces): > net/vmw_vsock/virtio_transport.c:207:17: struct virtio_vsock [node= ref] __rcu * > net/vmw_vsock/virtio_transport.c:207:17: struct virtio_vsock * > net/vmw_vsock/virtio_transport.c:561:13: error: incompatible types in= comparison expression (different address spaces): > net/vmw_vsock/virtio_transport.c:561:13: struct virtio_vsock [node= ref] __rcu * > net/vmw_vsock/virtio_transport.c:561:13: struct virtio_vsock * > net/vmw_vsock/virtio_transport.c:612:9: error: incompatible types in = comparison expression (different address spaces): > net/vmw_vsock/virtio_transport.c:612:9: struct virtio_vsock [noder= ef] __rcu * > net/vmw_vsock/virtio_transport.c:612:9: struct virtio_vsock * > net/vmw_vsock/virtio_transport.c:631:9: error: incompatible types in = comparison expression (different address spaces): > net/vmw_vsock/virtio_transport.c:631:9: struct virtio_vsock [noder= ef] __rcu * > net/vmw_vsock/virtio_transport.c:631:9: struct virtio_vsock * >=20 > Fixes: 0deab087b16a ("vsock/virtio: use RCU to avoid use-after-free on th= e_virtio_vsock") > Reported-by: Michael S. Tsirkin > Signed-off-by: Stefano Garzarella > --- > net/vmw_vsock/virtio_transport.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi --YToU2i3Vx8H2dn7O Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAl8MKUcACgkQnKSrs4Gr c8iLnAf9E+pOReZB1uxaaxHt2z9HjKmxjs6nY1gK0E/aNHGD4C4ZQFpkMMYrgACn mTAJbmWJG/694IDC1i803aGbRKIq0VIyrezJtZWH7e8KTMG77U1YEDUr/T6yTAqf MYrz9ylRKbEHjzAmRQtnQGJ/YtshXFVHISJf6maySSPuHHInz+n/rUlXFxxmrOme x8cvGFTQ71RZUEWpIQxTL2vp4BEob1aIvrrFREvqgR9Xh4W1ZV641dP50QqjkJf9 ebLfHIpb+n9ZrYNa/+WwEZvMhw8r+hWA3giUXEuSwkGZkoi9s5d6WfZYeU7Lcbr7 0VLfCa/y5QsWouWZkkMZ7nLfxrMEsg== =2Mf5 -----END PGP SIGNATURE----- --YToU2i3Vx8H2dn7O--