Message ID | 20221117012804.62514-1-daniel.m.jordan@oracle.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp160579wrr; Wed, 16 Nov 2022 17:39:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf64ySMWPw8EpwFREYy7RfT8FJL97On2s1mQQJRjhQEH2P8RPAezhyvRRUYE76vuXr0og2nB X-Received: by 2002:a17:903:2ce:b0:17f:8a20:d9b5 with SMTP id s14-20020a17090302ce00b0017f8a20d9b5mr581241plk.76.1668649188117; Wed, 16 Nov 2022 17:39:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1668649188; cv=pass; d=google.com; s=arc-20160816; b=Mf66kP9Qtb6LYL4A0cjMDepQd3idKjvHoENw+QnlPHBKbZYgcbV3b6qFbJnsTWkcwC 4zXmBVtClYyzu3A0ALRmzmbVkvH0Qnx36gdeeisFfEvWV1CzTbkcNjvry3K0Jo9G8QvW pdwE4xDCoBtTkvgdF7eqDJZNVBEk82ki26jm4dwUa0VT9DBoS/xS/Xq0SOHIKaZZkysL MetgBm4oFJ8IkEPp5kbiZ3FbK7l1uASVNhXewyui2rAUyFPL/PInVe2WmG+GWwUjQG6Y /uPKIu7BciqSbBBfPLDew17gA3W1Y2bz34tXN0QeZo6SlToEKfXjUa1iyc9e1Ss0xGkS MQbA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=iCZ/dh5tj/4YHQqldS766p/BQG9e07Ck2fkWIsQSsdk=; b=VJBvG9GMAizJluun0jgbRedJEuVnoak76g1XPeyusRP00J/8UhNu3D4yNpweaAwqv/ Rb17cGkqJxetLGvu6Tf2JdmI19rSn+gEgFViV//J2R/Hj67+LK1ucfqzOpjxHynmczho Aau+yZFBfQ1yJG4X8kcNIF+HJzCGtknsiKCN8MsKbQy1OINstqmZKfhfm961DCv8BqkT KKtElmG+4pW22sF1ZaJ6BRYo4SKgwmJuLlrBR899iA6xk817VCbCM5R+pcm7w0Gn8Mjo JO8PnrhzCBKuiwnITpgtOrPqqfiFfbk3LaSLFJ3LrlfIm9fIpeUjBMkqYoSPR9Mah8PH gX4A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=xzIj6tbh; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Y4BBUUTK; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v14-20020a63480e000000b0046aff26fe6dsi16704333pga.498.2022.11.16.17.39.33; Wed, 16 Nov 2022 17:39:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=xzIj6tbh; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Y4BBUUTK; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234388AbiKQBaa (ORCPT <rfc822;just.gull.subs@gmail.com> + 99 others); Wed, 16 Nov 2022 20:30:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232983AbiKQBa1 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 16 Nov 2022 20:30:27 -0500 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A40245EFA3; Wed, 16 Nov 2022 17:30:22 -0800 (PST) Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AGMhoY4025204; Thu, 17 Nov 2022 01:30:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=iCZ/dh5tj/4YHQqldS766p/BQG9e07Ck2fkWIsQSsdk=; b=xzIj6tbhbata9fj6qg8RXVJFS0tFj1nnjlTw2vKa+tlrXcA2CJgC2rgrRrcjPF+kw0m5 5f2xlgyg0DVCuWRyFrg2qqISyXJy/G4uNHPtwkza4PKMPmrkr8jaFlv5mrI55xxHgGGJ JJXiFxfwq9rc+8t2rB/CQOaJSQZ02LmZY8RiZaayLijKOlny0p8tRHnhNhLO4Bs5Q9KD gJDCNxbUz4igLYBHLF+mp/a/sAqsArKume1UA7hiLEtbEOR2YqbwmdAW5F8gUoi0EMUN qgTQgAQg41SOVQsAM8ofyHIe5uYWygrnTVM8a3Kv7tUvyw4oYUXm6x9Qz3Rt9pkKdEr6 yQ== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3kv3n1780n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 17 Nov 2022 01:30:08 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2AH1KFvO027198; Thu, 17 Nov 2022 01:28:08 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2168.outbound.protection.outlook.com [104.47.58.168]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3kt1x8afy6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 17 Nov 2022 01:28:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VWOsjmX+Gj4Vwg/VFVdRw+zbirlxb7iBZj9E7oL1DSRgOk+MflrA4Hsv3SQJdrPWQcMAGozsvsKBSbf/eV/xtWcNI4PmoFZBCzVTlvLXI8FFybR73QKZWq9qQmZkMnfHYAsdRxW4LUSmgtayBC1VR3kEg+8r1kSJ+xsTnudVRb7aCseOd4oeG7GMb1JbzcK9Lfu3fAYmax84OjSPa+N+hSD4zwkib9Ze3zximD5wPhiZs5/aHohjkdydQVi4Y+o5zT3YDv1OdXCclm0KYbSWYDlTEjCbhTBdDfZFUsSaYV1zHqGUTJc0WhgyOOAf1XEx/qVFZNJXq+L782Ob34KT0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iCZ/dh5tj/4YHQqldS766p/BQG9e07Ck2fkWIsQSsdk=; b=KhNQGQYjdofAXiG/dY2s8zGaJlRugl2RBebypAuoU/KbrQ1AmVdCeEGPCQo2iO/7nqIcXxKyfk8XCKSi5/bI+NuQqQkR3oTN9iHkEROzCSPa00srwaXVCymOZkqIfv7EeA44TxwzD90gZjV09xkJ53CzC87ChccBZEeS5mysPLwPKSOz/HIZUvrRR64lXVmw3/DrjOy6WTDobHVEn5ynJd0TA+IHVRY9erQpfu5ZnXt93rJcImx2avp/BDifRemwiSgjIiKXzKyVDGjrxEPJRyZopFmkf+eZastDJFaEPcUCso3TmfMTVPu+95gK9Bjt+oQU2utfmoBw5jPoM31gQg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iCZ/dh5tj/4YHQqldS766p/BQG9e07Ck2fkWIsQSsdk=; b=Y4BBUUTKjf1ZFJDpOkv24rJMHVs8Hnccfj5RBdRVRqgltV7kgzvo5v28qnM/NdL8N+ZHsHpn3h/6/wxMbmA8lXA0qgrUiizSyDgCq5qXXRqdA4WDWFwmheI2oNEMC0AMSbnH6lC80qam0Szr2hAW+43A6FupMx1Z1T1jVrE/2dU= Received: from SA1PR10MB5711.namprd10.prod.outlook.com (2603:10b6:806:23e::20) by CY5PR10MB5961.namprd10.prod.outlook.com (2603:10b6:930:2e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.25; Thu, 17 Nov 2022 01:28:05 +0000 Received: from SA1PR10MB5711.namprd10.prod.outlook.com ([fe80::8127:f9d4:2c92:c253]) by SA1PR10MB5711.namprd10.prod.outlook.com ([fe80::8127:f9d4:2c92:c253%7]) with mapi id 15.20.5813.014; Thu, 17 Nov 2022 01:28:05 +0000 From: Daniel Jordan <daniel.m.jordan@oracle.com> To: Herbert Xu <herbert@gondor.apana.org.au>, Steffen Klassert <steffen.klassert@secunet.com> Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel Jordan <daniel.m.jordan@oracle.com> Subject: [PATCH] padata: Fix list iterator in padata_do_serial() Date: Wed, 16 Nov 2022 20:28:04 -0500 Message-Id: <20221117012804.62514-1-daniel.m.jordan@oracle.com> X-Mailer: git-send-email 2.38.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BL0PR0102CA0027.prod.exchangelabs.com (2603:10b6:207:18::40) To SA1PR10MB5711.namprd10.prod.outlook.com (2603:10b6:806:23e::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA1PR10MB5711:EE_|CY5PR10MB5961:EE_ X-MS-Office365-Filtering-Correlation-Id: 7ba8b233-b30d-425b-bf2c-08dac83afa2a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZeQWN/QnyVIEyAlluyh0W+BCgCtfDuRkDIxRsb5BI318HvCDyYIDZDS1d2r+mF6AmJ5MWozXV13WJjjfEjcOQkHpzOUZh6aZcGesKxU3XhCqZsZl0RN3tikkITiVmHrA1A8NkwSSatjKqHEC6avf59fvqB2WzVTN8L7Jti7FuReRIFotSuLAF4MCIaaCnzqhBjQa9y91XjlgNMafTVQ2yo4AY+k0wGPxEtgKo6iaNs2D2PuUBkN9/RnEkHJEAtaqIes8Im7GVqmHxK4T9ZTknixUw75YHAj6vTFSuZKlaZvfKmJo3cMeN/PzXKWqlq34YPWapNAjKYCHUZjRnT2aITNgN7cMccUr/zvWeSk6+RZduyYceEWGlP/87FJvn1IMX8+ezbrXG97Shueosb3D41eMyZNdcAw4oekxUf/FbYctDhkJKqw5WY2cAJoInVIJkDAGiVg3F9vcJ8eumS6nGHFYFllwgCQfxcIDzFhcYBqkPDLiWMzc5FfN4Z+RqUmuK7MQBFj/k0PoEo4FHLK5SVo0Nlv7qHxkSNeQHBBJw3pk5JfNRbfJaCvzTpPxy0B9EyQo95yAI5oLUo/egSUec/lJCbxzGH1rtta6bLGxXFwxqZkgZEeyeXWMbXI5sR1NHogGZe6WqoJFOaP5pwfiqhtWv10sScmhKSudF3/vl73oqNXeEJcjFmLfxADqD4x0V5GucQPoms9KunubXSlASQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA1PR10MB5711.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(376002)(136003)(366004)(346002)(396003)(39860400002)(451199015)(6512007)(38100700002)(26005)(6506007)(1076003)(2616005)(186003)(83380400001)(5660300002)(2906002)(66476007)(6486002)(107886003)(8936002)(4326008)(8676002)(66946007)(66556008)(41300700001)(316002)(478600001)(110136005)(103116003)(36756003)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fRjtmJxU1UwQu0zL/fj8Qd5GdgCh4kBK7TZxXd28nbIwZDyVt3am1I5hePTrJXMKysGO+AIanZhJwPqjZqjDTARb1PHUkRksFYdwPAtPL6rQDOipsDfF25FNv8+Mhx+ypFs6X93T+IL3W9/Z1zCF39mkeEGB9SuvzMUi1koPE0KILaB39qDmRuOESEyRF8yZlC2umGRNi6fhSIKQbaSuWbHgojXUkpwscM3QT371Apvhp3DNTdeIu5PRGWWN3cujixARpJ5oPcppt+0XwPGlcKAYgDW+Q/mjkTzc4dML+X5nCUmfbGXSCjO88iABkgNH/Lik6YXVr2mgcYtmrSwrFwjghgjb6hzyTNno9T5IDSyJghY7DJZZpopf+GqPlyw0Cv+UT9Y5hSW911c6e2fJvZg33PhiEj7d0YWgI4uB2BYxaSvcupxVEo9reXEUwg8CCXoX2Fykyvv0JW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== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7ba8b233-b30d-425b-bf2c-08dac83afa2a X-MS-Exchange-CrossTenant-AuthSource: SA1PR10MB5711.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2022 01:28:05.7891 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: AMzOpSLsJ3DX5DH876mQi2vU8eJBFJdquYMoL892hTOZq6Kre//gJjngoKYC78CN+xclZPDDGubjPf6ndNbNmk/3CcH8aqWLKXd7yuqt49c= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB5961 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-16_03,2022-11-16_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 phishscore=0 bulkscore=0 mlxlogscore=999 spamscore=0 adultscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211170008 X-Proofpoint-GUID: 6mW0BrSA5Ms624XpoVGViB69W2uqfW8v X-Proofpoint-ORIG-GUID: 6mW0BrSA5Ms624XpoVGViB69W2uqfW8v X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749705490827280873?= X-GMAIL-MSGID: =?utf-8?q?1749705490827280873?= |
Series |
padata: Fix list iterator in padata_do_serial()
|
|
Commit Message
Daniel Jordan
Nov. 17, 2022, 1:28 a.m. UTC
list_for_each_entry_reverse() assumes that the iterated list is nonempty
and that every list_head is embedded in the same type, but its use in
padata_do_serial() breaks both rules.
This doesn't cause any issues now because padata_priv and padata_list
happen to have their list fields at the same offset, but we really
shouldn't be relying on that.
Fixes: bfde23ce200e ("padata: unbind parallel jobs from specific CPUs")
Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com>
---
kernel/padata.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
Comments
On Wed, Nov 16, 2022 at 08:28:04PM -0500, Daniel Jordan wrote: > list_for_each_entry_reverse() assumes that the iterated list is nonempty > and that every list_head is embedded in the same type, but its use in > padata_do_serial() breaks both rules. > > This doesn't cause any issues now because padata_priv and padata_list > happen to have their list fields at the same offset, but we really > shouldn't be relying on that. > > Fixes: bfde23ce200e ("padata: unbind parallel jobs from specific CPUs") > Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com> > --- > kernel/padata.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) Patch applied. Thanks.
diff --git a/kernel/padata.c b/kernel/padata.c index 97f51e0c1776..de90af5fcbe6 100644 --- a/kernel/padata.c +++ b/kernel/padata.c @@ -390,13 +390,16 @@ void padata_do_serial(struct padata_priv *padata) int hashed_cpu = padata_cpu_hash(pd, padata->seq_nr); struct padata_list *reorder = per_cpu_ptr(pd->reorder_list, hashed_cpu); struct padata_priv *cur; + struct list_head *pos; spin_lock(&reorder->lock); /* Sort in ascending order of sequence number. */ - list_for_each_entry_reverse(cur, &reorder->list, list) + list_for_each_prev(pos, &reorder->list) { + cur = list_entry(pos, struct padata_priv, list); if (cur->seq_nr < padata->seq_nr) break; - list_add(&padata->list, &cur->list); + } + list_add(&padata->list, pos); spin_unlock(&reorder->lock); /*