Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp6763095ybh; Thu, 8 Aug 2019 05:20:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0yCHPc2M+iscL1O6q8nOc2k/a6uNFzCmrZLFc9erNUs7RdlfyJh3jhlgV4v8Br9jE7neb X-Received: by 2002:a17:902:8a94:: with SMTP id p20mr13393080plo.312.1565266845356; Thu, 08 Aug 2019 05:20:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565266845; cv=none; d=google.com; s=arc-20160816; b=GERkJVC0W1znIIqq+7lGfPrLPUnvwPgDEpTcS+rRkahxtZRhu78OVYLzE4qGlGxZPy xrNIy6mZuZmVHKDclw9/5kUy8dnQSdhOJbMhhpXaZrVyHjMgVAUnvdvIY0gs9ozqc9Jo 1T2rRnbGjMHGNGz2hKaOeKGxb7brvN9aT0USSuPxM51IjcKJ90Y0QzWoYEC3fBdJ8nax VOQuU6jHiU4LHkftOtwLhi1No7hpNSCbx2Mkwkd3d0wjuxa88vKBMyXX0uDNP6CryJ/i CarwVlv3JAQurfruTzxAyKykHDH47FIcVBVTOJ4L+CZCM+heQSNUjJFd6UrfVtR9FXLe BjPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date; bh=7HpMb3ZCbMTpb+tDDXNT6+HQ4Xb+bkhvrT1vYoM38vk=; b=TZlf2VlVin5yrcLQhWr/0t01MzLL74pvUmN7o/8sIeVO7xlNSalOJmNw5q0HUDoUeL E3fAFN/V+XVj/XijprEbHrhqox2sfdn+cddX1GZk6SJPFXQNiWVmud/BC0fJQUeJvXDv j2qtY7e5N9ejuGRnAY9iK2l17SGJMv+UaQP3EVisMS3cb2UZ3l5j37JnwX3DNhx+Xe0S x9/w1NGR7nAXM26pFFgjgnLywHx3qS36M/Jr91whmLNq+VR4Tz336K04BM0BVHpWasgA kK9LbFR7/sRbo2oKMwDQIMVfB9pIHS+LYn+e2p7MESHNX3wnSXJwg+i5UShY96Y1FXnn ascQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q3si56385213pgs.576.2019.08.08.05.20.29; Thu, 08 Aug 2019 05:20:45 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732344AbfHHMTZ (ORCPT + 99 others); Thu, 8 Aug 2019 08:19:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48468 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731788AbfHHMTZ (ORCPT ); Thu, 8 Aug 2019 08:19:25 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3C4F27E426; Thu, 8 Aug 2019 12:19:25 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2B9321001284; Thu, 8 Aug 2019 12:19:25 +0000 (UTC) Received: from zmail21.collab.prod.int.phx2.redhat.com (zmail21.collab.prod.int.phx2.redhat.com [10.5.83.24]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 08FA618089C8; Thu, 8 Aug 2019 12:19:25 +0000 (UTC) Date: Thu, 8 Aug 2019 08:19:24 -0400 (EDT) From: Pankaj Gupta To: Greg KH Cc: amit@kernel.org, mst@redhat.com, arnd@arndb.de, virtualization@lists.linux-foundation.org, jasowang@redhat.com, linux-kernel@vger.kernel.org Message-ID: <1593246032.7424344.1565266764494.JavaMail.zimbra@redhat.com> In-Reply-To: <20190808115555.GA2015@kroah.com> References: <20190808113606.19504-1-pagupta@redhat.com> <20190808113606.19504-2-pagupta@redhat.com> <20190808115555.GA2015@kroah.com> Subject: Re: [PATCH v2 1/2] virtio_console: free unused buffers with port delete MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.116.132, 10.4.195.30] Thread-Topic: virtio_console: free unused buffers with port delete Thread-Index: 3j1KCI3vfTqn3wC0i4fDgfcUSG+LwQ== X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 08 Aug 2019 12:19:25 +0000 (UTC) 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? 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 >