Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 386A9C433E0 for ; Tue, 22 Dec 2020 08:37:46 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E0AC923124 for ; Tue, 22 Dec 2020 08:37:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E0AC923124 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1krdAu-00076i-Qj; Tue, 22 Dec 2020 08:37:44 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krdAt-00076a-Cu for linux-f2fs-devel@lists.sourceforge.net; Tue, 22 Dec 2020 08:37:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=XeYzdcnK4bFGJi08eL7k/TLSySz4w6ynEbwlADKNEfo=; b=C4Wsrag07TYeWVVa9vzMuf/i98 /XsOCNh47T41LkASAVxYXUttz8zN2gWY7I9YNIeS87MQ/KBs3Hsh0YORiSOE5hloqHte2eLMd6YQC AVQfzQBMexo9dnaaDyWc+/SwxQXTbYLLrJiVMqcjQcnh3/uV3ZauyPlJ2B15IcJO/ifk=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=XeYzdcnK4bFGJi08eL7k/TLSySz4w6ynEbwlADKNEfo=; b=BsC1LusBxpDRQ6caltgW2MOTa/ YvUCPU10Lz/fkQdY6Ox4sle/gxiX8O5DtTa3pf1j4FhiHATA9mnpd7mWoa3JPgiObU8YXzB5wrI+G D2AnTBjf6muon+Dzn248yEBZhJmAdKgoC774uriKTi67cN2Zv7nnMY0mtxiIdkQgABw8=; Received: from mail.kernel.org ([198.145.29.99]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1krdAi-004X3B-L6 for linux-f2fs-devel@lists.sourceforge.net; Tue, 22 Dec 2020 08:37:42 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4F4AE2311D; Tue, 22 Dec 2020 08:37:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1608626247; bh=stkMh7FJ6FU8kEP1dNSuT0B/g6w9Qq0a2Swr+htqh2E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Glts+qCil5itaTf6R5whDJguoBs2jo6HoyeeO73R5AG6a8tBJNTjzp5AAH9awZEpB NvDya/nGEm54QOv7l7ZTW4atuUR2ymkr7suGj0hLS1BawmG4yoJaaA4Q2LlrHYMDSb KeU5QfYbHHmviDy+rukkcGBSaHwPsY9wqNs+Esnw= Date: Tue, 22 Dec 2020 09:37:23 +0100 From: Greg KH To: Chao Yu Message-ID: References: <20201222011634.124180-1-yuchao0@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Headers-End: 1krdAi-004X3B-L6 Subject: Re: [f2fs-dev] [PATCH 5.10.y] f2fs: fix to seek incorrect data offset in inline data file X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jaegeuk@kernel.org, kitestramuort , stable@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Tue, Dec 22, 2020 at 09:36:35AM +0100, Greg KH wrote: > On Tue, Dec 22, 2020 at 09:16:34AM +0800, Chao Yu wrote: > > As kitestramuort reported: > > > > F2FS-fs (nvme0n1p4): access invalid blkaddr:1598541474 > > [ 25.725898] ------------[ cut here ]------------ > > [ 25.725903] WARNING: CPU: 6 PID: 2018 at f2fs_is_valid_blkaddr+0x23a/0x250 > > [ 25.725923] Call Trace: > > [ 25.725927] ? f2fs_llseek+0x204/0x620 > > [ 25.725929] ? ovl_copy_up_data+0x14f/0x200 > > [ 25.725931] ? ovl_copy_up_inode+0x174/0x1e0 > > [ 25.725933] ? ovl_copy_up_one+0xa22/0xdf0 > > [ 25.725936] ? ovl_copy_up_flags+0xa6/0xf0 > > [ 25.725938] ? ovl_aio_cleanup_handler+0xd0/0xd0 > > [ 25.725939] ? ovl_maybe_copy_up+0x86/0xa0 > > [ 25.725941] ? ovl_open+0x22/0x80 > > [ 25.725943] ? do_dentry_open+0x136/0x350 > > [ 25.725945] ? path_openat+0xb7e/0xf40 > > [ 25.725947] ? __check_sticky+0x40/0x40 > > [ 25.725948] ? do_filp_open+0x70/0x100 > > [ 25.725950] ? __check_sticky+0x40/0x40 > > [ 25.725951] ? __check_sticky+0x40/0x40 > > [ 25.725953] ? __x64_sys_openat+0x1db/0x2c0 > > [ 25.725955] ? do_syscall_64+0x2d/0x40 > > [ 25.725957] ? entry_SYSCALL_64_after_hwframe+0x44/0xa9 > > > > llseek() reports invalid block address access, the root cause is if > > file has inline data, f2fs_seek_block() will access inline data regard > > as block address index in inode block, which should be wrong, fix it. > > > > Fixes: 788e96d1d3994 ("f2fs: code cleanup by removing unnecessary check") > > Fixes: 267378d4de69 ("f2fs: introduce f2fs_seek_block to support SEEK_{DATA, HOLE} in llseek") > > Cc: stable # 3.16+ > > Reported-by: kitestramuort > > Signed-off-by: Chao Yu > > Signed-off-by: Jaegeuk Kim > > --- > > > > This will cause boot failure in f2fs image, which was reported in gentoo > > community, I'd like to fix them in stable kernel 5.10 first as request in > > bugzilla: > > > > https://bugzilla.kernel.org/show_bug.cgi?id=210825 > > > > This is not the correct way to submit patches for inclusion in the > stable kernel tree. Please read: > https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html > for how to do this properly. > > Specifically, what is the git commit id of this patch in Linus's tree? thanks, greg k-h _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel