Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1611741pxb; Mon, 11 Oct 2021 09:27:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiEZZEUL8uXZh5Yd6xhJuBa44IyWTlyBmb3adtFVlJPIAX2lVJPd6P+9WY7FDBgWO6J5lI X-Received: by 2002:a17:906:7c4:: with SMTP id m4mr27089048ejc.553.1633969674156; Mon, 11 Oct 2021 09:27:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633969674; cv=none; d=google.com; s=arc-20160816; b=AF1XlAzLWGsJNAU28FORDlslNPhe0hgUidyEi91Qr12DQSd59fFKSQPiHr/nGI7Fq0 cJ+xY/LrTaUZBAdPcMkJd03a9HbqscB/Fsdj2nqZzphKbChoRBqnnKsD8pkL/jk2hbHe YiHx15aretJRN6xguU3X/rG6sSoaqVN0OJz4KoDfEgL+M/z+zY+Qata7pYUOCxzneBv1 e2uFdMB69CmatnEnyU3z9v/6Ttw0fmZ6gosfY5YWNjkZU69/z0U3fASHCAlHjZeIYf4a ucwplMQigtFbLu5vvhLlwVyeXgpucj8nX2Dnn5envN+v1jkuAqm9W5kt6Vtm+F6zmZbJ MkXQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=OQIwDFeMFR6F97JX3LRnIP6zA1BOZRgpO4N4yqBuh/E=; b=0uUEgWt2c/29AlPaepkKPQ3tiU9QaJPzKvcT3VQWyiYJqEShZjFl+SAQRinzmb3jYV lc57OWAeJfILPtoNRKTrSKMIPZOvBlkBxm8saC6mexcyzLhS8FPsy+z2m8sbtaJ4iywf xd6nnY5dnARcn7Wd+bqkviF9YvxV6//xpFgYvO6XFMJv7It1erXO+GdiJT5qk0oMunTk bxRwWU/bIelrQSz4XdBi0TOYldM6djSqZnEY8h8tBXmJWjkL4OmiaQCZCcwfYOg4jW3/ u8F+aoEtIuu/AM3+aKwFVtelKoNOsc+tLkoDvxrWFsDImeA+Ky1JXpT7+zZ3YVP0xe+E HekQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RucD2lts; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h12si18487331edb.85.2021.10.11.09.27.30; Mon, 11 Oct 2021 09:27:54 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RucD2lts; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236976AbhJKNfQ (ORCPT + 99 others); Mon, 11 Oct 2021 09:35:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:57396 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235575AbhJKNfN (ORCPT ); Mon, 11 Oct 2021 09:35:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D59B460F24; Mon, 11 Oct 2021 13:33:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633959193; bh=NC29iQhY2uGfBUQZ0jOW13dZSCjYvmt4aSw5omB9AfA=; h=From:To:Cc:Subject:Date:From; b=RucD2lts33iehxcJX19N5wnH2a/L3Bt8jHaXWJfqR8ZZm+2cFVtMQUGQxDMafdKCf fgooLYsVftBTx/DuZD1PxybsojLbM3LKisgpV0IyiP04TXPlujY7WaYSGyZitRfp2h JyIZMV33sPfwjcXDQ2fe9KsLxpHL3YidzXDo0PygW5RnT6hvPggkpcqQDb6ko1Rxmq FkrqPry34ftLxa9RsWjEh3xZV5prBk5efO7fB/dbKYSt4ouoGLNfjODc9wuqgl7pgE C4kiO5edbYTmrVoyRg8UpOJdY9wg2VbkyDpwt1uFAhjB86GCxQdJmqvlZFEfWQqwOX y4vOzdAE84yfA== From: Christian Brauner To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Vlastimil Babka , Suren Baghdasaryan , Matthew Bobrowski , Alexander Duyck , David Hildenbrand , Jan Kara , Christian Brauner Subject: [PATCH v2 0/2] Introduce simple pidfd to task helper Date: Mon, 11 Oct 2021 15:32:43 +0200 Message-Id: <20211011133245.1703103-1-brauner@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=894; h=from:subject; bh=UogWz9L05GC/Gry5hzXxCEotYF9uHRoKarED0b5f3eA=; b=owGbwMvMwCU28Zj0gdSKO4sYT6slMSSm2PwIXs7883xQhcUS//1Xj8/Y/NunPuPlFp5zTJrtBydt PO9t01HKwiDGxSArpsji0G4SLrecp2KzUaYGzBxWJpAhDFycAjCRvHhGhhuvf3/N3mZer32V5ddyZv uvcz+4bZBaXjE39ZPszcNVi/kZ/vulPGG44FaUdnOGCj9Lc47jl+c7nerubHD3URW6N2WVMw8A X-Developer-Key: i=christian.brauner@ubuntu.com; a=openpgp; fpr=4880B8C9BD0E5106FC070F4F7B3C391EFEA93624 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christian Brauner Hey everyone, This adds a simple helper to get rid of some code duplication introduced with the addition of two new pidfd-based syscalls in mm. We should've probably added the helper right away and I think I mentioned this during in the review on one of the revisions but we probably just lost track of it. If this looks ok to you, I'll queue this up for next. /* v2 */ Add a note to the kernel doc what the caller is expected to clean up. No semantical changes. Thanks! Christian Christian Brauner (2): pid: add pidfd_get_task() helper mm: use pidfd_get_task() include/linux/pid.h | 1 + kernel/pid.c | 36 ++++++++++++++++++++++++++++++++++++ mm/madvise.c | 15 +++------------ mm/oom_kill.c | 15 +++------------ 4 files changed, 43 insertions(+), 24 deletions(-) base-commit: 9e1ff307c779ce1f0f810c7ecce3d95bbae40896 -- 2.30.2