summaryrefslogtreecommitdiff
path: root/net/netfilter
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-02-17 20:16:34 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2017-04-02 12:10:57 -0400
commit3278682123811dd8ef07de5eb701fc4548fcebf2 (patch)
treef455af5923c286b055f8b2577f66b624a911855b /net/netfilter
parent27c0e3748e41ca79171ffa3e97415a20af6facd0 (diff)
make skb_copy_datagram_msg() et.al. preserve ->msg_iter on error
Fixes the mess observed in e.g. rsync over a noisy link we'd been seeing since last Summer. What happens is that we copy part of a datagram before noticing a checksum mismatch. Datagram will be resent, all right, but we want the next try go into the same place, not after it... All this family of primitives (copy/checksum and copy a datagram into destination) is "all or nothing" sort of interface - either we get 0 (meaning that copy had been successful) or we get an error (and no way to tell how much had been copied before we ran into whatever error it had been). Make all of them leave iterator unadvanced in case of errors - all callers must be able to cope with that (an error might've been caught before the iterator had been advanced), it costs very little to arrange, it's safer for callers and actually fixes at least one bug in said callers. Cc: stable@vger.kernel.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net/netfilter')
0 files changed, 0 insertions, 0 deletions