Skip to content

Commit

Permalink
s390/bpf: Fix offset parameter for skb_copy_bits()
Browse files Browse the repository at this point in the history
Currently the offset parameter for skb_copy_bits is changed in
sk_load_word() and sk_load_half(). Therefore it is not correct when
calling skb_copy_bits(). Fix this and use the original offset
for the function call.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Michael Holzheu authored and Martin Schwidefsky committed Jan 15, 2015
1 parent db9aa8f commit d86eb74
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/s390/net/bpf_jit.S
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ ENTRY(sk_load_word)

sk_load_word_slow:
lgr %r9,%r2 # save %r2
lgr %r3,%r1 # offset
la %r4,160(%r15) # pointer to temp buffer
lhi %r5,4 # 4 bytes
brasl %r14,skb_copy_bits # get data from skb
Expand All @@ -69,6 +70,7 @@ ENTRY(sk_load_half)

sk_load_half_slow:
lgr %r9,%r2 # save %r2
lgr %r3,%r1 # offset
la %r4,162(%r15) # pointer to temp buffer
lhi %r5,2 # 2 bytes
brasl %r14,skb_copy_bits # get data from skb
Expand Down

0 comments on commit d86eb74

Please sign in to comment.