Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/807639/?format=api
{ "id": 807639, "url": "http://patchwork.ozlabs.org/api/patches/807639/?format=api", "web_url": "http://patchwork.ozlabs.org/project/lede/patch/1504099491-25402-1-git-send-email-dedeckeh@gmail.com/", "project": { "id": 54, "url": "http://patchwork.ozlabs.org/api/projects/54/?format=api", "name": "LEDE development", "link_name": "lede", "list_id": "lede-dev.lists.infradead.org", "list_email": "lede-dev@lists.infradead.org", "web_url": "http://lede-project.org/", "scm_url": "", "webscm_url": "http://git.lede-project.org/", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1504099491-25402-1-git-send-email-dedeckeh@gmail.com>", "list_archive_url": null, "date": "2017-08-30T13:24:51", "name": "[LEDE-DEV,ubox,2/3] kmodloader: lift restriction on module alias info", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "c67a681508d4d99f5d143b616f74c8cc3224c759", "submitter": { "id": 65331, "url": "http://patchwork.ozlabs.org/api/people/65331/?format=api", "name": "Hans Dedecker", "email": "dedeckeh@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/lede/patch/1504099491-25402-1-git-send-email-dedeckeh@gmail.com/mbox/", "series": [ { "id": 611, "url": "http://patchwork.ozlabs.org/api/series/611/?format=api", "web_url": "http://patchwork.ozlabs.org/project/lede/list/?series=611", "date": "2017-08-30T13:23:58", "name": "[LEDE-DEV,ubox,1/3] kmodloader: fix endianess check", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/611/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/807639/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/807639/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"AIv7CzZS\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"VwZy9Vk+\"; dkim-atps=neutral" ], "Received": [ "from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xj66t5PL4z9sN7\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Aug 2017 23:39:18 +1000 (AEST)", "from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dn3D1-0002al-CE; Wed, 30 Aug 2017 13:39:07 +0000", "from mail-io0-x241.google.com ([2607:f8b0:4001:c06::241])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dn2zd-0003fU-7p\n\tfor lede-dev@lists.infradead.org; Wed, 30 Aug 2017 13:25:32 +0000", "by mail-io0-x241.google.com with SMTP id j99so960811ioo.4\n\tfor <lede-dev@lists.infradead.org>;\n\tWed, 30 Aug 2017 06:24:57 -0700 (PDT)", "from cplx43.eu.thmulti.com ([141.11.62.7])\n\tby smtp.gmail.com with ESMTPSA id\n\td184sm2208870itd.6.2017.08.30.06.24.55\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tWed, 30 Aug 2017 06:24:56 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:\n\tList-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id:\n\tDate:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:\n\tResent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:\n\tList-Owner; bh=7TIcJKDLRhwpFr17ekJquXvhEyf2rvXuu4rjOpC5OL0=;\n\tb=AIv7CzZSCSC8Hw\n\t3hLSibtvPZXg3YGyO+L6QIay19N8k+X2+sV2c7MGxDjXuly+LbrJD8qp93ihMf9j+tnsEqAOROsA5\n\tax1jRIPgJhT8C0HyZDaZvkikQEWpSWFn0UusuZgR66cDtuzx+qKEGFQMMxN8tPX3LCWIrTSiYfWSs\n\tQClQLtF1XUng7NB4NSF5atTjb/pVfTg/OhAfzMjCgqhntfN29aO1tVBFFOJhx3ZowiNYnl857rjYY\n\tFwgZKC9GMbCnoPINbxPWdfZQVqHUrDUbLR2iS33H3nxivkSBnWCK/TbZLKKWptRlspT9MuyY2OMgl\n\t1kl+deC12YPsRLNlf92Q==;", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id;\n\tbh=CZAQi+t43XlY4ekBVjKBioIpHWGtuOOA3Th4W2zOLIg=;\n\tb=VwZy9Vk+if696i9Bdup0eV2EkfegNoGJAoELJlVi4mP4h3QfYHzmR2KQNjQou+ySaw\n\tE2ZjcI3JhuTN4u00wR3zG5DgKbakYKM/pSPUAqcrsorby7Gu6nry16wtcBCB2Hm0crnp\n\tsu3r0jC3thXuSxSeukhHE4p46yLfcphjMVnB4Efoh6c/TtA2wKIz/Iq6T+izbidnbfRt\n\tW3iuMGiAqYjRXtWY6DGcYpuTyKRWhoAkqwcj+XRYdrnKwH0cIIyUSIJgouwUagsqvk1y\n\tdYOjOxhkZFm4aOTplSQpbVos12Ea9v2NypKp6y1T8gA8u/IL+M0fMOq0qxAfHuGVaAG3\n\tKjdg==" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=CZAQi+t43XlY4ekBVjKBioIpHWGtuOOA3Th4W2zOLIg=;\n\tb=P7oypZPZYjledf7xutjvYuDwzrPxhlokelOCK4oITCnsbyCApDMMxXaYOp8nGkvzeS\n\t3E0ZJF7qPJASIR+pBNCGiIVrhQNXFwPj2M/C1a91GoeuWzRMq5NlBQHmILqzhgp8k2RX\n\tZa3cUUJv1fUuBCi12GlqN81W3zwpZ7oNKGqRhS28QuUOkdXCXL0fYKEG6anmWlE6ICHC\n\thAwciVF8CJ0d+k/ok7DgPneKf3CXLcdz2XEzNbUkji2XScXwJHt/BQ8mdFzWXQGUj9Fy\n\tNtIR0INMzq03yyGYyeqnp0R7jxtXbUVwrOmVWfuHJcjgVI3T4gqmk9aTOOeiOlW8Hg+s\n\t7CXw==", "X-Gm-Message-State": "AHPjjUjHiuQJg+irLoRoXwV5l63EeboF+uYkC7xyuejGQchS3ORCQrej\n\t/FOX1zWEh0DKGw==", "X-Received": "by 10.107.183.197 with SMTP id h188mr1235598iof.61.1504099496716;\n\tWed, 30 Aug 2017 06:24:56 -0700 (PDT)", "From": "Hans Dedecker <dedeckeh@gmail.com>", "To": "john@phrozen.org,\n\tyszhou4tech@gmail.com,\n\tlede-dev@lists.infradead.org", "Date": "Wed, 30 Aug 2017 15:24:51 +0200", "Message-Id": "<1504099491-25402-1-git-send-email-dedeckeh@gmail.com>", "X-Mailer": "git-send-email 1.9.1", "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ", "X-CRM114-CacheID": "sfid-20170830_062517_889132_FADEF477 ", "X-CRM114-Status": "GOOD ( 10.08 )", "X-Spam-Score": "-2.7 (--)", "X-Spam-Report": "SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details: (-2.7 points)\n\tpts rule name description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:241 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS SPF: sender matches SPF record\n\t0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\n\tprovider (dedeckeh[at]gmail.com)\n\t-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain", "Subject": "[LEDE-DEV] [PATCH ubox 2/3] kmodloader: lift restriction on module\n\talias info", "X-BeenThere": "lede-dev@lists.infradead.org", "X-Mailman-Version": "2.1.21", "Precedence": "list", "List-Id": "<lede-dev.lists.infradead.org>", "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/lede-dev>,\n\t<mailto:lede-dev-request@lists.infradead.org?subject=unsubscribe>", "List-Archive": "<http://lists.infradead.org/pipermail/lede-dev/>", "List-Post": "<mailto:lede-dev@lists.infradead.org>", "List-Help": "<mailto:lede-dev-request@lists.infradead.org?subject=help>", "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/lede-dev>,\n\t<mailto:lede-dev-request@lists.infradead.org?subject=subscribe>", "Cc": "Hans Dedecker <dedeckeh@gmail.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "\"Lede-dev\" <lede-dev-bounces@lists.infradead.org>", "Errors-To": "lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org" }, "content": "kmodloader has a restriction of storing only 32 aliases for a given\nmodule; as modules can have easily more than 32 aliases let's remove\nthe restriction by using a dynamic allocation mechanism when retrieving\nthe aliases.\n\nSigned-off-by: Hans Dedecker <dedeckeh@gmail.com>\n---\n kmodloader.c | 14 ++++++++------\n 1 file changed, 8 insertions(+), 6 deletions(-)", "diff": "diff --git a/kmodloader.c b/kmodloader.c\nindex a4d492d..2ece0c2 100644\n--- a/kmodloader.c\n+++ b/kmodloader.c\n@@ -340,7 +340,7 @@ static struct module* get_module_info(const char *module, const char *name)\n \tint fd = open(module, O_RDONLY);\n \tunsigned int offset, size;\n \tchar *map = MAP_FAILED, *strings, *dep = NULL;\n-\tconst char *aliases[32] = { 0 };\n+\tconst char **aliases = NULL;\n \tint naliases = 0;\n \tstruct module *m = NULL;\n \tstruct stat s;\n@@ -383,11 +383,11 @@ static struct module* get_module_info(const char *module, const char *name)\n \t\tif (!strncmp(strings, \"depends=\", len + 1))\n \t\t\tdep = sep;\n \t\telse if (!strncmp(strings, \"alias=\", len + 1)) {\n-\t\t\tif (naliases < ARRAY_SIZE(aliases))\n-\t\t\t\taliases[naliases++] = sep;\n-\t\t\telse\n-\t\t\t\tULOG_WARN(\"module %s has more than %d aliases: truncated\",\n-\t\t\t\t\t\tname, ARRAY_SIZE(aliases));\n+\t\t\taliases = realloc(aliases, sizeof(sep) * (naliases + 1));\n+\t\t\tif (!aliases)\n+\t\t\t\tgoto out;\n+\n+\t\t\taliases[naliases++] = sep;\n \t\t}\n \t\tstrings = &sep[strlen(sep)];\n \t}\n@@ -404,6 +404,8 @@ out:\n \tif (fd >= 0)\n \t\tclose(fd);\n \n+\tfree(aliases);\n+\n \treturn m;\n }\n \n", "prefixes": [ "LEDE-DEV", "ubox", "2/3" ] }