Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10786689imu; Thu, 6 Dec 2018 06:49:14 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vdms1sMELOCqO0VPiG/1LAysK7S4xJdAFZEn0HhnFoqPTcvzBsFu0UTUmY7BBPVwBGEiM2 X-Received: by 2002:a63:d104:: with SMTP id k4mr24092435pgg.227.1544107753988; Thu, 06 Dec 2018 06:49:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544107753; cv=none; d=google.com; s=arc-20160816; b=rbx/jFFMo812VjjNA0KIkignOVyWNAR6I5VEW2PCAzpf6/XLDQb+FdhONy+Sky71AF fcpyJRzzI4cYn3MP2tKrekOal/aoc9eGmM9blZBU9ah/BlTF57xB1EMaoOFH+hB0HEf4 wChMsPbcQJvbCZoGzbeXkY1SH1hEJaxbHz2gZK+hB5eksLoTUl9rJmLqsTDrkWAPbxFx 1XP8RfqX82Va3xqWGcLa4TJfwTDkGu6rfaczu6oL+uPHmeHgJV63OY/xzmCkS++zSX0c kDKr2Vcf83a1UFUz4zh8usCkgy8g0FKkY05N+xnaZvaB7VMtSuXUmMfqnE+8kYdAvkxS Fiog== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7LVVyRFCT2xhkgrIuW/gQDuwhNbstjZq5WSRyfjY3Iw=; b=CQM6oeiuJMnzTasmH15Nu1zESPrq9Mn77GnIWsfoyHSsxeJ9NYwHYUv3SRxO3gAkbA bV9uBnGIewn91bjcf3u3e9EjBjB6PoJlcKNgcdgqlLTRVdCNYEIztGgP2IbOf+J599/o QTfOSV8ZE/GaRpNc0KKs67s3fRNruJeKoffy2wJiXDUJyj1bl03auLGQrsRspw4wfuxQ AB+uNA19BXqjANMpPXx4SRPXyLEVVem//jW40ZBss1f9TWkEt5g2leW7+evdFKPA1oQi yvtn0TVsfjFJEIxEaye5EAoV30ARZmWBKAQLXQGM62LRwYeXUd1bN73A8Trk63nG7Ss3 BvOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HXZOJ6n4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r25si453398pfk.28.2018.12.06.06.48.58; Thu, 06 Dec 2018 06:49:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HXZOJ6n4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731155AbeLFOpw (ORCPT + 99 others); Thu, 6 Dec 2018 09:45:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:50540 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730625AbeLFOpu (ORCPT ); Thu, 6 Dec 2018 09:45:50 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 E5BFC20661; Thu, 6 Dec 2018 14:45:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544107549; bh=FYRap+lsLgoCN6FIe3il7/Yt7+4UAyjg3gOMucrhRsA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HXZOJ6n4fhcMIhmMEzUMhcynTF1WtcjbRomuFXFa4Q/YvkZncnlEcebCJI6/1hkK8 Ine3nsYCcT7dWSNXqMZtXbpHgxQ5copTbmMQse+BBjxAsXK6WvuzTq2K2B7K6k/OXW bePMJ6g7GvKMDt7q2vrcJ0MW1LqCdevXA3nWi5xw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ilya Dryomov , Sage Weil , Ben Hutchings Subject: [PATCH 4.9 049/101] libceph: no need to drop con->mutex for ->get_authorizer() Date: Thu, 6 Dec 2018 15:38:48 +0100 Message-Id: <20181206143014.373934330@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181206143011.174892052@linuxfoundation.org> References: <20181206143011.174892052@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ilya Dryomov commit b3bbd3f2ab19c8ca319003b4b51ce4c4ca74da06 upstream. ->get_authorizer(), ->verify_authorizer_reply(), ->sign_message() and ->check_message_signature() shouldn't be doing anything with or on the connection (like closing it or sending messages). Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil Signed-off-by: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- net/ceph/messenger.c | 6 ------ 1 file changed, 6 deletions(-) --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -1405,15 +1405,9 @@ static struct ceph_auth_handshake *get_c return NULL; } - /* Can't hold the mutex while getting authorizer */ - mutex_unlock(&con->mutex); auth = con->ops->get_authorizer(con, auth_proto, con->auth_retry); - mutex_lock(&con->mutex); - if (IS_ERR(auth)) return auth; - if (con->state != CON_STATE_NEGOTIATING) - return ERR_PTR(-EAGAIN); con->auth_reply_buf = auth->authorizer_reply_buf; con->auth_reply_buf_len = auth->authorizer_reply_buf_len;