]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Aug 2015 05:23:03 +0000 (22:23 -0700)
commit297c3d0f563e6e5a430f7dcf66f76067e75b6351
treec5b99bd44f94a5e6094869c8da1f0683e0777a02
parent9956a93527336a63bd426d1337f31417ca007b74
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.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/xen-netback/netback.c