From patchwork Mon Oct 17 14:40:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 3482 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1487555wrs; Mon, 17 Oct 2022 07:42:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4oI6yVfk7UxIBIenTdscnCXOcK4E4jnat7MXt1omSBVMoBW2JaKVSGKWyQnZpMoz+cfTAI X-Received: by 2002:a17:907:7e9e:b0:78d:f3b0:fc78 with SMTP id qb30-20020a1709077e9e00b0078df3b0fc78mr8971623ejc.478.1666017767708; Mon, 17 Oct 2022 07:42:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666017767; cv=none; d=google.com; s=arc-20160816; b=ClmyPSRCEWwIh8nrTYH6WKaKdx3Irb3cdBf3T6580L/M4afnO9iYlVHZvGw+Z0+kYU 3EAEinVoy93sKogXvDVS5TfOfL4g9OBS2z7Yy/0McZ5YzXToJ8ZGIcuVpTREv2SOkl9r eCK0sW3na8SbKb2iaTaNODXh8n2fSjshkyIor0GnhERF5WVh54nVegNK32/PHLXXzC7v 0/+oQ7lwKjgoXEsI6rvKYFndJubMw4lNpXB8aKr6MJIPMK3OKqh/EJ3H7LZnODVUZQm3 6pTJXFLyJA0m+XWEpvfO8lyNKQc6LBiEav0PDmRZiz8vI/mIvet0AEG0HfuWRwbkD960 3Ljw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fGzz9vQihkHLYuMDwQK6thgYE3qPewiwBTfTU2VGOHA=; b=gsEXcfTp0aquYrGrcDak42gywCfzyvucf/HG3NSldt/IJQdojMSyssFz7O+uZB5wu9 ZCc52QkVVTLUnlFBe7koyd8o93jOgpp65L6cOKFQOYQHWEVrNOA3rjDPusGaWZt06aMp sx3lbmv4sLS2Mf6/4XTIj/fkm/z6ABKhEj48tTLIVAVcApdNvSoPYWTIW+1Qf1bD7guA tjyx8zmIlTnjGf4kSebcZWMjKuSUikkZnOZyv4dSMpWKC6fE2FAtjJ5AZ9NCViWyvROA hIWdPwIlf4vPzreWlFgvmeoL/Z8XgEuKZLDQqVzHkr1FWGadHYEONqTD4bcy1T8DbzG1 EmGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GGI054dt; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c24-20020a50d658000000b0045cb9cf913csi8614292edj.424.2022.10.17.07.42.23; Mon, 17 Oct 2022 07:42:47 -0700 (PDT) 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=@gmail.com header.s=20210112 header.b=GGI054dt; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229981AbiJQOlY (ORCPT + 99 others); Mon, 17 Oct 2022 10:41:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230465AbiJQOlW (ORCPT ); Mon, 17 Oct 2022 10:41:22 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E83756612F for ; Mon, 17 Oct 2022 07:41:20 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id b12so16373671edd.6 for ; Mon, 17 Oct 2022 07:41:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fGzz9vQihkHLYuMDwQK6thgYE3qPewiwBTfTU2VGOHA=; b=GGI054dt/nH/X5fLQ6HzXMyw76tZaZ/ExJKRpHQhcyS3kGKNkKsLX6YHP0m6RAkZA3 ZcrEaUZC4Ij19TF2/y3zLlFEwlJlzW07A27qPq/155DDEIY4B+D/hmcMxdZ7f+gZSdMC sArwLPCQlMiPiME5Z+MYVTT0aUFm+aNChRxEY5zquAK0t+OOPp7SsgXJvl9/zaNA/1f8 6PcUlpst1jSxVyhPKJdp3qBs9xH9+G7sAh1YprxTDU1Ohe8aLaJa2VUfDi5u+tYtc9VB eDEoerRLObfDSNt7Sxv9pckdIVRx/3oNLZFUnX6Nh5jZIEt7ek7vibQNpfrwoT4qzgH+ NHXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fGzz9vQihkHLYuMDwQK6thgYE3qPewiwBTfTU2VGOHA=; b=ojAspNMb4L46kEw19r6a2AagvkgSlA9T/FSVf1yznFNBI/rDhs61Tn598w5beJoxHt f/TD78mUvw3vHafZI/D+0rcApNHB8RFeLSROOzV2T/9PnWeNVQDBX0qV50P7+fNO1KmE Ffr4mwLBkGtreZ40TwRJbMVbhSaBWOX7MNCT9qm3xt7I8dQl44ex38HhYehSp8Ssf3Mm 8JZY6d4/Q9c99TefITs9Sysmh+UDwzFIrtNEUwg5dSBLr2xVwrsknAUQ/UyKGLLj9di4 3psPRsBWgHG882P0TGDMqcEE2np3S58wRbhDr7rayHhVyjLMYBT6Ho7d5pJVSnZY71T1 hTKQ== X-Gm-Message-State: ACrzQf1/jWVdhAmKjm423nblyeCbZBMiqblyuZZnWWgMpFu/6WBzvI1S nVrztzAfofakZgQfO5kI45kA88Kg/ZlP5A== X-Received: by 2002:a05:6402:2546:b0:45d:8bff:7afc with SMTP id l6-20020a056402254600b0045d8bff7afcmr5571700edb.302.1666017678387; Mon, 17 Oct 2022 07:41:18 -0700 (PDT) Received: from localhost.localdomain ([46.248.82.114]) by smtp.gmail.com with ESMTPSA id dn2-20020a05640222e200b00459cf672a65sm7469144edb.71.2022.10.17.07.41.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 07:41:18 -0700 (PDT) From: Uros Bizjak To: linux-kernel@vger.kernel.org Cc: Uros Bizjak , "Eric W. Biederman" Subject: [PATCH RESEND 1/2] ucount: Fix atomic_long_inc_below argument type Date: Mon, 17 Oct 2022 16:40:48 +0200 Message-Id: <20221017144049.3404-2-ubizjak@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221017144049.3404-1-ubizjak@gmail.com> References: <20221017144049.3404-1-ubizjak@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746946246660709024?= X-GMAIL-MSGID: =?utf-8?q?1746946246660709024?= The type of u argument of atomic_long_inc_below should be long to avoid unwanted truncation to int. Fixes: f9c82a4ea89c ("Increase size of ucounts to atomic_long_t") Signed-off-by: Uros Bizjak Cc: "Eric W. Biederman" --- kernel/ucount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/ucount.c b/kernel/ucount.c index ee8e57fd6f90..74f5b4959feb 100644 --- a/kernel/ucount.c +++ b/kernel/ucount.c @@ -212,7 +212,7 @@ void put_ucounts(struct ucounts *ucounts) } } -static inline bool atomic_long_inc_below(atomic_long_t *v, int u) +static inline bool atomic_long_inc_below(atomic_long_t *v, long u) { long c, old; c = atomic_long_read(v);