Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp459587pxb; Thu, 5 Nov 2020 04:54:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJyBUBsbCvBaNsF4s4U6o9M/yCv7z8SgVfWUgf0gVVcQB/jrzKhB4gHVtsKHhVjx+/3AqaI3 X-Received: by 2002:a17:906:7096:: with SMTP id b22mr2235450ejk.335.1604580878951; Thu, 05 Nov 2020 04:54:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604580878; cv=none; d=google.com; s=arc-20160816; b=KCVo3GF+WghyB65L+hxOt3QrI11lTg5symdgSI9jr6PUGPJbMO0btMsjX3HWuC3nNp RYN1oc09bOEXW7n9Bo1GtU5FNkFOsftcg/pI91TPK4LvikHGlvHX2zfCgoapgBADjBST wX+KyqiL3Y3ASwQ8cH3qG4AkAve9kXHP7CGQbh7AoyWCXbjjZP/Yiv3F/eRN/EbaOo2h RLMsLUaU/Xhh90u19HHpOv2Fo6isyXKmbv/Hrko/KJlg0T1hq8KHsECkI4V7z1DULyPK 5tNwh7jY8TVLfQxI2ArNmAxiMlJNWgk0cjzie2c9OSxT0aRgtpimTI8cEYDmXx4Mx/en B2Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=21tQgACA2MlFk2eFW9R6MtzILXqxGUisi7N1EoyxkIQ=; b=mJeKwvguSpr7f07TF28XQhBPY8BAXDb057Tsg4wOsxqeYVPa7wXombe7hIFSCdHyyj zTm9z6RzytXABr+p1aY1mzq/L5BbAxVBukJNTeCoAjanK1ucrHqxsYSorwcckkMJYRVG EkYDSQ7T+mNJ1I0OAzmpIUUQeIG2uQivuqHki+A0INRgj0adrt4HspX/FtsIfs0LNVIP VxohYEJUJmFnBj4wtxWP/HgZnAiV8oAUPhqjDN/LMdhifplt4reYqjS0oe/tFwWIW6ZY BC8fv6PuZ63hU2g92xl3FNZtQbUXau+JjbiFW3a7AVIwG107zuh4KizCq03SIqc05s+L Cl/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=K96680qm; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k6si1079198eds.482.2020.11.05.04.54.15; Thu, 05 Nov 2020 04:54:38 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=K96680qm; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730139AbgKEMvw (ORCPT + 99 others); Thu, 5 Nov 2020 07:51:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726874AbgKEMvw (ORCPT ); Thu, 5 Nov 2020 07:51:52 -0500 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0233CC0613CF; Thu, 5 Nov 2020 04:51:52 -0800 (PST) Received: by mail-wm1-x343.google.com with SMTP id 23so1055832wmg.1; Thu, 05 Nov 2020 04:51:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=21tQgACA2MlFk2eFW9R6MtzILXqxGUisi7N1EoyxkIQ=; b=K96680qm4O/M6l+aWKJNu+ZJ9qiYiGvXmUdXeJkmlO2Ypsq397j9+hLmeE0HhwoONS dR+e7K8bHhd9afInT0CPDgOW+WnhQxVnFL0efmyUhKjIlVSqseq6hVvzqHbYnB28Lj2S hf0xmtmx5YH6ZjfPifKQug+eC+kPnb/jroq06bCjGxg7dFRzEqUvwL2ez4feO27xnWlH 58cMnHokwJSCKZQ9nr6t7unOXpHYPXlPDx5OF2w8Oav0V2bZYDKa5KCEo1oRHrZGD6AI zyIMHjVtjrok2SUZgYcOyYvyTSB+9b/kmLPVXjAswpaSIl8DDzwuvWXFdFsKJbpGqvBD ZjEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=21tQgACA2MlFk2eFW9R6MtzILXqxGUisi7N1EoyxkIQ=; b=j2/Jwq/tTK3f7WgxS3BvQvWvRzDTvahqlUeqxZSFEGYitTJXcCPbWzrKTQqtxZhwwZ MyqfAi5cyjgBqmfnYARhfmjIxpZ8hrU8FxPjYygoskpQ27mHE7p2LyHdkKfOtprBlfrW dsuEs1rNb+vFUqaitPbJ/VntKuzGevjmbs6vs/uEFdho4/lV/bf+9p7ZYX74nn9v9BR2 J8HXp38vhhQ1RxH+gMYcXqZJGtMKfQ1dvF0xIQkCQOBVKUpNF5Ad0NOgNAJb/NMCXL8u ZQNkOL+CC6s7BtxDK58OUFW3AZcRRgQbkPevHcFHg3gwDNwsmJShP/G62hjXXNMrBoHb /OrA== X-Gm-Message-State: AOAM531KByDjzxdyHzwAz4rnB2j8JV44sZzlfgCgx2Qtw0CTkkSfo8Sa 4+ldtUQrh/jJWAtGuNindnYuYYZWtUn8FYcI X-Received: by 2002:a1c:1f05:: with SMTP id f5mr2505758wmf.98.1604580710395; Thu, 05 Nov 2020 04:51:50 -0800 (PST) Received: from andrea (host-87-7-71-164.retail.telecomitalia.it. [87.7.71.164]) by smtp.gmail.com with ESMTPSA id l16sm2373963wrx.5.2020.11.05.04.51.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2020 04:51:49 -0800 (PST) Date: Thu, 5 Nov 2020 13:51:41 +0100 From: Andrea Parri To: linux-kernel@vger.kernel.org Cc: "K . Y . Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , linux-hyperv@vger.kernel.org, Andres Beltran , Michael Kelley , Saruhan Karademir , Juan Vazquez , Dan Carpenter , lkp@intel.com Subject: Re: [PATCH v8 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening Message-ID: <20201105125141.GA353914@andrea> References: <20201104154027.319432-1-parri.andrea@gmail.com> <20201104154027.319432-2-parri.andrea@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201104154027.319432-2-parri.andrea@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > @@ -300,6 +303,22 @@ int hv_ringbuffer_write(struct vmbus_channel *channel, > kv_list[i].iov_len); > } > > + /* > + * Allocate the request ID after the data has been copied into the > + * ring buffer. Once this request ID is allocated, the completion > + * path could find the data and free it. > + */ > + > + if (desc->flags == VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED) { > + rqst_id = vmbus_next_request_id(&channel->requestor, requestid); > + if (rqst_id == VMBUS_RQST_ERROR) { > + pr_err("No request id available\n"); > + return -EAGAIN; FYI, the lkp kernel test robot reported a missing call to spin_unlock_irqrestore(&outring_info->ring_lock, flags) before the above 'return': I'll address this in the next submission. Andrea