Received: by 10.192.165.148 with SMTP id m20csp4168182imm; Mon, 30 Apr 2018 13:04:32 -0700 (PDT) X-Google-Smtp-Source: AB8JxZplHfaoeHGHDWLk2DMQUhE8Lrc9IGpXj8mbhEaiYeGG8hAhlHpTDwKwyO7SqYrr6OVtT6sk X-Received: by 2002:a65:5686:: with SMTP id v6-v6mr10624143pgs.92.1525118672368; Mon, 30 Apr 2018 13:04:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525118672; cv=none; d=google.com; s=arc-20160816; b=DbXPVASqyAmr+7e3Cb+BFxs78B7Q2jpiAW5zVa6GcQcK3CyEbFlx1NV5SklgLn5IoO Wj5nlG9bhEMU0C2B06FRQ7wvj71ckpIqVFfbe7Twl5hJXk1cAvW/zwYo3KKEVkzwDGIE +RY+0h4lFO8/W0akIlN1OWOf8bkSg1w7QJwSNv5sIOM9KIYwj17EfxvhI50U8+adx1lY KgpkWR+8V6ANW2octeRHRWWEbIXNscrsgy8AsMOraYjvK+eNWlLVvOpS0tF3vekuHXOY sQO5i7cu2m8SrJ1aTWam1bWZgVFRsWK9XJrZDXkM+CKuX3q42aPZyiVd+R/LcXIPlJcb Jyog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dmarc-filter :arc-authentication-results; bh=350XmWaJxIuYHoVR8mhvd1gPgkcs3cdb0Imf9OWn8yw=; b=Og2sAMWi7yAWYoP+0tgSy9a/geDW9FsypBYZ922YqIZK+F9U7lA2U0M1tq9R7Rr876 zpO2JgQ7aQd3ND99+O4lqzGf8hoJ6xCHBv3cckGYZYcZmy9/i6qrkiPm+aaWiR/vE3Q9 T1z25F2gw4YJTwsfHLuMRgZk2/XtTwu2WyduM1DOm4JalTLznRJTlrtyHtqicJEstJjZ WGebcq7HF9+diDTguEKKhgxhwmDnVz6wOu0e6mom0V2Fn7qUZQmc0pi8AziRZcOXUZak Cbyn1HIhItkG9nUgp4v0IZMoX3TADftiE6200GJLgHnIONsd0eqY/+ODLt6OJ9bks5SX YaGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g13-v6si6507362pgq.670.2018.04.30.13.03.47; Mon, 30 Apr 2018 13:04:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756084AbeD3UDa (ORCPT + 99 others); Mon, 30 Apr 2018 16:03:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:34216 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932204AbeD3T1e (ORCPT ); Mon, 30 Apr 2018 15:27:34 -0400 Received: from localhost (unknown [104.132.1.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1ABD322E01; Mon, 30 Apr 2018 19:27:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1ABD322E01 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Michael S. Tsirkin" Subject: [PATCH 4.14 25/91] virtio_console: drop custom control queue cleanup Date: Mon, 30 Apr 2018 12:24:07 -0700 Message-Id: <20180430184005.502437854@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180430184004.216234025@linuxfoundation.org> References: <20180430184004.216234025@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Michael S. Tsirkin commit 61a8950c5c5708cf2068b29ffde94e454e528208 upstream. We now cleanup all VQs on device removal - no need to handle the control VQ specially. Cc: stable@vger.kernel.org Signed-off-by: Michael S. Tsirkin Signed-off-by: Greg Kroah-Hartman --- drivers/char/virtio_console.c | 17 ----------------- 1 file changed, 17 deletions(-) --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -1988,21 +1988,6 @@ static void remove_vqs(struct ports_devi kfree(portdev->out_vqs); } -static void remove_controlq_data(struct ports_device *portdev) -{ - struct port_buffer *buf; - unsigned int len; - - if (!use_multiport(portdev)) - return; - - while ((buf = virtqueue_get_buf(portdev->c_ivq, &len))) - free_buf(buf, true); - - while ((buf = virtqueue_detach_unused_buf(portdev->c_ivq))) - free_buf(buf, true); -} - /* * Once we're further in boot, we get probed like any other virtio * device. @@ -2163,7 +2148,6 @@ static void virtcons_remove(struct virti * have to just stop using the port, as the vqs are going * away. */ - remove_controlq_data(portdev); remove_vqs(portdev); kfree(portdev); } @@ -2208,7 +2192,6 @@ static int virtcons_freeze(struct virtio */ if (use_multiport(portdev)) virtqueue_disable_cb(portdev->c_ivq); - remove_controlq_data(portdev); list_for_each_entry(port, &portdev->ports, list) { virtqueue_disable_cb(port->in_vq);