Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4577635pxb; Tue, 2 Nov 2021 12:02:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYioVC1q2bX4nrHiHXb0yto53Cs5mc9tPGCsTjlzy4pZqTnQWcJ4Mkyii+cV9un1IAA0c6 X-Received: by 2002:a92:dc0c:: with SMTP id t12mr18709359iln.198.1635879777815; Tue, 02 Nov 2021 12:02:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635879777; cv=none; d=google.com; s=arc-20160816; b=DYVXz1VjnYzMIKs+6m3Zub8ABJ/bl29ApN/PCSkCQ2fIC3FJfVeetVZL6J7WtHstjy T+kRQ3Yk3ICupbcJvfDJOO3a/S04Kl3R5UhyR/y3z1DN8Vm+qrrXwx/QnOna+a4FntR3 09FoidygxuhjBch5rrtTrpUolA0Xe6gZiuLrO8QSu7YVCSOF7e0R5p1ZwOqQqMaAPeCk UVLP1LhxaV/KAbVeJzxJ4k4dMBhw7+J1ZnWIy6cC3k5Z1VwvVhITWUB/QllbxA/G3Dw/ O7HZHQp/nmOlKs9C7eBnSYYAhYOjxRH/PKji+YkYTHHtqN2X5sU1zgArNgbHs31L1Jqh mADA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:mime-version:user-agent:message-id:date :cc:to:from; bh=EZb4BAaLn8QsVd8lO+k9ynDd3eHmmvEC3lvXfa0rMxU=; b=p/HTe8S84QQBNV3k1GzVI381357t/h4eK3dNTP35H+sNjCRyUtfLEZdN/Bgg7/CfR4 re8xHkJrt5wjIEo7NL5VQW7+AmXiGsupxye++G/uf2IR89v8Pd18c5Ap5CrqIXrPLWEw AWyWc0Vs8jMyuR/DvzLMIT8wbDTQeDQXWRxImmILzAYaBEyyuM1KqUJdctbXEZdZJDYv yiOl97y2wKSD0BU0zKqpECDvkF0S4u125YVMc/mfT2xpVDg7GEpqObChcV5Fv/FPrFns VPqj4oiYQbVrNJm5O2ZqpFOE55N0dby/aYbWO2SDF+rwHPE0LhJNB4OQMyFkUjXm/WOK 7omQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xmission.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m20si4593203jaj.97.2021.11.02.12.02.43; Tue, 02 Nov 2021 12:02:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xmission.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230297AbhKBTDp (ORCPT + 99 others); Tue, 2 Nov 2021 15:03:45 -0400 Received: from out03.mta.xmission.com ([166.70.13.233]:59496 "EHLO out03.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229846AbhKBTDo (ORCPT ); Tue, 2 Nov 2021 15:03:44 -0400 Received: from in01.mta.xmission.com ([166.70.13.51]:45766) by out03.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1mhz1w-00EdGr-Do; Tue, 02 Nov 2021 13:01:08 -0600 Received: from ip68-227-160-95.om.om.cox.net ([68.227.160.95]:38626 helo=email.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1mhz1u-006oyn-QO; Tue, 02 Nov 2021 13:01:07 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Linus Torvalds Cc: , Alexey Gladkov , Rune Kleveland , Yu Zhao , Jordan Glover , Antoine Martin , David Howells , Jarkko Sakkinen Date: Tue, 02 Nov 2021 14:01:00 -0500 Message-ID: <87bl325qmr.fsf@disp2133> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1mhz1u-006oyn-QO;;;mid=<87bl325qmr.fsf@disp2133>;;;hst=in01.mta.xmission.com;;;ip=68.227.160.95;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX19QwnNL3n7EIzbBrvxjzcJUMDV2bTOoDzI= X-SA-Exim-Connect-IP: 68.227.160.95 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on sa04.xmission.com X-Spam-Level: ** X-Spam-Status: No, score=2.0 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,XMSubMetaSxObfu_03,XMSubMetaSx_00 autolearn=disabled version=3.4.2 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.4998] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa04 1397; Body=1 Fuz1=1 Fuz2=1] * 1.0 XMSubMetaSx_00 1+ Sexy Words * 1.2 XMSubMetaSxObfu_03 Obfuscated Sexy Noun-People X-Spam-DCC: XMission; sa04 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: **;Linus Torvalds X-Spam-Relay-Country: X-Spam-Timing: total 363 ms - load_scoreonly_sql: 0.03 (0.0%), signal_user_changed: 10 (2.8%), b_tie_ro: 9 (2.4%), parse: 0.72 (0.2%), extract_message_metadata: 2.6 (0.7%), get_uri_detail_list: 0.85 (0.2%), tests_pri_-1000: 3.6 (1.0%), tests_pri_-950: 1.24 (0.3%), tests_pri_-900: 0.97 (0.3%), tests_pri_-90: 87 (24.0%), check_bayes: 86 (23.6%), b_tokenize: 4.7 (1.3%), b_tok_get_all: 5 (1.5%), b_comp_prob: 1.74 (0.5%), b_tok_touch_all: 71 (19.4%), b_finish: 0.94 (0.3%), tests_pri_0: 241 (66.4%), check_dkim_signature: 0.46 (0.1%), check_dkim_adsp: 2.9 (0.8%), poll_dns_idle: 1.01 (0.3%), tests_pri_10: 2.0 (0.6%), tests_pri_500: 6 (1.8%), rewrite_mail: 0.00 (0.0%) Subject: [GIT PULL] ucount cleanups for v5.16 X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus, Please pull the ucount-fixes-for-v5.16 branch from the git tree: git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git ucount-fixes-for-v5.16 HEAD: 32342701b4ba57a6fd77e8aca2f65f68c0fa1da6 ucounts: Use atomic_long_sub_return for clarity While working on the ucount fixes a for v5.15 a number of cleanups suggested themselves. Little things like not testing for NULL when a pointer can not be NULL and wrapping atomic_add_negative with a more descriptive name, so that people reading the code can more quickly understand what is going on. Eric W. Biederman (4): ucounts: In set_cred_ucounts assume new->ucounts is non-NULL ucounts: Remove unnecessary test for NULL ucount in get_ucounts ucounts: Add get_ucounts_or_wrap for clarity ucounts: Use atomic_long_sub_return for clarity kernel/cred.c | 5 ++--- kernel/ucount.c | 20 +++++++++++++------- 2 files changed, 15 insertions(+), 10 deletions(-) Eric