]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Jul 2014 15:08:26 +0000 (08:08 -0700)
commit4500fc0ec693850ce8cd6ae505cbffcc73f91786
treea02a99f16395d4809aeb793ad5481aa37d0307d9
parent50b771050668d2df87f9f5488d860e9696a0a5fc
xen-netback: Fix releasing header slot on error path

[ Upstream commit 1b860da0404a76af8533099ffe0a965490939369 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/xen-netback/netback.c