lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 26 Apr 2015 12:14:00 +0300
From:	Oded Gabbay <oded.gabbay@....com>
To:	<joro@...tes.org>
CC:	<iommu@...ts.linux-foundation.org>, <linux-kernel@...r.kernel.org>,
	<stable@...r.kernel.org>
Subject: Re: [PATCH] iommu/amd: Fix bug in put_pasid_state_wait

Hi Joerg,
Could you please take a look at this patch ?
I want it to be included in stable asap so Fedora 22 will pick it up.

Thanks,
	Oded

On 04/16/2015 05:08 PM, 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.
>
> Signed-off-by: Oded Gabbay <oded.gabbay@....com>
> Cc: stable@...r.kernel.org
> ---
>   drivers/iommu/amd_iommu_v2.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iommu/amd_iommu_v2.c b/drivers/iommu/amd_iommu_v2.c
> index 6d5a5c4..173e70d 100644
> --- a/drivers/iommu/amd_iommu_v2.c
> +++ b/drivers/iommu/amd_iommu_v2.c
> @@ -266,6 +266,7 @@ static void put_pasid_state(struct pasid_state *pasid_state)
>
>   static void put_pasid_state_wait(struct pasid_state *pasid_state)
>   {
> +	atomic_dec(&pasid_state->count);
>   	wait_event(pasid_state->wq, !atomic_read(&pasid_state->count));
>   	free_pasid_state(pasid_state);
>   }
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ