Unverified Commit b401b887 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!15131 xsk: fix OOB map writes when deleting elements

parents bd6fde5f f9bb61cf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -203,7 +203,7 @@ static int xsk_map_delete_elem(struct bpf_map *map, void *key)
{
	struct xsk_map *m = container_of(map, struct xsk_map, map);
	struct xdp_sock *old_xs;
	int k = *(u32 *)key;
	u32 k = *(u32 *)key;

	if (k >= map->max_entries)
		return -EINVAL;