Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752603AbcDZPWD (ORCPT ); Tue, 26 Apr 2016 11:22:03 -0400 Received: from mail-yw0-f169.google.com ([209.85.161.169]:34643 "EHLO mail-yw0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751840AbcDZPV7 (ORCPT ); Tue, 26 Apr 2016 11:21:59 -0400 Date: Tue, 26 Apr 2016 11:21:56 -0400 From: Tejun Heo To: Roman Pen Cc: Gioh Kim , Michael Wang , Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH 1/1] workqueue: fix ghost PENDING flag while doing MQ IO Message-ID: <20160426152156.GL7822@mtj.duckdns.org> References: <1461669335-19522-1-git-send-email-roman.penyaev@profitbricks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1461669335-19522-1-git-send-email-roman.penyaev@profitbricks.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 512 Lines: 18 Hello, On Tue, Apr 26, 2016 at 01:15:35PM +0200, Roman Pen wrote: ... > This behaviour can be explained by speculative LOAD of hctx->ctx_map on > CPU#0, which is reordered with clear of PENDING bit and executed _before_ > actual STORE of bit 1 on CPU#1. > > The proper fix is an explicit full barrier , which guarantees > that clear of PENDING bit is to be executed before all possible > speculative LOADS or STORES inside actual work function. Applied to workqueue/for-4.6-fixes. Thanks. -- tejun