Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/806309/?format=api
{ "id": 806309, "url": "http://patchwork.ozlabs.org/api/patches/806309/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170827230506.12683-2-samuel.thibault@ens-lyon.org/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170827230506.12683-2-samuel.thibault@ens-lyon.org>", "list_archive_url": null, "date": "2017-08-27T23:05:06", "name": "[PULL,1/1] slirp: fix clearing ifq_so from pending packets", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "887936c18b622f6021b0ba8cae4dd2a15a79c332", "submitter": { "id": 418, "url": "http://patchwork.ozlabs.org/api/people/418/?format=api", "name": "Samuel Thibault", "email": "samuel.thibault@ens-lyon.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170827230506.12683-2-samuel.thibault@ens-lyon.org/mbox/", "series": [ { "id": 51, "url": "http://patchwork.ozlabs.org/api/series/51/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=51", "date": "2017-08-27T23:05:06", "name": "[PULL,1/1] slirp: fix clearing ifq_so from pending packets", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/51/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/806309/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/806309/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xgVqw09Ddz9s7v\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 28 Aug 2017 09:05:46 +1000 (AEST)", "from localhost ([::1]:35907 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dm6ch-0005mb-4i\n\tfor incoming@patchwork.ozlabs.org; Sun, 27 Aug 2017 19:05:43 -0400", "from eggs.gnu.org ([2001:4830:134:3::10]:43211)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <samuel.thibault@ens-lyon.org>) id 1dm6cB-0005lI-1F\n\tfor qemu-devel@nongnu.org; Sun, 27 Aug 2017 19:05:11 -0400", "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <samuel.thibault@ens-lyon.org>) id 1dm6c9-0001VK-VW\n\tfor qemu-devel@nongnu.org; Sun, 27 Aug 2017 19:05:10 -0400", "from hera.aquilenet.fr ([2a01:474::1]:43472)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <samuel.thibault@ens-lyon.org>)\n\tid 1dm6c9-0001UK-O9\n\tfor qemu-devel@nongnu.org; Sun, 27 Aug 2017 19:05:09 -0400", "from localhost (localhost [127.0.0.1])\n\tby hera.aquilenet.fr (Postfix) with ESMTP id EE6C9D72C;\n\tMon, 28 Aug 2017 01:05:08 +0200 (CEST)", "from hera.aquilenet.fr ([127.0.0.1])\n\tby localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id JEUh9MoYMv75; Mon, 28 Aug 2017 01:05:08 +0200 (CEST)", "from var.youpi.perso.aquilenet.fr (unknown\n\t[IPv6:2a01:cb19:181:c200:3602:86ff:fe2c:6a19])\n\tby hera.aquilenet.fr (Postfix) with ESMTPSA id 00785E0B8;\n\tMon, 28 Aug 2017 01:05:07 +0200 (CEST)", "from samy by var.youpi.perso.aquilenet.fr with local (Exim 4.89)\n\t(envelope-from <samuel.thibault@ens-lyon.org>)\n\tid 1dm6c6-0003JJ-Uk; Mon, 28 Aug 2017 01:05:06 +0200" ], "X-Virus-Scanned": "Debian amavisd-new at aquilenet.fr", "From": "Samuel Thibault <samuel.thibault@ens-lyon.org>", "To": "qemu-devel@nongnu.org", "Date": "Mon, 28 Aug 2017 01:05:06 +0200", "Message-Id": "<20170827230506.12683-2-samuel.thibault@ens-lyon.org>", "X-Mailer": "git-send-email 2.14.1", "In-Reply-To": "<20170827230506.12683-1-samuel.thibault@ens-lyon.org>", "References": "<20170827230506.12683-1-samuel.thibault@ens-lyon.org>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "quoted-printable", "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]", "X-Received-From": "2a01:474::1", "Subject": "[Qemu-devel] [PULL 1/1] slirp: fix clearing ifq_so from pending\n\tpackets", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.21", "Precedence": "list", "List-Id": "<qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<http://lists.nongnu.org/archive/html/qemu-devel/>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Cc": "Samuel Thibault <samuel.thibault@ens-lyon.org>, stefanha@redhat.com,\n\tjan.kiszka@siemens.com", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>" }, "content": "The if_fastq and if_batchq contain not only packets, but queues of packets\nfor the same socket. When sofree frees a socket, it thus has to clear ifq_so\nfrom all the packets from the queues, not only the first.\n\nSigned-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>\nReviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>\n---\n slirp/socket.c | 39 +++++++++++++++++++++++----------------\n 1 file changed, 23 insertions(+), 16 deletions(-)", "diff": "diff --git a/slirp/socket.c b/slirp/socket.c\nindex ecec0295a9..cb7b5b608d 100644\n--- a/slirp/socket.c\n+++ b/slirp/socket.c\n@@ -59,6 +59,27 @@ socreate(Slirp *slirp)\n return(so);\n }\n \n+/*\n+ * Remove references to so from the given message queue.\n+ */\n+static void\n+soqfree(struct socket *so, struct quehead *qh)\n+{\n+ struct mbuf *ifq;\n+\n+ for (ifq = (struct mbuf *) qh->qh_link;\n+ (struct quehead *) ifq != qh;\n+ ifq = ifq->ifq_next) {\n+ if (ifq->ifq_so == so) {\n+ struct mbuf *ifm;\n+ ifq->ifq_so = NULL;\n+ for (ifm = ifq->ifs_next; ifm != ifq; ifm = ifm->ifs_next) {\n+ ifm->ifq_so = NULL;\n+ }\n+ }\n+ }\n+}\n+\n /*\n * remque and free a socket, clobber cache\n */\n@@ -66,23 +87,9 @@ void\n sofree(struct socket *so)\n {\n Slirp *slirp = so->slirp;\n- struct mbuf *ifm;\n \n- for (ifm = (struct mbuf *) slirp->if_fastq.qh_link;\n- (struct quehead *) ifm != &slirp->if_fastq;\n- ifm = ifm->ifq_next) {\n- if (ifm->ifq_so == so) {\n- ifm->ifq_so = NULL;\n- }\n- }\n-\n- for (ifm = (struct mbuf *) slirp->if_batchq.qh_link;\n- (struct quehead *) ifm != &slirp->if_batchq;\n- ifm = ifm->ifq_next) {\n- if (ifm->ifq_so == so) {\n- ifm->ifq_so = NULL;\n- }\n- }\n+ soqfree(so, &slirp->if_fastq);\n+ soqfree(so, &slirp->if_batchq);\n \n if (so->so_emu==EMU_RSH && so->extra) {\n \tsofree(so->extra);\n", "prefixes": [ "PULL", "1/1" ] }