Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp918241ybl; Wed, 21 Aug 2019 07:27:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1ew0XrfcAjylhv3lsLSllfpUWqgHqsDpaXRFooLHkhlgR7Jm3AYXb04SEZZgXrdjCPuyo X-Received: by 2002:a17:902:eb:: with SMTP id a98mr32212921pla.75.1566397666752; Wed, 21 Aug 2019 07:27:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566397666; cv=none; d=google.com; s=arc-20160816; b=Ggav1/92U5FuRSDOKIHgeaImo4p0+LY49Cf4P3eNRekT/2/HVg2+5ArLeHG+GjkOrH sIgrYUo/GHwKaMRofoxdxR5ocvj0bbdee8HXM2S6nwwUYYwi405zoaPeUB2OfvusK4eJ S7w47vaKANZZyqGEVw3zzrdt95HmYRejwHK45RpnAOayqjU2BfSdZDODqOxdo6VDlStX 3neiWveXNpG/E3HB5qHd7v0PgYUGm5EICEJiCl+B5LUC2OWAGh5TbFQISqQuHqaWPAB5 h7YeaaUblshE9qeoBF3ycOdVg01k8Fr93nxEFkXylPciIPzm27Q2ejDjbNzRsoBBZcnO qKnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id; bh=s0Mhwm7COqdCs7vhZuTO/yUIcwuzrdJSfcozmO4wmac=; b=h1juvBXU4Z+rhjOT3tlFJ2a7vJ2AbvPLaFKQco65r88kBsYpXQXuFS8xK4sxJenlqo RrHKEjrswN+DJycbvQ/TzBzD8SFvp1FQ9waqNTgwWNlvMkwlcR9JWkgZueQIhrWicOiy VBWn+RLHfronqz7uPMXSW2CyyVMjS1JYEDf+3N2S3lpWcsPnbBXUGH0/FRK/4uI1Kire R09zAowpK9jp+6dQ//FQ+mI/P1GzriIMwSH7LGw/m35ckLP1VoGbfHEC7TM+lqmLWfw+ AfxEZnDmirKApr7n2tuX+/9YtB22ZU26ILRPoLG9ur2j5hidQT1JgG5PWbBWeYGKOz2D cozA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b125si1302159pfa.258.2019.08.21.07.27.29; Wed, 21 Aug 2019 07:27:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729271AbfHUO0K (ORCPT + 99 others); Wed, 21 Aug 2019 10:26:10 -0400 Received: from shelob.surriel.com ([96.67.55.147]:60788 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726484AbfHUO0K (ORCPT ); Wed, 21 Aug 2019 10:26:10 -0400 Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1i0RYv-0004aN-BG; Wed, 21 Aug 2019 10:26:09 -0400 Message-ID: <7d3d50666ced8fb27d0964fa51e78fcbd0aec82e.camel@surriel.com> Subject: Re: Pointer magic in mm_init_cpumask() From: Rik van Riel To: Siarhei Liakh , LKML Date: Wed, 21 Aug 2019 10:26:08 -0400 In-Reply-To: References: Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-k3HbeHCDITjKCpsf2FRY" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-k3HbeHCDITjKCpsf2FRY Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2019-08-21 at 09:13 -0400, Siarhei Liakh wrote: > If mm_cpumask() is not safe, then at the very least the following has > to be fixed: > $ grep -rIn 'cpumask_clear(mm_cpumask(' * > arch/powerpc/include/asm/tlb.h:69: cpumask_clear(mm_cpumask(mm)); > arch/sparc/mm/init_64.c:857: cpumask_clear(mm_cpumask(mm)); > arch/ia64/include/asm/mmu_context.h:92: cpumask_clear(mm_cpuma > sk(mm)); > arch/csky/mm/asid.c:126: cpumask_clear(mm_cpumask(mm)); > arch/arm/mm/context.c:233: cpumask_clear(mm_cpumask(mm)); >=20 > Otherwise, mm_init_cpumask() can be simplified down to > cpumask_clear(mm_cpumask(mm)). > What do you think? That looks like a nice cleanup. I do not see why it would not work, but I suppose that should be tested :) --=20 All Rights Reversed. --=-k3HbeHCDITjKCpsf2FRY Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAl1dVIEACgkQznnekoTE 3oNGSQf/Xbkuz6NK2iPNQsSsPRCz2ie4Qkxq6sQYeD+pD4f6YHog0GOGWTFFrAIT FShUqfjcu5OgYAAuhifsZn9k9WjYeME+HSQON8we3IjyeAP05r5yE25TrvQgVc6l 5CrEle71a7go8l+f5ZcCB/gUJHZdRjaD+aJ3RIEPPwZ/O2YYofcGpHb4kHeFOABX sxI8y9waEIQJlUBzOdIHuUajxyCh6W2zr0s7aM590iqGsFBbvvrKxQMK5F8HUbhP ahi8PNbsO9bz3vLvVpKN9jzkJd5CviMCLO1oFN8cYvOjLfdKDo8BAQ2ddMJhQXej 4+pdaB4mVtUuTReDC/hMDQaiBcqbxg== =sAMJ -----END PGP SIGNATURE----- --=-k3HbeHCDITjKCpsf2FRY--