When rhashtable_init() fails, it returns -EINVAL.
However, since error return value of rhashtable_init is not checked,
it can cause use of uninitialized pointers.
So, fix unhandled errors of rhashtable_init.
The three patches are essentially the same logic.
v1->v2:
- change commit message
- fix possible memory leaks
v2->v3:
- split patch into mlx5e, ipv6, mac80211
v3->v4:
- fix newly created warnings due to patches in net/ipv6/seg6.c
MichelleJin (3):
net/mlx5e: check return value of rhashtable_init
net: ipv6: check return value of rhashtable_init
net: mac80211: check return value of rhashtable_init
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 14 +++++++++++---
net/ipv6/ila/ila_xlat.c | 6 +++++-
net/ipv6/seg6.c | 8 ++++++--
net/ipv6/seg6_hmac.c | 4 +---
net/mac80211/mesh_pathtbl.c | 5 ++++-
5 files changed, 27 insertions(+), 10 deletions(-)
--
2.25.1
When rhashtable_init() fails, it returns -EINVAL.
However, since error return value of rhashtable_init is not checked,
it can cause use of uninitialized pointers.
So, fix unhandled errors of rhashtable_init.
Signed-off-by: MichelleJin <redacted>
---
v1->v2:
- change commit message
- fix unneeded destroying of ht
v2->v3:
- nothing changed
v3->v4:
- nothing changed
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
From: Roi Dayan <hidden> Date: 2021-09-29 11:01:09
On 2021-09-27 6:34 AM, MichelleJin wrote:
quoted hunk
When rhashtable_init() fails, it returns -EINVAL.
However, since error return value of rhashtable_init is not checked,
it can cause use of uninitialized pointers.
So, fix unhandled errors of rhashtable_init.
Signed-off-by: MichelleJin <redacted>
---
v1->v2:
- change commit message
- fix unneeded destroying of ht
v2->v3:
- nothing changed
v3->v4:
- nothing changed
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
When rhashtable_init() fails, it returns -EINVAL.
However, since error return value of rhashtable_init is not checked,
it can cause use of uninitialized pointers.
So, fix unhandled errors of rhashtable_init.
Signed-off-by: MichelleJin <redacted>
---
v1->v2:
- change commit message
- fix possible memory leaks
v2->v3:
- nothing changed
v3->v4:
- fix newly created warnings due to patches
net/ipv6/ila/ila_xlat.c | 6 +++++-
net/ipv6/seg6.c | 8 ++++++--
net/ipv6/seg6_hmac.c | 4 +---
3 files changed, 12 insertions(+), 6 deletions(-)
@@ -610,7 +610,11 @@ int ila_xlat_init_net(struct net *net)if(err)returnerr;-rhashtable_init(&ilan->xlat.rhash_table,&rht_params);+err=rhashtable_init(&ilan->xlat.rhash_table,&rht_params);+if(err){+free_bucket_spinlocks(ilan->xlat.locks);+returnerr;+}return0;}
@@ -405,9 +405,7 @@ int __net_init seg6_hmac_net_init(struct net *net){structseg6_pernet_data*sdata=seg6_pernet(net);-rhashtable_init(&sdata->hmac_infos,&rht_params);--return0;+returnrhashtable_init(&sdata->hmac_infos,&rht_params);}EXPORT_SYMBOL(seg6_hmac_net_init);
From: David Ahern <hidden> Date: 2021-09-27 13:43:22
On 9/26/21 9:34 PM, MichelleJin wrote:
When rhashtable_init() fails, it returns -EINVAL.
However, since error return value of rhashtable_init is not checked,
it can cause use of uninitialized pointers.
So, fix unhandled errors of rhashtable_init.
Signed-off-by: MichelleJin <redacted>
---
When rhashtable_init() fails, it returns -EINVAL.
However, since error return value of rhashtable_init is not checked,
it can cause use of uninitialized pointers.
So, fix unhandled errors of rhashtable_init.
Signed-off-by: MichelleJin <redacted>
---
v1->v2:
- change commit message
- fix possible memory leaks
v2->v3:
- nothing changed
v3-> v4:
- nothing changed
net/mac80211/mesh_pathtbl.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Hello:
This series was applied to netdev/net-next.git (refs/heads/master):
On Mon, 27 Sep 2021 03:34:54 +0000 you wrote:
When rhashtable_init() fails, it returns -EINVAL.
However, since error return value of rhashtable_init is not checked,
it can cause use of uninitialized pointers.
So, fix unhandled errors of rhashtable_init.
The three patches are essentially the same logic.
v1->v2:
- change commit message
- fix possible memory leaks
v2->v3:
- split patch into mlx5e, ipv6, mac80211
v3->v4:
- fix newly created warnings due to patches in net/ipv6/seg6.c
[...]