Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1122/?format=api
{ "id": 1122, "url": "http://patchwork.ozlabs.org/api/patches/1122/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/87prmuvnmt.fsf@natisbad.org/", "project": { "id": 7, "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api", "name": "Linux network development", "link_name": "netdev", "list_id": "netdev.vger.kernel.org", "list_email": "netdev@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<87prmuvnmt.fsf@natisbad.org>", "list_archive_url": null, "date": "2008-09-23T16:21:46", "name": "XFRM,IPv6: initialize ip6_dst_blackhole_ops.kmem_cachep", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "ca1f2b45f92ce23bc549881be3d1b76dbb99e8a5", "submitter": { "id": 439, "url": "http://patchwork.ozlabs.org/api/people/439/?format=api", "name": "Arnaud Ebalard", "email": "arno@natisbad.org" }, "delegate": { "id": 34, "url": "http://patchwork.ozlabs.org/api/users/34/?format=api", "username": "davem", "first_name": "David", "last_name": "Miller", "email": "davem@davemloft.net" }, "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/87prmuvnmt.fsf@natisbad.org/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/1122/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1122/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<netdev-owner@vger.kernel.org>", "X-Original-To": "patchwork-incoming@ozlabs.org", "Delivered-To": "patchwork-incoming@ozlabs.org", "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.176.167])\n\tby ozlabs.org (Postfix) with ESMTP id E106CDDFEC\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 24 Sep 2008 02:23:57 +1000 (EST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752202AbYIWQXl (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tTue, 23 Sep 2008 12:23:41 -0400", "(majordomo@vger.kernel.org) by vger.kernel.org id S1751588AbYIWQXl\n\t(ORCPT <rfc822; netdev-outgoing>); Tue, 23 Sep 2008 12:23:41 -0400", "from moog.chdir.org ([88.191.42.160]:41179 \"EHLO moog.chdir.org\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1752000AbYIWQXk (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tTue, 23 Sep 2008 12:23:40 -0400", "from [2001:7a8:78df:2:20d:93ff:fe55:8f78]\n\t(helo=localhost.localdomain)\n\tby moog.chdir.org with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.63) (envelope-from <arno@natisbad.org>)\n\tid 1KiAfc-0000EA-Sx; Tue, 23 Sep 2008 18:23:25 +0200" ], "X-Hashcash": [ "1:20:080923:netdev@vger.kernel.org::wGIIWnJy5EpTea9v:00000000000000000000000000000000000000036Hu", "1:20:080923:davem@davemloft.net::NF3jMDWE18F6+Ezk:0000000000000000000000000000000000000000000jF+", "1:20:080923:herbert@gondor.apana.org.au::8vEbeWNUoHpXN+7i:000000000000000000000000000000000012el", "1:20:080923:yoshfuji@linux-ipv6.org::lYuNc3fNxAlMeCMK:0000000000000000000000000000000000000075Sq" ], "From": "arno@natisbad.org (Arnaud Ebalard)", "To": "netdev@vger.kernel.org", "Cc": "David Miller <davem@davemloft.net>,\n\tHerbert Xu <herbert@gondor.apana.org.au>,\n\tYOSHIFUJI Hideaki / =?utf-8?B?5ZCJ6Jek6Iux?=\n\t=?utf-8?B?5piO?= <yoshfuji@linux-ipv6.org>", "Subject": "[PATCH] XFRM,IPv6: initialize ip6_dst_blackhole_ops.kmem_cachep", "X-PGP-Key-URL": "http://natisbad.org/arno@natisbad.org.asc", "X-Fingerprint": "47EB 85FE B99A AB85 FD09 46F3 0255 957C 047A 5026", "Date": "Tue, 23 Sep 2008 18:21:46 +0200", "Message-ID": "<87prmuvnmt.fsf@natisbad.org>", "User-Agent": "Gnus/5.110009 (No Gnus v0.9) Emacs/22.2 (gnu/linux)", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=us-ascii", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "Hi,\n\nWith the switch to a default value of 1 for xfrm_larval_drop in commit\n28faa979746b2352cd78a376bf9f52db953bda46 (ipsec: Make xfrm_larval_drop\ndefault to 1), what seems to be a bug manage to surface on one of my\ntest box running today's net-next (*).\n\nWhen xfrm_tmpl_resolve() returns -EAGAIN in __xfrm_lookup(), the caller\nis returned -EREMOTE and is expected to install a blackhole route. For\nIPv6, the call to dst_alloc(&ip6_dst_blackhole_ops) performed by\nip6_dst_blackhole() produces the error provided below, because\nkmem_cachep attribute seems to be uninitialized. This does not happen\nwhen xfrm_larval_drop is set to 0.\n\nThe patch below againt today's net-next fixes the issue but I am unable\nto tell if it is the best way (or even a decent way) to do it.\n\nNote that I am able to reproduce the issue on current 2.6.27-rc7 by\nforcing xfrm_larval_drop to 1. The patch below solves the problem,\ni.e. this may be a candidate for 2.6.27-rc8 (if correct).\n\nI may have missed something. Comments welcome.\n\nCheers,\n\na+\n\n(*): with the small MIGRATE patch David commented some days ago applied\n on top of it. No interaction expected.\n\n\n\nFrom: Arnaud Ebalard <arno@natisbad.org>\nDate: Tue, 23 Sep 2008 16:59:04 +0200\nSubject: [PATCH] XFRM,IPv6: initialize ip6_dst_blackhole_ops.kmem_cachep\n\nip6_dst_blackhole_ops.kmem_cachep is not expected to be NULL (i.e. to\nbe initialized) when dst_alloc() is called from ip6_dst_blackhole().\nOtherwise, it results in the following (xfrm_larval_drop is now set to\n1 by default): \n\n[ 78.697642] Unable to handle kernel paging request for data at address 0x0000004c\n[ 78.703449] Faulting instruction address: 0xc0097f54\n[ 78.786896] Oops: Kernel access of bad area, sig: 11 [#1]\n[ 78.792791] PowerMac\n[ 78.798383] Modules linked in: btusb usbhid bluetooth b43 mac80211 cfg80211 ehci_hcd ohci_hcd sungem sungem_phy usbcore ssb\n[ 78.804263] NIP: c0097f54 LR: c0334a28 CTR: c002d430\n[ 78.809997] REGS: eef19ad0 TRAP: 0300 Not tainted (2.6.27-rc5)\n[ 78.815743] MSR: 00001032 <ME,IR,DR> CR: 22242482 XER: 20000000\n[ 78.821550] DAR: 0000004c, DSISR: 40000000\n[ 78.827278] TASK = eef0df40[3035] 'mip6d' THREAD: eef18000\n[ 78.827408] GPR00: 00001032 eef19b80 eef0df40 00000000 00008020 eef19c30 00000001 00000000 \n[ 78.833249] GPR08: eee5101c c05a5c10 ef9ad500 00000000 24242422 1005787c 00000000 1004f960 \n[ 78.839151] GPR16: 00000000 10024e90 10050040 48030018 0fe44150 00000000 00000000 eef19c30 \n[ 78.845046] GPR24: eef19e44 00000000 eef19bf8 efb37c14 eef19bf8 00008020 00009032 c0596064 \n[ 78.856671] NIP [c0097f54] kmem_cache_alloc+0x20/0x94\n[ 78.862581] LR [c0334a28] dst_alloc+0x40/0xc4\n[ 78.868451] Call Trace:\n[ 78.874252] [eef19b80] [c03c1810] ip6_dst_lookup_tail+0x1c8/0x1dc (unreliable)\n[ 78.880222] [eef19ba0] [c0334a28] dst_alloc+0x40/0xc4\n[ 78.886164] [eef19bb0] [c03cd698] ip6_dst_blackhole+0x28/0x1cc\n[ 78.892090] [eef19be0] [c03d9be8] rawv6_sendmsg+0x75c/0xc88\n[ 78.897999] [eef19cb0] [c038bca4] inet_sendmsg+0x4c/0x78\n[ 78.903907] [eef19cd0] [c03207c8] sock_sendmsg+0xac/0xe4\n[ 78.909734] [eef19db0] [c03209e4] sys_sendmsg+0x1e4/0x2a0\n[ 78.915540] [eef19f00] [c03220a8] sys_socketcall+0xfc/0x210\n[ 78.921406] [eef19f40] [c0014b3c] ret_from_syscall+0x0/0x38\n[ 78.927295] --- Exception: c01 at 0xfe2d730\n[ 78.927297] LR = 0xfe2d71c\n[ 78.939019] Instruction dump:\n[ 78.944835] 91640018 9144001c 900a0000 4bffff44 9421ffe0 7c0802a6 bf810010 7c9d2378 \n[ 78.950694] 90010024 7fc000a6 57c0045e 7c000124 <83e3004c> 8383005c 2f9f0000 419e0050 \n[ 78.956464] ---[ end trace 05fa1ed7972487a1 ]---\n\nSigned-off-by: Arnaud Ebalard <arno@natisbad.org>\n---\n net/ipv6/route.c | 2 ++\n 1 files changed, 2 insertions(+), 0 deletions(-)", "diff": "diff --git a/net/ipv6/route.c b/net/ipv6/route.c\nindex 776871e..f4385a6 100644\n--- a/net/ipv6/route.c\n+++ b/net/ipv6/route.c\n@@ -2708,6 +2708,8 @@ int __init ip6_route_init(void)\n \tif (ret)\n \t\tgoto out_kmem_cache;\n \n+\tip6_dst_blackhole_ops.kmem_cachep = ip6_dst_ops_template.kmem_cachep;\n+\n \t/* Registering of the loopback is done before this portion of code,\n \t * the loopback reference in rt6_info will not be taken, do it\n \t * manually for init_net */\n", "prefixes": [] }