]> git.baikalelectronics.ru Git - kernel.git/commit
xen-netback: Fix releasing header slot on error path
authorZoltan Kiss <zoltan.kiss@citrix.com>
Fri, 18 Jul 2014 18:08:04 +0000 (19:08 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Jul 2014 03:56:06 +0000 (20:56 -0700)
commitf890bd5b34e8fa3a04c7699599c6914c4eb33cf5
treeefca7ccb372aa5ecf5774f06d3abe92af888dfce
parentcc6e2192113a9ba4d669eb1794dfd999dbc0660f
xen-netback: Fix releasing header slot on error path

This patch makes this function aware that the first frag and the header might
share the same ring slot. That could happen if the first slot is bigger than
PKT_PROT_LEN. Due to this the error path might release that slot twice or never,
depending on the error scenario.
xenvif_idx_release is also removed from xenvif_idx_unmap, and called separately.

Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com>
Reported-by: Armin Zentai <armin.zentai@ezit.hu>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: xen-devel@lists.xenproject.org
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/xen-netback/netback.c