From patchwork Wed May 18 20:27:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Schutt X-Patchwork-Id: 795022 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4IKSYBK012632 for ; Wed, 18 May 2011 20:28:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753057Ab1ERU2d (ORCPT ); Wed, 18 May 2011 16:28:33 -0400 Received: from sentry-two.sandia.gov ([132.175.109.14]:34249 "EHLO sentry-two.sandia.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752532Ab1ERU2c (ORCPT ); Wed, 18 May 2011 16:28:32 -0400 X-WSS-ID: 0LLERJH-0B-3FL-02 X-M-MSG: Received: from interceptor1.sandia.gov (interceptor1.sandia.gov [132.175.109.5]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sentry-two.sandia.gov (Postfix) with ESMTP id 16CD8173A13; Wed, 18 May 2011 14:28:28 -0600 (MDT) Received: from sentry.sandia.gov (sentry.sandia.gov [132.175.109.21]) by interceptor1.sandia.gov (RSA Interceptor); Wed, 18 May 2011 14:20:41 -0600 Received: from [132.175.109.1] by sentry.sandia.gov with ESMTP (SMTP Relay 01 (Email Firewall v6.3.2)); Wed, 18 May 2011 14:28:05 -0600 X-Server-Uuid: AF72F651-81B1-4134-BA8C-A8E1A4E620FF Received: from mail.sandia.gov (exch03.sandia.gov [134.253.103.3] (may be forged)) by mailgate.sandia.gov (8.14.4/8.14.4) with ESMTP id p4IKRmbj029036; Wed, 18 May 2011 14:27:48 -0600 Received: from [134.253.4.20] (134.253.95.179) by mail.sandia.gov ( 134.253.103.3) with Microsoft SMTP Server (TLS) id 14.1.270.1; Wed, 18 May 2011 14:28:04 -0600 Message-ID: <4DD42BCF.8070909@sandia.gov> Date: Wed, 18 May 2011 14:27:59 -0600 From: "Jim Schutt" User-Agent: Thunderbird 2.0.0.24 (X11/20110128) MIME-Version: 1.0 To: "Sage Weil" cc: ceph-devel@vger.kernel.org Subject: Re: [PATCH 2/2] libceph: fix handle_timeout() racing with con_work()/try_write() References: <1305235954-9860-2-git-send-email-jaschut@sandia.gov> <4DD2F773.30508@sandia.gov> In-Reply-To: X-Originating-IP: [134.253.95.179] X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2011.5.18.201819 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1000_LESS 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_600_699 0, BODY_SIZE_7000_LESS 0, DATE_TZ_NA 0, NO_URI_FOUND 0, WEBMAIL_SOURCE 0, WEBMAIL_XOIP 0, WEBMAIL_X_IP_HDR 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __HAS_XOIP 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MOZILLA_MSGID 0, __RATWARE_X_MAILER_CS_B 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __USER_AGENT 0' X-TMWD-Spam-Summary: TS=20110518202806; ID=1; SEV=2.3.1; DFV=B2011051820; IFV=NA; AIF=B2011051820; RPD=5.03.0010; ENG=NA; RPDID=7374723D303030312E30413031303230332E34444434324244362E303035443A534346535441543838363133332C73733D312C6667733D30; CAT=NONE; CON=NONE; SIG=AAAAAAAAAAAAAAAAAAAAAAAAfQ== X-MMS-Spam-Filter-ID: B2011051820_5.03.0010 X-WSS-ID: 61CAF45F2TS3997201-01-01 X-RSA-Inspected: yes X-RSA-Classifications: public X-RSA-Action: allow Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 18 May 2011 20:28:34 +0000 (UTC) Sage Weil wrote: > > I pushed a patch to the msgr_race branch that catches all four cases (I > think). Does the fix make sense given what you saw? Sorry, I haven't completed much testing; it took me a while to figure out the fix needs this: Still testing.... Thanks -- Jim > > Thanks! > sage > --- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 9c0a9bd..b140dd3 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -2013,6 +2013,7 @@ done: mutex_unlock(&con->mutex); done_unlocked: con->ops->put(con); + return; fault: mutex_unlock(&con->mutex);