Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp6735846ybh; Thu, 8 Aug 2019 04:57:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzKhNBgQzWQV9GlipylYzqJyjOlKUyhpHqgP9+pjuQOWolq1Z40fuT6CEKVlDsfZv3uoCSm X-Received: by 2002:a17:902:fe14:: with SMTP id g20mr12588740plj.54.1565265440174; Thu, 08 Aug 2019 04:57:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565265440; cv=none; d=google.com; s=arc-20160816; b=ZWnih4OsFW//G6E+auNH4Kf53ULZyq4hnE+8nkomCSH/opE4WTTDc2F39D6jkQCwK6 tE/i6eu59Knk7cg3hdN2uAn5lJaWM0RmktHD5s7hWLel7QIwoyuSIMvTimki/L9mHM6h KCIgdQEoBQxT42S6IkXnYcxHFBclMN42DzQ7nMhkV72fjGgSyJ/6yQo/Nklb6awKkMYZ /RygpuW8eW8Uz6AY3BhhMPD/BkY7FogFt1aOKiAbvkIZtgpR6ydhZRa3fOhOfrFuRWh/ ZvHqHTfrd6+RDAVMVmU4lVdyNO2fFA2vLpVkX0aUqhkzEyacUmjH6ZGJGsEF3ulYxvAJ rmdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4plqqQxQwP5o6oMheAmlSu6oSjWcUR8wyOOdT68Nu/A=; b=NS+Zm/IgJrpuqsWoM6krMooehSaV6L6zX9JBO9dQP9AVHoaxh4NvgrNWySjL5PdU/C nPwZ4WEk2EpDdwkrYJgjGViUcU63zw7qKbFIa/C5xgupfbf8JRfpCREU84pRr4XdQdN9 yP0xuuK4jcp8NtDYNLF2uqJx06rRTb8HsTmvAFn4/5ezL9b/K4omGUk3YHeFpmFKk6jc 6WsTPjO30K1IJKCwBRSgQxg7EmwTKxrD+4AdJIk6Wdu/7hg2DoSZRbUoFTNVeiCk95h9 pbxw/yX4acMOuWUJ95/6KGW3qQU7IdM9shs6YIWTB9RvU0yltXuud1we+KTt4drF/duL sZMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vVd2ZiaI; 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 ck13si1751471pjb.47.2019.08.08.04.57.03; Thu, 08 Aug 2019 04:57:20 -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; dkim=pass header.i=@kernel.org header.s=default header.b=vVd2ZiaI; 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 S1729112AbfHHLz7 (ORCPT + 99 others); Thu, 8 Aug 2019 07:55:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:55406 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726721AbfHHLz6 (ORCPT ); Thu, 8 Aug 2019 07:55:58 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 DE75921874; Thu, 8 Aug 2019 11:55:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565265358; bh=DSDFumAChuko83ZMojcrTL89RmjY+E6uL9obeAU7zCg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vVd2ZiaIf8AhF6R///cyKDe311FLAG7VrSH5UqsFnighSJFP88+QuiDBXUo/gqwmU WlXP7lVGaHwO2Lnd9CJ5DBWKs9XnS07Jkka55lHEB5X15uHP1zCCUGI2w3kD74fuoP TMzBOl3/GM2mMi7cbKgkVuZ8GPQ6BI3vatDP7ahM= Date: Thu, 8 Aug 2019 13:55:55 +0200 From: Greg KH To: Pankaj Gupta Cc: amit@kernel.org, mst@redhat.com, arnd@arndb.de, virtualization@lists.linux-foundation.org, jasowang@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] virtio_console: free unused buffers with port delete Message-ID: <20190808115555.GA2015@kroah.com> References: <20190808113606.19504-1-pagupta@redhat.com> <20190808113606.19504-2-pagupta@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190808113606.19504-2-pagupta@redhat.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 08, 2019 at 05:06:05PM +0530, Pankaj Gupta wrote: > The commit a7a69ec0d8e4 ("virtio_console: free buffers after reset") > deferred detaching of unused buffer to virtio device unplug time. > > This causes unplug/replug of single port in virtio device with an > error "Error allocating inbufs\n". As we don't free the unused buffers > attached with the port. Re-plug the same port tries to allocate new > buffers in virtqueue and results in this error if queue is full. > > This patch removes the unused buffers in vq's when we unplug the port. > This is the best we can do as we cannot call device_reset because virtio > device is still active. Why is this indented? > > Reported-by: Xiaohui Li > Fixes: b3258ff1d6 ("virtio_console: free buffers after reset") Fixes: b3258ff1d608 ("virtio: Decrement avail idx on buffer detach") is the correct format to use. And given that this is from 2.6.39 (and 2.6.38.5), shouldn't it also be backported for the stable kernels? thanks, greg k-h