android_kernel_xiaomi_sm8350/net/sunrpc/auth_gss
David S. Miller 51c739d1f4 [NET]: Fix incorrect sg_mark_end() calls.
This fixes scatterlist corruptions added by

	commit 68e3f5dd4d
	[CRYPTO] users: Fix up scatterlist conversion errors

The issue is that the code calls sg_mark_end() which clobbers the
sg_page() pointer of the final scatterlist entry.

The first part fo the fix makes skb_to_sgvec() do __sg_mark_end().

After considering all skb_to_sgvec() call sites the most correct
solution is to call __sg_mark_end() in skb_to_sgvec() since that is
what all of the callers would end up doing anyways.

I suspect this might have fixed some problems in virtio_net which is
the sole non-crypto user of skb_to_sgvec().

Other similar sg_mark_end() cases were converted over to
__sg_mark_end() as well.

Arguably sg_mark_end() is a poorly named function because it doesn't
just "mark", it clears out the page pointer as a side effect, which is
what led to these bugs in the first place.

The one remaining plain sg_mark_end() call is in scsi_alloc_sgtable()
and arguably it could be converted to __sg_mark_end() if only so that
we can delete this confusing interface from linux/scatterlist.h

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-30 21:29:29 -07:00
..
auth_gss.c SUNRPC: Don't call gss_delete_sec_context() from an rcu context 2007-08-07 15:16:24 -04:00
gss_generic_token.c
gss_krb5_crypto.c [NET]: Fix incorrect sg_mark_end() calls. 2007-10-30 21:29:29 -07:00
gss_krb5_mech.c knfsd: rpc: add gss krb5 and spkm3 oid values 2007-07-17 10:23:08 -07:00
gss_krb5_seal.c
gss_krb5_seqnum.c
gss_krb5_unseal.c
gss_krb5_wrap.c SUNRPC: Use correct type in buffer length calculations 2007-10-09 17:20:30 -04:00
gss_mech_switch.c knfsd: nfsd4: store pseudoflavor in request 2007-07-17 10:23:07 -07:00
gss_spkm3_mech.c knfsd: rpc: add gss krb5 and spkm3 oid values 2007-07-17 10:23:08 -07:00
gss_spkm3_seal.c [CRYPTO] users: Fix up scatterlist conversion errors 2007-10-27 00:52:07 -07:00
gss_spkm3_token.c
gss_spkm3_unseal.c
Makefile
svcauth_gss.c svcgss: move init code into separate function 2007-10-09 18:31:57 -04:00