From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01096FA3740 for ; Fri, 28 Oct 2022 21:07:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229845AbiJ1VHI (ORCPT ); Fri, 28 Oct 2022 17:07:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229608AbiJ1VHG (ORCPT ); Fri, 28 Oct 2022 17:07:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B6BC1EF063; Fri, 28 Oct 2022 14:07:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id ECE9A629FD; Fri, 28 Oct 2022 21:07:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43CFAC433C1; Fri, 28 Oct 2022 21:07:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1666991224; bh=Khkhhr3Xr8CoKRr9o9ibUerqO0sYT1phGP08HDyNrNE=; h=Date:To:From:Subject:From; b=BwryuVlsAgGN8JrmH682qGXP0sWgAT8NOLPpf1XDArYpBoXRBhCuWpjpBk9Vd5N0l o8APZwLVInQOr0kz+nHQ807J9OQWSavMBRNKa0ExPz0svIi/MG8m3io3Nxa2ESezGm axEiVflbGG/NzK9PEf+eJGsQ0MhJkhk+RsoIggb4= Date: Fri, 28 Oct 2022 14:07:03 -0700 To: mm-commits@vger.kernel.org, stable@vger.kernel.org, srw@sladewatkins.net, regressions@leemhuis.info, mirsad.todorovac@alu.unizg.hr, marcmiltenberger@gmail.com, hsinyi@chromium.org, dimitri.ledkov@canonical.com, bagasdotme@gmail.com, phillip@squashfs.org.uk, akpm@linux-foundation.org From: Andrew Morton Subject: [merged mm-hotfixes-stable] squashfs-fix-buffer-release-race-condition-in-readahead-code.patch removed from -mm tree Message-Id: <20221028210704.43CFAC433C1@smtp.kernel.org> Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The quilt patch titled Subject: squashfs: fix buffer release race condition in readahead code has been removed from the -mm tree. Its filename was squashfs-fix-buffer-release-race-condition-in-readahead-code.patch This patch was dropped because it was merged into the mm-hotfixes-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: Phillip Lougher Subject: squashfs: fix buffer release race condition in readahead code Date: Thu, 20 Oct 2022 23:36:16 +0100 Fix a buffer release race condition, where the error value was used after release. Link: https://lkml.kernel.org/r/20221020223616.7571-4-phillip@squashfs.org.uk Fixes: b09a7a036d20 ("squashfs: support reading fragments in readahead call") Signed-off-by: Phillip Lougher Tested-by: Bagas Sanjaya Reported-by: Marc Miltenberger Cc: Dimitri John Ledkov Cc: Hsin-Yi Wang Cc: Mirsad Goran Todorovac Cc: Slade Watkins Cc: Thorsten Leemhuis Cc: Signed-off-by: Andrew Morton --- --- a/fs/squashfs/file.c~squashfs-fix-buffer-release-race-condition-in-readahead-code +++ a/fs/squashfs/file.c @@ -506,8 +506,9 @@ static int squashfs_readahead_fragment(s squashfs_i(inode)->fragment_size); struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info; unsigned int n, mask = (1 << (msblk->block_log - PAGE_SHIFT)) - 1; + int error = buffer->error; - if (buffer->error) + if (error) goto out; expected += squashfs_i(inode)->fragment_offset; @@ -529,7 +530,7 @@ static int squashfs_readahead_fragment(s out: squashfs_cache_put(buffer); - return buffer->error; + return error; } static void squashfs_readahead(struct readahead_control *ractl) _ Patches currently in -mm which might be from phillip@squashfs.org.uk are