]> git.baikalelectronics.ru Git - kernel.git/commit
gtp: fix wrong condition in gtp_genl_dump_pdp()
authorTaehee Yoo <ap420073@gmail.com>
Wed, 11 Dec 2019 08:23:17 +0000 (08:23 +0000)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Sun, 15 Dec 2019 01:15:24 +0000 (17:15 -0800)
commit9e2543cbc5db64a192de838c1a4108b9b5b73623
tree71d3e066f9358d16af7d3231dcb45e8214e67879
parent1435d3f67a6a0297a7450303071dc119c8a2a8e7
gtp: fix wrong condition in gtp_genl_dump_pdp()

gtp_genl_dump_pdp() is ->dumpit() callback of GTP module and it is used
to dump pdp contexts. it would be re-executed because of dump packet size.

If dump packet size is too big, it saves current dump pointer
(gtp interface pointer, bucket, TID value) then it restarts dump from
last pointer.
Current GTP code allows adding zero TID pdp context but dump code
ignores zero TID value. So, last dump pointer will not be found.

In addition, this patch adds missing rcu_read_lock() in
gtp_genl_dump_pdp().

Fixes: 72e354c774b1 ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
drivers/net/gtp.c