Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2335562pxa; Mon, 17 Aug 2020 07:15:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAodNX7nHaK7CFWJwxQVxhytUTsq8HtUkkT+X1AO/wrTE2TzkPSDKvXZG4S9XtoGtd79M7 X-Received: by 2002:a17:906:69d5:: with SMTP id g21mr14898260ejs.461.1597673704307; Mon, 17 Aug 2020 07:15:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597673704; cv=none; d=google.com; s=arc-20160816; b=EE+991oaLTe8XV2lklZszOxit+X0xNGTCoBTQSB4Cq5L+Ia7gjjia5E7sD7U1iEaoT DYZK22amVGemjeXg4z5Lk42tr0FWOCuF1ipjfW8XxqeHb4Cx9aBAjjqwBgT7vxvI/yOI GKiZoShNghpRaVFfVm5kHpOkmucueqwhsL6aXXzbjPc1LeTWggFdJxsg27wmZ4y6Yq7+ TanxZ55NfESRN44au/abFxrWe5Ywza5H+MvTJ1836MQn+W64rfAwqatm0JZNzTsE8/4G UOYuEw7YFr9xQHbZJH64sG320FUSlouKXNakEOqlH5cFNCPRmp31cvbV45c67Lix522o jMHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=wOYrYDva8jy68+Dm5u/UVVy7tRdDUGLfDfrn2aQGQkA=; b=RnvLDMDAG26f7olJiSsZZ7V3p2XY9mNoXmSkqBk3pj1g3bmXTO6OpO4Zf7e12ywuhD LZse3dSDHjYu/g6Fnkh65R/weUAqYvxgEiSYMDzgi6FIcGWiK1fukK+Es/cG3VJlu6kC JQGF8x2sf5LQYPhd7NbBfAxX8SsszYJnN24mzdJWUcvnVLPPiutkXLt/t/38EA+oNQFV 7KSfFaQl3FOHaIIlpk1h5B5oPt9NeychE5BVoY2IoiRR3a1l36S/ZITGldDpzqnZSs71 VmK0fByhUv+hpxouMrFG5Hptp21Uxe22eRF1/ed3ycjOOavgEogsO0NCGaqdM/NiCHKI Oo+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=nM3uzpU5; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bz27si11296615ejc.415.2020.08.17.07.14.40; Mon, 17 Aug 2020 07:15:04 -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-dk.20150623.gappssmtp.com header.s=20150623 header.b=nM3uzpU5; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728878AbgHQOMa (ORCPT + 99 others); Mon, 17 Aug 2020 10:12:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728669AbgHQOM3 (ORCPT ); Mon, 17 Aug 2020 10:12:29 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62D21C061389 for ; Mon, 17 Aug 2020 07:12:29 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id j21so8172308pgi.9 for ; Mon, 17 Aug 2020 07:12:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=wOYrYDva8jy68+Dm5u/UVVy7tRdDUGLfDfrn2aQGQkA=; b=nM3uzpU5k4+7INekb0Ll8AyIsmiU7MLmm9Le7ENeK8DBnJLMTfwNVb2YxI9T3blkqw OcDH1xczqRRPsccE2oiqG4XfMVcrqh5UedMbTeb0cXQIwG8KdLlZtsZ4MhF97RAE2HzP JgHcpR3CsvPwQ+256Vj5X2QMf3BR/uSrb6brajQZYHXED22vQ7npaP33ioJznwUOahQI wavuc9ZINhECvfmZwDXML8psGCkVCKgupp3Xm4cggmnP/uArzea+sv/pDF7JrCxRUywd hl1iXOJdbtV27lsNpL1+Vb9hN/W78vz0LD/ERCSNSyHdBKHh1y/AYDVeAVyMfeWTKYJa tLYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=wOYrYDva8jy68+Dm5u/UVVy7tRdDUGLfDfrn2aQGQkA=; b=b3Vg9DnWHRaTsgRGAB75JW1tmySAPaPZgBsRQqW/n/6SQ+6CMvdwbL1njfsVzw6jRU uDPBq3TYxuROE8UvhCwtZQ6aktwBzTRDzJ+I+NAYsANfCdPkQ90Rxj7/2JqfHDr60MI2 5f7D/G8o1AiV/mC2giZU18Wg99DzN7FyDBE6vUBzuZB/IfrQeMvlikv7IJt/Eu1vytrb rH9ozZKbFXpSfu3kIrA4rN03UmH57iXP+kSik2vKnDC63q29x4K2cdbPYnejGnfGmwho XR9DU7EOpy4++8LCcdP89dtYq49f11SpRvcDJVFS2d83zpa4vn8nLSmyEgS/cXEMdZau Mtag== X-Gm-Message-State: AOAM531CVv4uTdC+nymOgBmyvRbCtxh5qzBpl5RqxPubAVID1tx4nrgx tJESulqlUkxKR+W9ApBM+koNAg== X-Received: by 2002:a63:8f08:: with SMTP id n8mr10519826pgd.9.1597673548863; Mon, 17 Aug 2020 07:12:28 -0700 (PDT) Received: from ?IPv6:2605:e000:100e:8c61:ff2c:a74f:a461:daa2? ([2605:e000:100e:8c61:ff2c:a74f:a461:daa2]) by smtp.gmail.com with ESMTPSA id fv23sm17465333pjb.35.2020.08.17.07.12.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Aug 2020 07:12:28 -0700 (PDT) Subject: Re: [PATCH 2/2] block: fix ioprio_get/set(IOPRIO_WHO_PGRP) vs setuid(2) To: Davidlohr Bueso , akpm@linux-foundation.org Cc: oleg@redhat.com, linux-kernel@vger.kernel.org, Greg Thelen , Davidlohr Bueso References: <20200817003148.23691-1-dave@stgolabs.net> <20200817003148.23691-3-dave@stgolabs.net> From: Jens Axboe Message-ID: <2741d70f-31a9-3f8f-d74d-ce3de4c1bd3d@kernel.dk> Date: Mon, 17 Aug 2020 07:12:26 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200817003148.23691-3-dave@stgolabs.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/16/20 5:31 PM, Davidlohr Bueso wrote: > do_each_pid_thread(PIDTYPE_PGID) can race with a concurrent > change_pid(PIDTYPE_PGID) that can move the task from one hlist > to another while iterating. Serialize ioprio_get/set to take > the tasklist_lock in this case. LGTM: Reviewed-by: Jens Axboe -- Jens Axboe