]> www.infradead.org Git - users/jedix/linux-maple.git/commit
act_ife: fix a potential use-after-free
authorCong Wang <xiyou.wangcong@gmail.com>
Mon, 3 Sep 2018 18:08:15 +0000 (11:08 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Sep 2018 07:45:24 +0000 (09:45 +0200)
commita08d7ea10bc7df3b0177d7de2aab3805899fb8fd
treeee8e4a3f554b3fce8b18b1a561241f7c43e80562
parent7fe7a0f4c5cf9e7f5b7cb67c1341cdbf62ed4c30
act_ife: fix a potential use-after-free

[ Upstream commit 6d784f1625ea68783cc1fb17de8f6cd3e1660c3f ]

Immediately after module_put(), user could delete this
module, so e->ops could be already freed before we call
e->ops->release().

Fix this by moving module_put() after ops->release().

Fixes: ef6980b6becb ("introduce IFE action")
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sched/act_ife.c