From patchwork Wed Dec 6 17:54:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10096713 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DD6E960210 for ; Wed, 6 Dec 2017 17:54:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D06B528533 for ; Wed, 6 Dec 2017 17:54:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C398428950; Wed, 6 Dec 2017 17:54:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56FC728533 for ; Wed, 6 Dec 2017 17:54:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752071AbdLFRyH (ORCPT ); Wed, 6 Dec 2017 12:54:07 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:48542 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752034AbdLFRyH (ORCPT ); Wed, 6 Dec 2017 12:54:07 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.21/8.16.0.21) with SMTP id vB6Hpl8B129320; Wed, 6 Dec 2017 17:54:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2017-10-26; bh=sGgD7P9T2eIgFhIxcGCZnK0iyhaQWjlsBKkYQtft9cg=; b=TaV5DyFnYoNdh9jJyzdTacNWDP4ihAQVQWgTvoBw6RNqcfK7eOC4dHB1KMqST4wp7qZP qpxS/KbFpIOCjKPLq9OS2vBZmhj3U0CMpg0NuBpLKLJQuYoP7WUgD7qD6l8Tb+a0w6TN warNivZpihtcwm2Tt2pM8VFAq0d91hMFSpd9VgQ11Fjp9D+d+aZcTMCu5wMT3p8QuJ0q TA6lH9xzNGEFJGHi+Mb6rkvFi+bd105oK5RdqnCBXoy2f13lf4wUGPqp09FC0z9akhHJ rXd8AdvwwhEEHLPKPPRtWYpsnq27QeEyX5dYdh2vivaMii0PnIx6mY08kehovI5CkuwA yA== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2epct9a84y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Dec 2017 17:54:04 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id vB6Hs3R1026294 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 6 Dec 2017 17:54:04 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id vB6Hs3rf005910; Wed, 6 Dec 2017 17:54:03 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 06 Dec 2017 09:54:03 -0800 Date: Wed, 6 Dec 2017 09:54:01 -0800 From: "Darrick J. Wong" To: Eric Sandeen Cc: xfs Subject: [PATCH] libhandle: zap fdhash_head in fshandle_destroy Message-ID: <20171206175401.GK19219@magnolia> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8737 signatures=668643 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=2 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1712060255 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Set fdhash_head to zero once we've destroyed the handle list to avoid dangling pointer problems. Signed-off-by: Darrick J. Wong --- libhandle/handle.c | 1 + 1 file changed, 1 insertion(+) -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" 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/libhandle/handle.c b/libhandle/handle.c index e6971dd..878d14d 100644 --- a/libhandle/handle.c +++ b/libhandle/handle.c @@ -73,6 +73,7 @@ fshandle_destroy(void) free(h); h = nexth; } + fdhash_head = NULL; } int