mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 11:54:14 -04:00
net: rtnetlink: fix module reference count leak issue in rtnetlink_rcv_msg
commit 5b22f62724a0a09e00d301abf5b57b0c12be8a16 upstream.
When bulk delete command is received in the rtnetlink_rcv_msg function,
if bulk delete is not supported, module_put is not called to release
the reference counting. As a result, module reference count is leaked.
Fixes: a6cec0bcd342 ("net: rtnetlink: add bulk delete support flag")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://lore.kernel.org/r/20220815024629.240367-1-shaozhengchao@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7d993371c1
commit
283ee8ce3b
1 changed files with 1 additions and 0 deletions
|
|
@ -5304,6 +5304,7 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh,
|
|||
if (kind == RTNL_KIND_DEL && (nlh->nlmsg_flags & NLM_F_BULK) &&
|
||||
!(flags & RTNL_FLAG_BULK_DEL_SUPPORTED)) {
|
||||
NL_SET_ERR_MSG(extack, "Bulk delete is not supported");
|
||||
module_put(owner);
|
||||
goto err_unlock;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue