X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=datapath%2Fdatapath.c;h=b25b8996e0735791ca64b7e6638d5d372678c17d;hb=926ea16ea3b38df0f34cdccdea92aa4933ca9dd4;hp=ebfc2e9941e16a19f15887ad172432eef43e17d4;hpb=513130154d7af9f5b58602aeb00765629479d02e;p=openvswitch diff --git a/datapath/datapath.c b/datapath/datapath.c index ebfc2e99..b25b8996 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -359,7 +359,6 @@ static void copy_and_csum_skb(struct sk_buff *skb, void *to) get_skb_csum_pointers(skb, &csum_start, &csum_offset); csum_start -= skb_headroom(skb); - BUG_ON(csum_start >= skb_headlen(skb)); skb_copy_bits(skb, 0, to, csum_start); @@ -712,13 +711,13 @@ static int odp_packet_cmd_execute(struct sk_buff *skb, struct genl_info *info) else packet->protocol = htons(ETH_P_802_2); + /* Initialize OVS_CB (it came from Netlink so might not be zeroed). */ + memset(OVS_CB(packet), 0, sizeof(struct ovs_skb_cb)); + err = flow_extract(packet, -1, &key, &is_frag); if (err) goto exit; - /* Initialize OVS_CB (it came from Netlink so might not be zeroed). */ - memset(OVS_CB(packet), 0, sizeof(struct ovs_skb_cb)); - rcu_read_lock(); dp = get_dp(odp_header->dp_ifindex); err = -ENODEV;