Message ID | xm26h6y8mbvo.fsf@google.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3071179wrr; Tue, 6 Dec 2022 14:03:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf4k+mFZYiEV+ZpqtJTwmhLK4u0U0MeOtQWmCQ5VxVaNobX8F8fO0LUFn9gjS4P6v8NlVM0+ X-Received: by 2002:a17:906:b04c:b0:78d:9b0a:7b0b with SMTP id bj12-20020a170906b04c00b0078d9b0a7b0bmr73992932ejb.197.1670364214401; Tue, 06 Dec 2022 14:03:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670364214; cv=none; d=google.com; s=arc-20160816; b=F+0SsPWDAweNAb+MpUt93dhd6NC7hKJ1j70hvQ/sYqYLhlT6ujwSXEAG968bH5sUx/ 2g2NEc2QY6k8afYCEyvYvxy+PDYQTYbLKY9UIEOMK9dDf8kBkNCEwR1nE5rPMMQQ7vx5 iOi16ZZpN5D1z5rjUdR1RSdxvgJOph7d+1RkaNhaxTTH1M2OvXIt98Y4AeOa/ecuKHpi YgROX2tayXGtADwhjWyFTmaVzL6mElNpXzt+PjACBGf+7+m9Gqjvk/VmRgAV1QxqSZ1P vIer9p8Sv/luSL5lZ/VW4lynX05Aw8i7if1SBZj262j/iCTfWOjZqByLsJSKMXiGv1F7 VCKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:date:subject :cc:to:from:dkim-signature; bh=4sS3/Bfwt7TvEDXuu7/He/mgRn4IfxDIex6g4PACeMk=; b=sqHtHHrre3ZwnJyaZr/SK+cdd4Cu1eHvLJZ/3Hczapgfg7TjxsbWk9JyZPiM6Xqils U29RXnizeS/ycENNAMDK5gFMy7w3bR0lnkrFcIeSO0TPQ3cNaYqAb+Cgn846wcvs+LUK Ip+LtQWSYXNRy0w0pFkHefbb3qVKYvreOlKZvPOwn08VypCh5ZLkWkppex3L4cA5qRnw zCB5jGGUfPGyLlQBZCPEyFv9AA8CwEbkyfNO8WXgctAh7jfmlcfMhBZiayGEUTE09Uxx SS5jrmIu2bCGyBTwWGCitj5nwloNoi+rIVkV6T9gQajPlOScAYwV41MEFmUblk299G6h fJQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=pQO92IjQ; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f21-20020a056402069500b0046baa297047si2514709edy.361.2022.12.06.14.02.51; Tue, 06 Dec 2022 14:03:34 -0800 (PST) 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=@google.com header.s=20210112 header.b=pQO92IjQ; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229642AbiLFWAB (ORCPT <rfc822;b08248@gmail.com> + 99 others); Tue, 6 Dec 2022 17:00:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229700AbiLFV77 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 6 Dec 2022 16:59:59 -0500 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19745442DF for <linux-kernel@vger.kernel.org>; Tue, 6 Dec 2022 13:59:59 -0800 (PST) Received: by mail-pl1-x62b.google.com with SMTP id m4so8348953pls.4 for <linux-kernel@vger.kernel.org>; Tue, 06 Dec 2022 13:59:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:user-agent:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=4sS3/Bfwt7TvEDXuu7/He/mgRn4IfxDIex6g4PACeMk=; b=pQO92IjQKB+SOGPWNMh0aE4nFKYW/Pn7ZUmkjc6/P+o83c6xL7XPGkrAZulj5NphgB Lij1XDxyRTjH5mDYKYtI0WFyLdUgQLunyYR6cQe/KQIUUfvNDrZWf7yjWgxeEscz0IeY pnXDqMvKu8dVpe2ItbrqisZY3O6L5+S6OsFvcV4qkZKhXoACvAFJQSKNoMOwWxy4Rczn sxJJvrDUIz/dNZRLF/o+U9fPFTW7Nc0wMeXzzXMQC4DqsOfB3HlwMo1iyHy8JuIXDcOZ RvU7vP0CUuNxQLGHaKAyN/MrJxVUw8cVtNXrn7SBIrCvJhq09ZuJf6zyWaVaxDVBFJFL 0Hjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4sS3/Bfwt7TvEDXuu7/He/mgRn4IfxDIex6g4PACeMk=; b=2NQ5WobmunjMD40PDcucQ/kIK/yOqzIJjnaXvYHQBolz2mR9LJDg3UQDCLQkYr5V6r p9XUjoH6CbAsVLb+jWWtAjgbBrD0WZO3SOBpGCsAv+1kvBqVmqKkxe5GD1WEFg34XgOf vIYTk7IAtckhhn8ORgY8fo3ySZmcCtL435oEEqBiGnFaqcqrzPmk5vyXDYO6SmhQCDI5 RznEQApmcaUC/d3U1ikNlwvwbp92zBA713HRCaLQN4hp0UoxxcwXMoTwPFdtZr9E5RS7 6wVWSGNRZKX9kgrjs2+ua5s/eUVFDxUXVqWmSc8b7l9wWwi+LtJj6hq4lh6AhK+xvCyn SY0Q== X-Gm-Message-State: ANoB5pltn7kqFaTdCYWIjsETSXST2Vwculv12qPtsNUDuftXtsaPOpAY 5HrYiz67cvG/DnvsDZu4xNPOHFP/mIvCD2bJ X-Received: by 2002:a17:902:bd83:b0:180:87d7:9be8 with SMTP id q3-20020a170902bd8300b0018087d79be8mr84987371pls.85.1670363998428; Tue, 06 Dec 2022 13:59:58 -0800 (PST) Received: from bsegall-glaptop.localhost (c-67-188-112-16.hsd1.ca.comcast.net. [67.188.112.16]) by smtp.gmail.com with ESMTPSA id iz21-20020a170902ef9500b001811a197797sm13055997plb.194.2022.12.06.13.59.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Dec 2022 13:59:56 -0800 (PST) From: Benjamin Segall <bsegall@google.com> To: Alexander Viro <viro@zeniv.linux.org.uk> Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH] epoll: ep_autoremove_wake_function should use list_del_init_careful Date: Tue, 06 Dec 2022 13:59:55 -0800 Message-ID: <xm26h6y8mbvo.fsf@google.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751503826437433404?= X-GMAIL-MSGID: =?utf-8?q?1751503826437433404?= |
Series |
epoll: ep_autoremove_wake_function should use list_del_init_careful
|
|
Commit Message
Benjamin Segall
Dec. 6, 2022, 9:59 p.m. UTC
autoremove_wake_function uses list_del_init_careful, so should epoll's
more aggressive variant. It only doesn't because it was copied from an
older wait.c rather than the most recent.
Fixes: a16ceb139610 ("epoll: autoremove wakers even more aggressively")
Signed-off-by: Ben Segall <bsegall@google.com>
Cc: stable@vger.kernel.org
---
fs/eventpoll.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 52954d4637b5..081df056398a 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -1756,11 +1756,11 @@ static struct timespec64 *ep_timeout_to_timespec(struct timespec64 *to, long ms) static int ep_autoremove_wake_function(struct wait_queue_entry *wq_entry, unsigned int mode, int sync, void *key) { int ret = default_wake_function(wq_entry, mode, sync, key); - list_del_init(&wq_entry->entry); + list_del_init_careful(&wq_entry->entry); return ret; } /** * ep_poll - Retrieves ready events, and delivers them to the caller-supplied