From patchwork Tue May 5 01:13:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11527971 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EC0661668 for ; Tue, 5 May 2020 01:13:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D541120658 for ; Tue, 5 May 2020 01:13:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="XMGbwLEb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726598AbgEEBNh (ORCPT ); Mon, 4 May 2020 21:13:37 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:50956 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727820AbgEEBNh (ORCPT ); Mon, 4 May 2020 21:13:37 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 04513eHI143279 for ; Tue, 5 May 2020 01:13:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=TsPpF9Qc+AxehQ8LV1RPcGhmIqVZsgoseLj0OIgDL5U=; b=XMGbwLEbXCZKju1a2+otmGz/88vP87ANRK7hsqV2cmmIfhgIGab9aWSzCplvIynjgwYY oORKIHPLBlV2tKWUhkO7P0uW9stii9z/G5YsYnL9YP2DPvocGYutWiDVwp6xB6iepvpO jGMqAbvbpLnECsoDrWTWSZgCx+L2X6oBxOuBeE4EsZjQ+1ae+6/sOOFjKUTz1oapaUEK Hv181ci4QYixiggVW7qGe5ag+IoU+O58/obEYcH1CNs3Tp18pcFQVSmnTW3a+zJF+AMk rSbzjgThhMjgWFMjbw92iQsNJWtlS9zbWjJ0Z8pR+2DRgOCYnct6G+M2RdMmtoLdERBu kw== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 30s09r2375-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 05 May 2020 01:13:36 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 04516qVX004597 for ; Tue, 5 May 2020 01:13:35 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3030.oracle.com with ESMTP id 30sjdru0px-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 05 May 2020 01:13:35 +0000 Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0451DYi7015514 for ; Tue, 5 May 2020 01:13:34 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 04 May 2020 18:13:33 -0700 Subject: [PATCH v2 0/3] xfs: fix inode use-after-free during log recovery From: "Darrick J. Wong" To: darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org Date: Mon, 04 May 2020 18:13:32 -0700 Message-ID: <158864121286.184729.5959003885146573075.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9611 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 mlxscore=0 bulkscore=1 adultscore=0 phishscore=0 mlxlogscore=895 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005050005 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9611 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 spamscore=0 adultscore=0 clxscore=1015 suspectscore=0 priorityscore=1501 malwarescore=0 mlxlogscore=940 phishscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005050005 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org Hi all, Fix a use-after-free during log recovery of deferred operations by creating explicit freeze and thaw mechanisms for deferred ops that were created while processing intent items that were recovered from the log. While we're at it, fix all the bogosity around how we gather up log intents during recovery and actually commit them to the filesystem. If you're going to start using this mess, you probably ought to just pull from my git trees, which are linked below. This is an extraordinary way to destroy everything. Enjoy! Comments and questions are, as always, welcome. --D kernel git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=fix-log-recovery xfsprogs git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=fix-log-recovery