Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5867491ioo; Wed, 1 Jun 2022 14:29:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2CG8BrNKBvFA+2+Fyn1VegJL/PU2dsJtYoYdGP14zZ0lMmx4luk6JI1U0Fv7pvHtNN4LB X-Received: by 2002:a05:6a00:850:b0:518:a9b2:1a19 with SMTP id q16-20020a056a00085000b00518a9b21a19mr48924076pfk.75.1654118962910; Wed, 01 Jun 2022 14:29:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654118962; cv=none; d=google.com; s=arc-20160816; b=Q++yQTAX76cAnlhuoGpPVHWo3hCVFdcG5K4jenbiAmmVQhLhc3NQJQnIg5NdaKhum5 6Irivhfh0tBud6IZHfD8/kC5xG9+2zN4dANsoYdLUHajJa3KLLSHFuusvmH9S0/IEIEx WOhXu6h3DjIR7C/sabxtm+eSp6x045AH3YivhqRuwWkcQX30IC9hKvFTCZeU3rdIMfJz /oFb0AMMvdF8ubLnSu4PkbcSAz/T5Oxtzev0hCUYm/noPmI8FIsKaYFMcyhP5lR0xSIE c1uOLm4doYNYAOFz2Dm25sidm2jMLKhcz5UEzJKqJ0uDYtifcP8XcZgmqXH5cPR8/efG SEAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=EL417cTm0c/3LvzBZMQF8QXVZcM9AZ2saBEadjHJh1c=; b=eypDqCt2EoleHaEA5sX/QldXdcvahj0y9OE7FpEUT9dzUWAeGNS73Uysoi3jz0Ogpf EJE/MJVUCQzYF3ut/7cx/pU6YTmez7xBQzAuS6AQYKLuo1UE1XjHCsmqOlfygjK0oPlo JqPhUPBjlHheNsbUxEFw8BBPUJu9Lu6ZvAMffE7sEEZh79jccGQUgW1/qcmORHMY9/St LJknhgRxtsil29XaNajWhCwkE7IvfCfm8ZYqgFWT8yADBxg3Tq84Js+5vSWyCcD5BmgA hrgAauf5C4oybLYDrK0Y+Uh2wzkp+aUmOWN+VqcWvOpt1yrpxkiXAQEyFqpa1GoHRe/f UaoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OClPeNNi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q135-20020a632a8d000000b003f5fd4126b6si3610780pgq.716.2022.06.01.14.29.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 14:29:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OClPeNNi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 44ADC31101D; Wed, 1 Jun 2022 13:18:21 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355430AbiFAP1L (ORCPT + 99 others); Wed, 1 Jun 2022 11:27:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355408AbiFAP1J (ORCPT ); Wed, 1 Jun 2022 11:27:09 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87B1B266D; Wed, 1 Jun 2022 08:27:07 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id n28so2675414edb.9; Wed, 01 Jun 2022 08:27:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EL417cTm0c/3LvzBZMQF8QXVZcM9AZ2saBEadjHJh1c=; b=OClPeNNiHILAN/kba/wRU9fcAzcq61UzRxTdmqUBukIIOsd3DawrjjR9uIOQaSb7ll b1IM6+XVS8Qn05lGJ+Ht0Y+gqp/EwGpmVgb2CoDRbMpb+5cl4mub3QlLVwLbGS4SJCp2 pcaIX3KesnTlIADPhIBA7wb9MWrCdI3rUJxnuf4gpsucsdU1h/Dqdf0W+TnGc1c2Lwlc JBF8kxYrnecRSeFhAn585qYTUwIUbdBBcbxnTZr7KjYnYEEpIVwHej1ZGIJ0X6G83tJq rHf5ADB20wCj/QbxWruCeWsuIGkNWv2zjmOVTDXdYt++GYcoV0BpDYCGFk49LpQfc1q5 5ibQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EL417cTm0c/3LvzBZMQF8QXVZcM9AZ2saBEadjHJh1c=; b=xi2M4XAIZjSsDsZbV5logChLddU6THHAIwmEcqshNdWA7kQgzclUI+adgRWH1ZiLW0 8O9JVb6kCM3c3fNF7I8OxYVdHYl5bqtjhzeETV5ASq4rhC9A9eBSaYoI40SdlOqBtV46 k6mFZVAYDdi6l/0iYvXl69J06pkoOff2QfbktpbzVol/9ne7engVSjJw/vOx5X42/Ncu xyqRwfZ4NfQBKs1hw3gjJI5kYHIKiwMDK2f0z2fOF2wfNEN1Y+dMDenDYzC8DAsH/xoS +3vXY4rfsbRjgXcPW6GSed8+EqVLmnWbrPhy5G9obJv/0W9ak+kMpiJ3+q5D2gT0Hu12 czRw== X-Gm-Message-State: AOAM531Hgr8nUOUyCpcZoLgluSL0zq095E1oEIbo/pJeIV9HfrOwTeOk sl65Dbl07nJahemP1Wob7ZDPoj6yE0dtGJav/g0= X-Received: by 2002:aa7:c396:0:b0:42d:8b86:a8dc with SMTP id k22-20020aa7c396000000b0042d8b86a8dcmr285755edq.54.1654097225973; Wed, 01 Jun 2022 08:27:05 -0700 (PDT) MIME-Version: 1.0 References: <20220530082552.46113-1-sander@svanheule.net> In-Reply-To: <20220530082552.46113-1-sander@svanheule.net> From: Andy Shevchenko Date: Wed, 1 Jun 2022 17:26:29 +0200 Message-ID: Subject: Re: [PATCH v1] gpio: realtek-otto: always honor empty CPU masks To: Sander Vanheule Cc: Linus Walleij , Bartosz Golaszewski , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , INAGAKI Hiroshi , Robert Marko Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 30, 2022 at 3:57 PM Sander Vanheule wrote: > > On uniprocessor builds, for_each_cpu(cpu, mask) will assume 'mask' > always contains exactly one CPU, and ignore the actual mask contents. > This causes the loop to run, even when it shouldn't on an empty mask, > and tries to access an uninitialised pointer. It's too noisy traceback, I believe you may squeeze it out and leave something like ~5-6 lines only. ... > This patch is more of a work-around than a real fix, and ensures the > driver runs properly on uniprocessor builds. My tests were done using an > SMP-enabled build on a single-core system, which is why is missed this > erroneous behaviour. > > The real fix would be a modification of include/linux/cpumask.h, which > may take longer to finalise, but I would rather have the issue in this > driver fixed in the 5.19 release. Hmm... I dunno that cpumask fix should be hard or easy, but I think you may try it simultaneously, so we will win one way or the other. -- With Best Regards, Andy Shevchenko