page_pool: make sure struct device is stable
authorJesper Dangaard Brouer <brouer@redhat.com>
Tue, 18 Jun 2019 13:06:08 +0000 (15:06 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Jun 2019 15:23:13 +0000 (11:23 -0400)
commitf71fec47c2df704c7081f946d7e46fe036a4208b
tree31644496760e3272d55f8248ef49eed16c32ec1d
parent32c28f7e413981c7dd4a3ad9bbb1151e4b654261
page_pool: make sure struct device is stable

For DMA mapping use-case the page_pool keeps a pointer
to the struct device, which is used in DMA map/unmap calls.

For our in-flight handling, we also need to make sure that
the struct device have not disappeared.  This is assured
via using get_device/put_device API.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Reported-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/page_pool.c