diff options
| author | Jesse Gross <jesse@nicira.com> | 2011-02-07 13:05:34 -0800 |
|---|---|---|
| committer | Jesse Gross <jesse@nicira.com> | 2011-02-07 13:47:34 -0800 |
| commit | a992ec0b06bfddc4e8c2a50d79362b3dfb286dd5 (patch) | |
| tree | 6b68031b9c85c0ce80011ad144405e5fb9fb6115 /datapath | |
| parent | 78a04c9fc2b426231f3aedf8961491b238fc78bb (diff) | |
| download | openvswitch-a992ec0b06bfddc4e8c2a50d79362b3dfb286dd5.tar.gz | |
tunneling: Check refcount of each page in frags.
We check the refcount of each page in a fragmented skb
to see if we need to do a linearize before computing the
checksum. However, although we iterate over the list of
pages, we always check the first one.
Reported-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'datapath')
| -rw-r--r-- | datapath/tunnel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/datapath/tunnel.c b/datapath/tunnel.c index 40577fbd5..95492f76f 100644 --- a/datapath/tunnel.c +++ b/datapath/tunnel.c @@ -1021,7 +1021,7 @@ static inline bool need_linearize(const struct sk_buff *skb) * change them from underneath us and we can skip the linearization. */ for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) - if (unlikely(page_count(skb_shinfo(skb)->frags[0].page) > 1)) + if (unlikely(page_count(skb_shinfo(skb)->frags[i].page) > 1)) return true; return false; |
