Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:5.10 commit in: /
Date: Sat, 26 Dec 2020 15:32:45
Message-Id: 1608996743.ea100a00540a07717d77258086cc0c7ae5961b9c.mpagano@gentoo
1 commit: ea100a00540a07717d77258086cc0c7ae5961b9c
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 26 15:32:23 2020 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 26 15:32:23 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=ea100a00
7
8 Remove redundant f2fs patch.
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 --
13 1900_f2fs-seek-data-offset-inline-data.patch | 65 ----------------------------
14 2 files changed, 69 deletions(-)
15
16 diff --git a/0000_README b/0000_README
17 index 290bc2e..025c3da 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -63,10 +63,6 @@ Patch: 1510_fs-enable-link-security-restrictions-by-default.patch
21 From: http://sources.debian.net/src/linux/3.16.7-ckt4-3/debian/patches/debian/fs-enable-link-security-restrictions-by-default.patch/
22 Desc: Enable link security restrictions by default.
23
24 -Patch: 1900_f2fs-seek-data-offset-inline-data.patch
25 -From: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=7a6e59d719ef0ec9b3d765cba3ba98ee585cbde3
26 -Desc: f2fs: fix to seek incorrect data offset in inline data file
27 -
28 Patch: 2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch
29 From: https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-marcel@××××××××.org/raw
30 Desc: Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. See bug #686758
31
32 diff --git a/1900_f2fs-seek-data-offset-inline-data.patch b/1900_f2fs-seek-data-offset-inline-data.patch
33 deleted file mode 100644
34 index 28b00eb..0000000
35 --- a/1900_f2fs-seek-data-offset-inline-data.patch
36 +++ /dev/null
37 @@ -1,65 +0,0 @@
38 -From 7a6e59d719ef0ec9b3d765cba3ba98ee585cbde3 Mon Sep 17 00:00:00 2001
39 -From: Chao Yu <yuchao0@××××××.com>
40 -Date: Mon, 2 Nov 2020 17:36:58 +0800
41 -Subject: f2fs: fix to seek incorrect data offset in inline data file
42 -
43 -As kitestramuort reported:
44 -
45 -F2FS-fs (nvme0n1p4): access invalid blkaddr:1598541474
46 -[ 25.725898] ------------[ cut here ]------------
47 -[ 25.725903] WARNING: CPU: 6 PID: 2018 at f2fs_is_valid_blkaddr+0x23a/0x250
48 -[ 25.725923] Call Trace:
49 -[ 25.725927] ? f2fs_llseek+0x204/0x620
50 -[ 25.725929] ? ovl_copy_up_data+0x14f/0x200
51 -[ 25.725931] ? ovl_copy_up_inode+0x174/0x1e0
52 -[ 25.725933] ? ovl_copy_up_one+0xa22/0xdf0
53 -[ 25.725936] ? ovl_copy_up_flags+0xa6/0xf0
54 -[ 25.725938] ? ovl_aio_cleanup_handler+0xd0/0xd0
55 -[ 25.725939] ? ovl_maybe_copy_up+0x86/0xa0
56 -[ 25.725941] ? ovl_open+0x22/0x80
57 -[ 25.725943] ? do_dentry_open+0x136/0x350
58 -[ 25.725945] ? path_openat+0xb7e/0xf40
59 -[ 25.725947] ? __check_sticky+0x40/0x40
60 -[ 25.725948] ? do_filp_open+0x70/0x100
61 -[ 25.725950] ? __check_sticky+0x40/0x40
62 -[ 25.725951] ? __check_sticky+0x40/0x40
63 -[ 25.725953] ? __x64_sys_openat+0x1db/0x2c0
64 -[ 25.725955] ? do_syscall_64+0x2d/0x40
65 -[ 25.725957] ? entry_SYSCALL_64_after_hwframe+0x44/0xa9
66 -
67 -llseek() reports invalid block address access, the root cause is if
68 -file has inline data, f2fs_seek_block() will access inline data regard
69 -as block address index in inode block, which should be wrong, fix it.
70 -
71 -Reported-by: kitestramuort <kitestramuort@×××××××××.org>
72 -Signed-off-by: Chao Yu <yuchao0@××××××.com>
73 -Signed-off-by: Jaegeuk Kim <jaegeuk@××××××.org>
74 ----
75 - fs/f2fs/file.c | 11 ++++++++---
76 - 1 file changed, 8 insertions(+), 3 deletions(-)
77 -
78 -diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
79 -index ee861c6d9ff02..fe39e591e5b4c 100644
80 ---- a/fs/f2fs/file.c
81 -+++ b/fs/f2fs/file.c
82 -@@ -412,9 +412,14 @@ static loff_t f2fs_seek_block(struct file *file, loff_t offset, int whence)
83 - goto fail;
84 -
85 - /* handle inline data case */
86 -- if (f2fs_has_inline_data(inode) && whence == SEEK_HOLE) {
87 -- data_ofs = isize;
88 -- goto found;
89 -+ if (f2fs_has_inline_data(inode)) {
90 -+ if (whence == SEEK_HOLE) {
91 -+ data_ofs = isize;
92 -+ goto found;
93 -+ } else if (whence == SEEK_DATA) {
94 -+ data_ofs = offset;
95 -+ goto found;
96 -+ }
97 - }
98 -
99 - pgofs = (pgoff_t)(offset >> PAGE_SHIFT);
100 ---
101 -cgit 1.2.3-1.el7
102 -