From: Pankaj Gupta Subject: Re: [PATCH v2 1/2] virtio_console: free unused buffers with port delete Date: Thu, 8 Aug 2019 08:19:24 -0400 (EDT) Message-ID: <1593246032.7424344.1565266764494.JavaMail.zimbra@redhat.com> References: <20190808113606.19504-1-pagupta@redhat.com> <20190808113606.19504-2-pagupta@redhat.com> <20190808115555.GA2015@kroah.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20190808115555.GA2015@kroah.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Greg KH Cc: arnd@arndb.de, mst@redhat.com, amit@kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org List-Id: virtualization@lists.linuxfoundation.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? o.k. will remove the empty lines. > > > > > 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. Sorry! for this. Commit it fixes is: a7a69ec0d8e4 ("virtio_console: free buffers after reset") > > And given that this is from 2.6.39 (and 2.6.38.5), shouldn't it also be > backported for the stable kernels? Yes. Thanks, Pankaj > > thanks, > > greg k-h >