Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e96e0ede authored by jbaron@akamai.com's avatar jbaron@akamai.com Committed by David S. Miller
Browse files

bnx2x: free the mac filter group list before freeing the cmd



The group list must be freed prior to freeing the command otherwise
we have a use-after-free.

Signed-off-by: default avatarJason Baron <jbaron@akamai.com>
Cc: Yuval Mintz <Yuval.Mintz@qlogic.com>
Cc: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 44675a6d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2714,8 +2714,8 @@ static int bnx2x_mcast_enqueue_cmd(struct bnx2x *bp,
			elem_group = (struct bnx2x_mcast_elem_group *)
				     __get_free_page(GFP_ATOMIC | __GFP_ZERO);
			if (!elem_group) {
				kfree(new_cmd);
				bnx2x_free_groups(&new_cmd->group_head);
				kfree(new_cmd);
				return -ENOMEM;
			}
			total_elems -= MCAST_MAC_ELEMS_PER_PG;