]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen-netback: Allocate fraglist early to avoid complex rollback
authorRoss Lagerwall <ross.lagerwall@citrix.com>
Mon, 3 Aug 2015 14:38:03 +0000 (15:38 +0100)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Tue, 6 Oct 2015 16:13:57 +0000 (09:13 -0700)
commitd91305d64dcf59d9a9ef73b51776dc6b486a662a
tree5caa30ea3700a28ac63eee92dab0d010e8d6cde0
parent08d637e5c6bdf00db072ed3621ee437e26649307
xen-netback: Allocate fraglist early to avoid complex rollback

Determine if a fraglist is needed in the tx path, and allocate it if
necessary before setting up the copy and map operations.
Otherwise, undoing the copy and map operations is tricky.

This fixes a use-after-free: if allocating the fraglist failed, the copy
and map operations that had been set up were still executed, writing
over the data area of a freed skb.

Acked-by: Konrad Rzeszutek Wilk <Konrad.wilk@oracle>
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 2475b22526d70234ecfe4a1ff88aed69badefba9)
Signed-off-by: Annie Li <annie.li@oracle.com>
drivers/net/xen-netback/netback.c