]> git.baikalelectronics.ru Git - kernel.git/commit
s390/qeth: tolerate pre-filled RX buffer
authorJulian Wiedmann <jwi@linux.ibm.com>
Thu, 30 Jul 2020 15:01:18 +0000 (17:01 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 31 Jul 2020 23:44:35 +0000 (16:44 -0700)
commit0bc7d520765947ed3c0ebe02e04144f4611eb897
treea12758ac0c378210996364775eb5d1a7a90eb3c1
parenta3b39780e1ef7c884247d8e997b4a0b8cd9515f5
s390/qeth: tolerate pre-filled RX buffer

When preparing a buffer for RX refill, tolerate that it already has a
pool_entry attached. Otherwise we could easily leak such a pool_entry
when re-driving the RX refill after an error (from eg. do_qdio()).

This needs some minor adjustment in the code that drains RX buffer(s)
prior to RX refill and during teardown, so that ->pool_entry is NULLed
accordingly.

Fixes: a5a090d6ef88 ("qeth: new qeth device driver")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core_main.c