Received: by 10.223.176.5 with SMTP id f5csp168685wra; Thu, 1 Feb 2018 17:48:13 -0800 (PST) X-Google-Smtp-Source: AH8x226xqTCoIgsuzxipnSsFVm/JCYZxBBa2pgrjKuFfwdP8IdhhYNDDGVKP1aQs80juL94+fCwY X-Received: by 10.98.32.151 with SMTP id m23mr39053509pfj.182.1517536093601; Thu, 01 Feb 2018 17:48:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517536093; cv=none; d=google.com; s=arc-20160816; b=By+wKI+Rjsh9MTuXmZBLSORnYQhhUtqZPaHsyWn15foGJmMqabqD3k0sGBWF+T2lj3 MJytFkYgU/i6igUZsbGzt6uTHm4gdw7Z9uPtRnGMiq/vUqad13A92T86CKAvTKMwVTyE GG6WXC9xTHPo1MKcWVLynu+yX43Pf8eTO+J4brTzD8ffNcPLXgfUWeC6yI0NgPuLtTFY 4Hy60YCMW4TQtL6YPZMHBwK7LEmciwKz+FUElJmG/d6M5IFCC+pYVkkDKd0vlap3iZlE Oz02MQ3aMC4Zwar6Vw5y9khQU2Rd5i7aMiqiULPWa+55LWEMgq48XVmVhu0Xj2GKFEMc EuCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :arc-authentication-results; bh=7KuTsE8x46TWyoorMt5QarAK+5gJ0s+DJ98n8PwOc4c=; b=qLpbrtdzmk9c1P+sJlLQv5cbGem1iLXNs2/ZXk5ln139GUWwhzt42uaZZQ6fFaFdag DKl0Xi10kP0lgjDwcooVXHN8Z/FKg/YKN/8YyW0CnvMk8pJ3ATcq33kLgcNOITFYbYhC rvFUq9Q/Hk4n60oCFv0RWiD2MRjL5yTw1bhIkI9584gRx471y06PL6viMdbsfO3c6pCZ Ea6oAcz5bMtnTOMoVa2kfzAMo4mLHlpxU2ZliSpOV6PW5t1kKaju0qde/fgon3e7JXT+ fnsMPn460sa9cSPTjj3OWpeZK0arhI80ozy9di6S0hxY5AgArT/wYtvzSptUNQoj3UVy DfPw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m26si598755pgc.375.2018.02.01.17.47.58; Thu, 01 Feb 2018 17:48:13 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752736AbeBBBqW convert rfc822-to-8bit (ORCPT + 99 others); Thu, 1 Feb 2018 20:46:22 -0500 Received: from mail1.windriver.com ([147.11.146.13]:34239 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752478AbeBBBqO (ORCPT ); Thu, 1 Feb 2018 20:46:14 -0500 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail1.windriver.com (8.15.2/8.15.1) with ESMTPS id w121k38O026169 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Thu, 1 Feb 2018 17:46:03 -0800 (PST) Received: from ALA-MBC.corp.ad.wrs.com ([169.254.1.48]) by ALA-HCA.corp.ad.wrs.com ([147.11.189.40]) with mapi id 14.03.0361.001; Thu, 1 Feb 2018 17:46:01 -0800 From: "Yoshida, Shigeru" To: "stern@rowland.harvard.edu" CC: "Bai, Haiqing" , "gregkh@linuxfoundation.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] ohci-hcd: Fix race condition caused by ohci_urb_enqueue() and io_watchdog_func() Thread-Topic: [PATCH] ohci-hcd: Fix race condition caused by ohci_urb_enqueue() and io_watchdog_func() Thread-Index: AQHTmncRqxjtZV1slkO7r5QpQNTFa6OOqw2AgADm5YCAAKNFgIAAq14A Date: Fri, 2 Feb 2018 01:46:01 +0000 Message-ID: <20180202.104654.1854598770724026730.shigeru.yoshida@windriver.com> References: <20180201.144911.2171407625301691891.shigeru.yoshida@windriver.com> In-Reply-To: Accept-Language: ja-JP, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [128.224.232.213] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Alan, On Thu, 1 Feb 2018 10:33:33 -0500, Alan Stern wrote: >> I think we must choose an invalid frame number for the special >> sentinel value, but I'm not sure which value is adequate for it. >> Is 0xffffff00 an invalid frame number, otherwise how about simply >> -1(0xffffffff)? > > Well, the frame_no register is 32 bits wide, but only the 16 low-order > bits are meaningful. ohci_frame_no() strips off the high-order 16 > bits, so any value with one of those bits set would be acceptable. > (Besides, valid frame numbers only go up to 2047.) > > I chose 0xffffff00 because PCI reads from a non-working device > generally get a value with all the bits set. But since the upper 16 > bits are masked away anyhow, it doesn't matter. -1u would be fine. Thanks, I choose 0xffffff00 as you suggested, and will prepare v2 patch. Thanks, Shigeru