Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752386AbbEDLWF (ORCPT ); Mon, 4 May 2015 07:22:05 -0400 Received: from 8bytes.org ([81.169.241.247]:40040 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751252AbbEDLVz (ORCPT ); Mon, 4 May 2015 07:21:55 -0400 Date: Mon, 4 May 2015 13:21:53 +0200 From: Joerg Roedel To: Oded Gabbay Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] iommu/amd: Fix bug in put_pasid_state_wait Message-ID: <20150504112153.GG15736@8bytes.org> References: <1429193324-20398-1-git-send-email-oded.gabbay@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1429193324-20398-1-git-send-email-oded.gabbay@amd.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 794 Lines: 20 On Thu, Apr 16, 2015 at 05:08:44PM +0300, Oded Gabbay wrote: > This patch fixes a bug in put_pasid_state_wait that appeared in kernel 4.0 > The bug is that pasid_state->count wasn't decremented before entering the > wait_event. Thus, the condition in wait_event will never be true. > > The fix is to decrement (atomically) the pasid_state->count before the > wait_event. Gah! This issue was already pointed out in the original review of the patch, looks like I applied the wrong version. Thanks for the fix, I applied it to iommu/fixes. Joerg -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/