Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/59025/?format=api
https://patches.dpdk.org/api/patches/59025/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190909135142.3510-1-ruifeng.wang@arm.com/", "project": { "id": 1, "url": "https://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20190909135142.3510-1-ruifeng.wang@arm.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190909135142.3510-1-ruifeng.wang@arm.com", "date": "2019-09-09T13:51:42", "name": "lib/rcu: fix possible spurious thread unregister", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "1afa52f91dad84ffbabeaedbb9b5d2730ba4e38c", "submitter": { "id": 1198, "url": "https://patches.dpdk.org/api/people/1198/?format=api", "name": "Ruifeng Wang", "email": "ruifeng.wang@arm.com" }, "delegate": { "id": 24651, "url": "https://patches.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20190909135142.3510-1-ruifeng.wang@arm.com/mbox/", "series": [ { "id": 6338, "url": "https://patches.dpdk.org/api/series/6338/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=6338", "date": "2019-09-09T13:51:42", "name": "lib/rcu: fix possible spurious thread unregister", "version": 1, "mbox": "https://patches.dpdk.org/series/6338/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/59025/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/59025/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id F1E001EC7E;\n\tMon, 9 Sep 2019 15:51:56 +0200 (CEST)", "from foss.arm.com (foss.arm.com [217.140.110.172])\n\tby dpdk.org (Postfix) with ESMTP id A92EA1EC7A;\n\tMon, 9 Sep 2019 15:51:55 +0200 (CEST)", "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])\n\tby usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B06631D31;\n\tMon, 9 Sep 2019 06:51:54 -0700 (PDT)", "from net-arm-c2400-02.shanghai.arm.com\n\t(net-arm-c2400-02.shanghai.arm.com [10.169.40.42])\n\tby usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id\n\t30EC23F59C; Mon, 9 Sep 2019 06:51:53 -0700 (PDT)" ], "From": "Ruifeng Wang <ruifeng.wang@arm.com>", "To": "honnappa.nagarahalli@arm.com", "Cc": "dev@dpdk.org, gavin.hu@arm.com, nd@arm.com,\n\tRuifeng Wang <ruifeng.wang@arm.com>, stable@dpdk.org", "Date": "Mon, 9 Sep 2019 21:51:42 +0800", "Message-Id": "<20190909135142.3510-1-ruifeng.wang@arm.com>", "X-Mailer": "git-send-email 2.17.1", "Subject": "[dpdk-dev] [PATCH] lib/rcu: fix possible spurious thread unregister", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Thread unregister returns success while unregister not been performed.\nThis is due to incorrect thread registration status check.\nFix this issue by correcting bitmap check.\n\nFixes: 64994b56cfd7 (\"rcu: add RCU library supporting QSBR mechanism\")\nCc: stable@dpdk.org\n\nSigned-off-by: Ruifeng Wang <ruifeng.wang@arm.com>\nReviewed-by: Gavin Hu <gavin.hu@arm.com>\n---\n lib/librte_rcu/rte_rcu_qsbr.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)", "diff": "diff --git a/lib/librte_rcu/rte_rcu_qsbr.c b/lib/librte_rcu/rte_rcu_qsbr.c\nindex ce7f93dd3..8c37c88cd 100644\n--- a/lib/librte_rcu/rte_rcu_qsbr.c\n+++ b/lib/librte_rcu/rte_rcu_qsbr.c\n@@ -158,7 +158,7 @@ rte_rcu_qsbr_thread_unregister(struct rte_rcu_qsbr *v, unsigned int thread_id)\n \t/* Check if the thread is already unregistered */\n \told_bmap = __atomic_load_n(__RTE_QSBR_THRID_ARRAY_ELM(v, i),\n \t\t\t\t\t__ATOMIC_RELAXED);\n-\tif (old_bmap & ~(1UL << id))\n+\tif (!(old_bmap & (1UL << id)))\n \t\treturn 0;\n \n \tdo {\n@@ -175,7 +175,7 @@ rte_rcu_qsbr_thread_unregister(struct rte_rcu_qsbr *v, unsigned int thread_id)\n \t\tif (success)\n \t\t\t__atomic_fetch_sub(&v->num_threads,\n \t\t\t\t\t\t1, __ATOMIC_RELAXED);\n-\t\telse if (old_bmap & ~(1UL << id))\n+\t\telse if (!(old_bmap & (1UL << id)))\n \t\t\t/* Someone else unregistered this thread.\n \t\t\t * Counter should not be incremented.\n \t\t\t */\n", "prefixes": [] }{ "id": 59025, "url": "