From patchwork Tue Mar 29 18:04:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sage Weil X-Patchwork-Id: 671842 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2TI1fVS017620 for ; Tue, 29 Mar 2011 18:01:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753931Ab1C2SB3 (ORCPT ); Tue, 29 Mar 2011 14:01:29 -0400 Received: from cobra.newdream.net ([66.33.216.30]:47076 "EHLO cobra.newdream.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753920Ab1C2SB2 (ORCPT ); Tue, 29 Mar 2011 14:01:28 -0400 Received: from cobra.newdream.net (localhost [127.0.0.1]) by cobra.newdream.net (Postfix) with ESMTP id 744A1BC670; Tue, 29 Mar 2011 11:04:25 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=newdream.net; h=date:from:to:cc :subject:in-reply-to:message-id:references:mime-version: content-type; q=dns; s=newdream.net; b=iHfC97f1qkcS3raOCeCgswcLq UmkxA2gvjPkslRRfm0zB4ekyOWIVp+xol2XiLzElXr7BKnKDIN3LA0NqBCUnPSDl 8hpzA/PkTjIczdmKXZh5T+ykelIj7Kf+AljVEcY03zE+k07YJbO7NqmMzDQ1cndD VPh5vxJbV6FQRDsth4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=newdream.net; h=date:from :to:cc:subject:in-reply-to:message-id:references:mime-version: content-type; s=newdream.net; bh=Qrkehi9A2dZQdS/Jk+eZHD/sqKc=; b=HqWRAFHnXuwobQxVYcccWqsiawpgdScLzb10eKJgjpzC+t51nBFUKacpVDadn GzqIKGlpIrAVbhymrqB+OrhoX8PntRCKMLMNTmA3nTvFouTnbioFqzOP83PTnCOU CM8mjj4ZMlNN0vKtqSOF2cfLE3WCxTUMsfMlqbZS1zrUqs= Received: by cobra.newdream.net (Postfix, from userid 1031) id 5D93EBC715; Tue, 29 Mar 2011 11:04:25 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by cobra.newdream.net (Postfix) with ESMTP id 3EFDFBC670; Tue, 29 Mar 2011 11:04:25 -0700 (PDT) Date: Tue, 29 Mar 2011 11:04:25 -0700 (PDT) From: Sage Weil To: Henry Chang cc: ceph-devel Subject: Re: rbd: null pointer dereferenced during osd_reset In-Reply-To: Message-ID: References: MIME-Version: 1.0 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 (demeter1.kernel.org [140.211.167.41]); Tue, 29 Mar 2011 18:01:41 +0000 (UTC) diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 03740e8..3f957a6 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -837,8 +837,7 @@ static void __unregister_request(struct ceph_osd_client *osdc, dout("moving osd to %p lru\n", req->r_osd); __move_osd_to_lru(osdc, req->r_osd); } - if (list_empty(&req->r_osd_item) && - list_empty(&req->r_linger_item)) + if (list_empty(&req->r_linger_item)) req->r_osd = NULL; } @@ -883,7 +882,8 @@ static void __unregister_linger_request(struct ceph_osd_client *osdc, dout("moving osd to %p lru\n", req->r_osd); __move_osd_to_lru(osdc, req->r_osd); } - req->r_osd = NULL; + if (list_empty(&req->r_osd_item)) + req->r_osd == NULL; } }