Message ID | 20200324130815.919902714@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=FSPt=5J=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E9E0C43331 for <stable@archiver.kernel.org>; Tue, 24 Mar 2020 13:31:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 664D42076E for <stable@archiver.kernel.org>; Tue, 24 Mar 2020 13:31:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585056667; bh=9SZ6H8OtV/t5OwamSNzqhZZxFhLVRQt2dlOqOJNBvZA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=1E5ZsxpcCAwPtIY+mlC2HscH+1DAIKJPW/VYqV6jznNnPIc7zO6PhCFlSJTP4dkCK IOPHwJ4wDUKhwyYmMHNzAE4Qb2hT82N2BdXusbj3iqAOfJwSkXwFEyD4ym4jJPfBWC T3XziTe5hK1Kq3YJwIczZpPPM9RZJNQFw1EPn45o= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728863AbgCXNU6 (ORCPT <rfc822;stable@archiver.kernel.org>); Tue, 24 Mar 2020 09:20:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:42458 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728975AbgCXNUz (ORCPT <rfc822;stable@vger.kernel.org>); Tue, 24 Mar 2020 09:20:55 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9DE1220870; Tue, 24 Mar 2020 13:20:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585056054; bh=9SZ6H8OtV/t5OwamSNzqhZZxFhLVRQt2dlOqOJNBvZA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oLYdJ2L7rhIRl5JVCItv3cvwoG9DIDEnNP4MPlt0fOnTRwx5wIZ9Dq63r94IEGjoW 4YEZGbj0pQTLk8pUEFVEg2aUSf093wrJlNVumWEHLbLpA3eMkVbo9LOjEU3ikP6qLw H0Y/8XfO9F06MbS7i04vW3xUr8LBsrp2daSt8PUA= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Max Neunhoeffer <max@arangodb.com>, Roman Penyaev <rpenyaev@suse.de>, Andrew Morton <akpm@linux-foundation.org>, Jakub Kicinski <kuba@kernel.org>, Christopher Kohlhoff <chris.kohlhoff@clearpool.io>, Davidlohr Bueso <dbueso@suse.de>, Jason Baron <jbaron@akamai.com>, Jes Sorensen <jes.sorensen@gmail.com>, Linus Torvalds <torvalds@linux-foundation.org> Subject: [PATCH 5.4 089/102] epoll: fix possible lost wakeup on epoll_ctl() path Date: Tue, 24 Mar 2020 14:11:21 +0100 Message-Id: <20200324130815.919902714@linuxfoundation.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200324130806.544601211@linuxfoundation.org> References: <20200324130806.544601211@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -1881,9 +1881,9 @@ fetch_events: waiter = true; init_waitqueue_entry(&wait, current); - spin_lock_irq(&ep->wq.lock); + write_lock_irq(&ep->lock); __add_wait_queue_exclusive(&ep->wq, &wait); - spin_unlock_irq(&ep->wq.lock); + write_unlock_irq(&ep->lock); } for (;;) { @@ -1931,9 +1931,9 @@ send_events: goto fetch_events; if (waiter) { - spin_lock_irq(&ep->wq.lock); + write_lock_irq(&ep->lock); __remove_wait_queue(&ep->wq, &wait); - spin_unlock_irq(&ep->wq.lock); + write_unlock_irq(&ep->lock); } return res;