From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751535AbdJXOBs (ORCPT ); Tue, 24 Oct 2017 10:01:48 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:47563 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750897AbdJXOBr (ORCPT ); Tue, 24 Oct 2017 10:01:47 -0400 Subject: Re: [PATCH v5 11/13] xen/pvcalls: implement poll command To: Stefano Stabellini References: <1507336227-20477-1-git-send-email-sstabellini@kernel.org> <1507336227-20477-11-git-send-email-sstabellini@kernel.org> Cc: xen-devel@lists.xen.org, linux-kernel@vger.kernel.org, jgross@suse.com, Stefano Stabellini From: Boris Ostrovsky Message-ID: <92f2c56f-223e-9e47-12eb-6ff0c3d183d1@oracle.com> Date: Tue, 24 Oct 2017 10:02:21 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/23/2017 07:06 PM, Stefano Stabellini wrote: > On Tue, 17 Oct 2017, Boris Ostrovsky wrote: >>> +static unsigned int pvcalls_front_poll_passive(struct file *file, >>> + struct pvcalls_bedata *bedata, >>> + struct sock_mapping *map, >>> + poll_table *wait) >>> +{ >>> + int notify, req_id, ret; >>> + struct xen_pvcalls_request *req; >>> + >>> + if (test_bit(PVCALLS_FLAG_ACCEPT_INFLIGHT, >>> + (void *)&map->passive.flags)) { >>> + uint32_t req_id = READ_ONCE(map->passive.inflight_req_id); >>> + >>> + if (req_id != PVCALLS_INVALID_ID && >>> + READ_ONCE(bedata->rsp[req_id].req_id) == req_id) >>> + return POLLIN | POLLRDNORM; >> >> Same READ_ONCE() question as for an earlier patch. > Same answer :-) Reviewed-by: Boris Ostrovsky > > >>> + >>> + poll_wait(file, &map->passive.inflight_accept_req, wait); >>> + return 0; >>> + } >>> +