Re: [PATCH] net/mlx4_en: do batched put_page using atomic_sub

From: David Miller
Date: Tue Apr 19 2016 - 20:07:19 EST

From: Konstantin Khlebnikov <khlebnikov@xxxxxxxxxxxxxx>
Date: Mon, 18 Apr 2016 14:34:05 +0300

> This patch fixes couple error paths after allocation failures.
> Atomic set of page reference counter is safe only if it is zero,
> otherwise set can race with any speculative get_page_unless_zero.
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@xxxxxxxxxxxxxx>