Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/612832/?format=api
{ "id": 612832, "url": "http://patchwork.ozlabs.org/api/patches/612832/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1461167156-6737-2-git-send-email-dvlasenk@redhat.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1461167156-6737-2-git-send-email-dvlasenk@redhat.com>", "list_archive_url": null, "date": "2016-04-20T15:45:55", "name": "[2/3] e1000e: e1000e_cyclecounter_read(): fix er32(SYSTIML) overflow check", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "bfaa15e50d915714337a7bb76e5a439b19b35504", "submitter": { "id": 11718, "url": "http://patchwork.ozlabs.org/api/people/11718/?format=api", "name": "Denys Vlasenko", "email": "dvlasenk@redhat.com" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1461167156-6737-2-git-send-email-dvlasenk@redhat.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/612832/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/612832/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@lists.osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Received": [ "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ozlabs.org (Postfix) with ESMTP id 3qqsRR4g1dz9t3Z\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 21 Apr 2016 05:30:27 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id F30CF3171A;\n\tWed, 20 Apr 2016 19:30:26 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id p6NUHftRzwsT; Wed, 20 Apr 2016 19:30:24 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id B777A3120A;\n\tWed, 20 Apr 2016 19:30:24 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 1C0411C174C\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 20 Apr 2016 15:46:07 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id C7F5930A21\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 20 Apr 2016 15:46:06 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id sDVQ37WPCiCq for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 20 Apr 2016 15:46:05 +0000 (UTC)", "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby silver.osuosl.org (Postfix) with ESMTPS id D39AE329D6\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 20 Apr 2016 15:46:05 +0000 (UTC)", "from int-mx13.intmail.prod.int.phx2.redhat.com\n\t(int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 4A48464068\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 20 Apr 2016 15:46:05 +0000 (UTC)", "from localhost.localdomain (dhcp-1-191.brq.redhat.com\n\t[10.34.1.191])\n\tby int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with\n\tESMTP id u3KFk0as001773; Wed, 20 Apr 2016 11:46:04 -0400" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": [ "domain auto-whitelisted by SQLgrey-1.7.6", "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.38]); Wed, 20 Apr 2016 15:46:05 +0000 (UTC)" ], "From": "Denys Vlasenko <dvlasenk@redhat.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Wed, 20 Apr 2016 17:45:55 +0200", "Message-Id": "<1461167156-6737-2-git-send-email-dvlasenk@redhat.com>", "In-Reply-To": "<1461167156-6737-1-git-send-email-dvlasenk@redhat.com>", "References": "<1461167156-6737-1-git-send-email-dvlasenk@redhat.com>", "X-Scanned-By": "MIMEDefang 2.68 on 10.5.11.26", "X-Mailman-Approved-At": "Wed, 20 Apr 2016 19:30:21 +0000", "Cc": "Denys Vlasenko <dvlasenk@redhat.com>", "Subject": "[Intel-wired-lan] [PATCH 2/3] e1000e: e1000e_cyclecounter_read():\n\tfix er32(SYSTIML) overflow check", "X-BeenThere": "intel-wired-lan@lists.osuosl.org", "X-Mailman-Version": "2.1.18-1", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.lists.osuosl.org>", "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>", "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@lists.osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>" }, "content": "If two consecutive reads of the counter are the same, it is also not an overflow.\n\"systimel_1 < systimel_2\" should be \"systimel_1 <= systimel_2\".\n\nBefore the patch, we could perform an *erroneous* correction:\n\nLet's say that systimel_1 == systimel_2 == 0xffffffff.\n\"systimel_1 < systimel_2\" is false, we think it's an overflow,\nwe read \"systimeh = er32(SYSTIMH)\" which meanwhile had incremented,\nand use \"(systimeh << 32) + systimel_2\" value which is 2^32 too large.\n\nSigned-off-by: Denys Vlasenko <dvlasenk@redhat.com>\nCC: intel-wired-lan@lists.osuosl.org\n---\n drivers/net/ethernet/intel/e1000e/netdev.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)", "diff": "diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c\nindex 967311b..99d0e6e 100644\n--- a/drivers/net/ethernet/intel/e1000e/netdev.c\n+++ b/drivers/net/ethernet/intel/e1000e/netdev.c\n@@ -4287,7 +4287,7 @@ static cycle_t e1000e_cyclecounter_read(const struct cyclecounter *cc)\n \tsystimeh = er32(SYSTIMH);\n \tsystimel_2 = er32(SYSTIML);\n \t/* Check for overflow. If there was no overflow, use the values */\n-\tif (systimel_1 < systimel_2) {\n+\tif (systimel_1 <= systimel_2) {\n \t\tsystim = (cycle_t)systimel_1;\n \t\tsystim |= (cycle_t)systimeh << 32;\n \t} else {\n", "prefixes": [ "2/3" ] }