From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EE40C433EF for ; Mon, 18 Oct 2021 22:29:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3ECAB60FED for ; Mon, 18 Oct 2021 22:29:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3ECAB60FED Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id DB5CB900003; Mon, 18 Oct 2021 18:29:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D63D46B0071; Mon, 18 Oct 2021 18:29:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C52FF900003; Mon, 18 Oct 2021 18:29:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0066.hostedemail.com [216.40.44.66]) by kanga.kvack.org (Postfix) with ESMTP id B8BCC6B006C for ; Mon, 18 Oct 2021 18:29:30 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 7BDD718037BF0 for ; Mon, 18 Oct 2021 22:29:30 +0000 (UTC) X-FDA: 78711000900.18.D828C3B Received: from mail-ua1-f48.google.com (mail-ua1-f48.google.com [209.85.222.48]) by imf03.hostedemail.com (Postfix) with ESMTP id 549C730000A6 for ; Mon, 18 Oct 2021 22:29:28 +0000 (UTC) Received: by mail-ua1-f48.google.com with SMTP id r22so6462856uat.11 for ; Mon, 18 Oct 2021 15:29:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WItCIYqsbUPD72nHnvN17yFYFOS1ObilaTg0MnWhimM=; b=dfoc7S8/Ww6cb3NZc2WR8BnkW61SdjoUUknDFAqPDsTjN2OGWw5ekLyXgujJ1yiH56 xodp4yJUDU7UjrsrhGXw5UsRD8R646yFugInFb1Y8ANaKFhmod9D4CPiDOX/miZa39Gi BgL9Pxb2c593rdhJAsq/ItBTN3tdvyDE/cpQZmh+55gJZ1ZVumx0Pdkd8DS4fLae+D5v 3PPyB2ykikWT8CgLz+3XUfcR/GMKTdiHkdz39If8nz4Joj6c9nhKSvWqXga1XhdQsqPT Eh+/Bt80zk2VboT+ji0IjxTOU2kTvHu2Sd09C3XXmc9GVYmc4hUziJMnWbuUfn7tIYpn ccuA== 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=WItCIYqsbUPD72nHnvN17yFYFOS1ObilaTg0MnWhimM=; b=XYkPPumSztKxvkJgmJP3N0camj5NbR+jIm6Cfs0Rm9qMT6UdeMY0nc3IPVtaYiVKjI FD9tCgJ+VZl6UHKthvQmSEURQ1ZcwVODVqKsBzyQGNssRmKsaQDP3BKtLB63WrwiZgzz VkvxeVOTfWXA6kiMRO/qWFvVJ81C2mWikQBOVKffVRC75nU0wSOzenuaYd/ajfXFG7+u l48S142CbW62yApaFpMMLSmWwNP7ojIfayWcNBei8g0U06Tf3iKiKfPe4sdBf0yaCnZG r7fE2+P9ULfKQD7kzhbQLRBjPahTU+Zr4nr9DPifNgwYCNQhMyA02RBZdAvkq703Sp5D NKNQ== X-Gm-Message-State: AOAM531M5o+8r5YpGf10DuSqSMjc/DWns6ENViiy3z41te26HKgzCR33 Xb5QqNs57b2nosz2g1Y2zNwt7bGPKzW9SjyKO5Emx/qp2US2Xg== X-Google-Smtp-Source: ABdhPJxKfsOl9FEnAEeKJ0XGXYrwHdf/vb/TXC58stZbzaYrFfwE0gRvb37yCTeOMtYt2iO6UMwF0yEC69mwE801bY4= X-Received: by 2002:ab0:49ca:: with SMTP id f10mr28590033uad.61.1634596169392; Mon, 18 Oct 2021 15:29:29 -0700 (PDT) MIME-Version: 1.0 References: <1M9_d6wrcu6rdPe1ON0_k0lOxJMyyot3KAb1gdyuwzDPC777XVUWPHoTCEVmcK3fYfgu7sIo3PSaLe9KulUdm4TWVuqlbKyYGxRAjsf_Cpk=@protonmail.ch> <87ee9pa6xw.fsf@disp2133> <878rzw77i3.fsf@disp2133> <20210929173611.fo5traia77o63gpw@example.org> <20210930130640.wudkpmn3cmah2cjz@example.org> <878rz8wwb6.fsf@disp2133> <87v92cvhbf.fsf@disp2133> <87mtnavszx.fsf_-_@disp2133> <87fssytizw.fsf_-_@disp2133> <871r4itfjw.fsf_-_@disp2133> <877dearzfo.fsf_-_@disp2133> In-Reply-To: <877dearzfo.fsf_-_@disp2133> From: Yu Zhao Date: Mon, 18 Oct 2021 16:29:18 -0600 Message-ID: Subject: Re: [PATCH 0/4] ucounts: misc cleanups To: "Eric W. Biederman" Cc: Alexey Gladkov , Rune Kleveland , Jordan Glover , LKML , Linux-MM , "containers\\@lists.linux-foundation.org" , Hillf Danton Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b="dfoc7S8/"; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf03.hostedemail.com: domain of yuzhao@google.com designates 209.85.222.48 as permitted sender) smtp.mailfrom=yuzhao@google.com X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 549C730000A6 X-Stat-Signature: ucbs56m5s7ob8zdp3dii1841epzi6s8b X-HE-Tag: 1634596168-117312 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Oct 18, 2021 at 11:55 AM Eric W. Biederman wrote: > > > The following changes are a set of miscellaneous fixes that makes > the ucount code a little bit easier to read. There are all things > that I ran into while helping hunt the crazy reference count > bug. > > I am aiming these at the next merge window and 5.16 rather than bug > fixes to get into the current 5.15. > > 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(-) Thanks for the cleanups. Tested the whole series on the latest 5.15-rc6. Tested-by: Yu Zhao