]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_en: do batched put_page using atomic_sub
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Mon, 18 Apr 2016 11:34:05 +0000 (14:34 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Apr 2016 00:04:24 +0000 (20:04 -0400)
commit8e17f1a3276ebec032cb7a960d6706818cb02636
tree33f99b2a2017827402ed7b9215e249867ab56cbd
parenta2e8c5f468e9651582a3226d2680128ba8b21ed7
net/mlx4_en: do batched put_page using atomic_sub

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@yandex-team.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_rx.c