1 |
commit: 528ea2240ee8582f8fa0ec2509721622f9150555 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Mar 17 10:46:33 2023 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 17 10:46:33 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=528ea224 |
7 |
|
8 |
Linux patch 4.19.278 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1277_linux-4.19.278.patch | 840 ++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 844 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index 217fc5fd..1f79849a 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -1151,6 +1151,10 @@ Patch: 1276_linux-4.19.277.patch |
21 |
From: https://www.kernel.org |
22 |
Desc: Linux 4.19.277 |
23 |
|
24 |
+Patch: 1277_linux-4.19.278.patch |
25 |
+From: https://www.kernel.org |
26 |
+Desc: Linux 4.19.278 |
27 |
+ |
28 |
Patch: 1500_XATTR_USER_PREFIX.patch |
29 |
From: https://bugs.gentoo.org/show_bug.cgi?id=470644 |
30 |
Desc: Support for namespace user.pax.* on tmpfs. |
31 |
|
32 |
diff --git a/1277_linux-4.19.278.patch b/1277_linux-4.19.278.patch |
33 |
new file mode 100644 |
34 |
index 00000000..63a633f5 |
35 |
--- /dev/null |
36 |
+++ b/1277_linux-4.19.278.patch |
37 |
@@ -0,0 +1,840 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index e00f4bbcd737c..a8104c8024a4d 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -1,7 +1,7 @@ |
43 |
+ # SPDX-License-Identifier: GPL-2.0 |
44 |
+ VERSION = 4 |
45 |
+ PATCHLEVEL = 19 |
46 |
+-SUBLEVEL = 277 |
47 |
++SUBLEVEL = 278 |
48 |
+ EXTRAVERSION = |
49 |
+ NAME = "People's Front" |
50 |
+ |
51 |
+diff --git a/arch/alpha/kernel/module.c b/arch/alpha/kernel/module.c |
52 |
+index 47632fa8c24e0..b169dc9a9ac17 100644 |
53 |
+--- a/arch/alpha/kernel/module.c |
54 |
++++ b/arch/alpha/kernel/module.c |
55 |
+@@ -158,10 +158,8 @@ apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab, |
56 |
+ base = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr; |
57 |
+ symtab = (Elf64_Sym *)sechdrs[symindex].sh_addr; |
58 |
+ |
59 |
+- /* The small sections were sorted to the end of the segment. |
60 |
+- The following should definitely cover them. */ |
61 |
+- gp = (u64)me->core_layout.base + me->core_layout.size - 0x8000; |
62 |
+ got = sechdrs[me->arch.gotsecindex].sh_addr; |
63 |
++ gp = got + 0x8000; |
64 |
+ |
65 |
+ for (i = 0; i < n; i++) { |
66 |
+ unsigned long r_sym = ELF64_R_SYM (rela[i].r_info); |
67 |
+diff --git a/arch/mips/include/asm/mach-rc32434/pci.h b/arch/mips/include/asm/mach-rc32434/pci.h |
68 |
+index 6f40d1515580b..1ff8a987025c8 100644 |
69 |
+--- a/arch/mips/include/asm/mach-rc32434/pci.h |
70 |
++++ b/arch/mips/include/asm/mach-rc32434/pci.h |
71 |
+@@ -377,7 +377,7 @@ struct pci_msu { |
72 |
+ PCI_CFG04_STAT_SSE | \ |
73 |
+ PCI_CFG04_STAT_PE) |
74 |
+ |
75 |
+-#define KORINA_CNFG1 ((KORINA_STAT<<16)|KORINA_CMD) |
76 |
++#define KORINA_CNFG1 (KORINA_STAT | KORINA_CMD) |
77 |
+ |
78 |
+ #define KORINA_REVID 0 |
79 |
+ #define KORINA_CLASS_CODE 0 |
80 |
+diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c |
81 |
+index e017f64e09d60..c8979f8cbce54 100644 |
82 |
+--- a/arch/x86/kernel/cpu/amd.c |
83 |
++++ b/arch/x86/kernel/cpu/amd.c |
84 |
+@@ -199,6 +199,15 @@ static void init_amd_k6(struct cpuinfo_x86 *c) |
85 |
+ return; |
86 |
+ } |
87 |
+ #endif |
88 |
++ /* |
89 |
++ * Work around Erratum 1386. The XSAVES instruction malfunctions in |
90 |
++ * certain circumstances on Zen1/2 uarch, and not all parts have had |
91 |
++ * updated microcode at the time of writing (March 2023). |
92 |
++ * |
93 |
++ * Affected parts all have no supervisor XSAVE states, meaning that |
94 |
++ * the XSAVEC instruction (which works fine) is equivalent. |
95 |
++ */ |
96 |
++ clear_cpu_cap(c, X86_FEATURE_XSAVES); |
97 |
+ } |
98 |
+ |
99 |
+ static void init_amd_k7(struct cpuinfo_x86 *c) |
100 |
+diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c |
101 |
+index 3b8218dd9bb14..979d130b24c42 100644 |
102 |
+--- a/drivers/gpu/drm/i915/intel_ringbuffer.c |
103 |
++++ b/drivers/gpu/drm/i915/intel_ringbuffer.c |
104 |
+@@ -1083,7 +1083,7 @@ int intel_ring_pin(struct intel_ring *ring, |
105 |
+ if (unlikely(ret)) |
106 |
+ return ret; |
107 |
+ |
108 |
+- if (i915_vma_is_map_and_fenceable(vma)) |
109 |
++ if (i915_vma_is_map_and_fenceable(vma) && !HAS_LLC(vma->vm->i915)) |
110 |
+ addr = (void __force *)i915_vma_pin_iomap(vma); |
111 |
+ else |
112 |
+ addr = i915_gem_object_pin_map(vma->obj, map); |
113 |
+@@ -1118,7 +1118,7 @@ void intel_ring_unpin(struct intel_ring *ring) |
114 |
+ /* Discard any unused bytes beyond that submitted to hw. */ |
115 |
+ intel_ring_reset(ring, ring->tail); |
116 |
+ |
117 |
+- if (i915_vma_is_map_and_fenceable(ring->vma)) |
118 |
++ if (i915_vma_is_map_and_fenceable(ring->vma) && !HAS_LLC(ring->vma->vm->i915)) |
119 |
+ i915_vma_unpin_iomap(ring->vma); |
120 |
+ else |
121 |
+ i915_gem_object_unpin_map(ring->vma->obj); |
122 |
+diff --git a/drivers/macintosh/windfarm_lm75_sensor.c b/drivers/macintosh/windfarm_lm75_sensor.c |
123 |
+index f48ad2445ed60..f5b1ac8347db7 100644 |
124 |
+--- a/drivers/macintosh/windfarm_lm75_sensor.c |
125 |
++++ b/drivers/macintosh/windfarm_lm75_sensor.c |
126 |
+@@ -35,8 +35,8 @@ |
127 |
+ #endif |
128 |
+ |
129 |
+ struct wf_lm75_sensor { |
130 |
+- int ds1775 : 1; |
131 |
+- int inited : 1; |
132 |
++ unsigned int ds1775 : 1; |
133 |
++ unsigned int inited : 1; |
134 |
+ struct i2c_client *i2c; |
135 |
+ struct wf_sensor sens; |
136 |
+ }; |
137 |
+diff --git a/drivers/macintosh/windfarm_smu_sensors.c b/drivers/macintosh/windfarm_smu_sensors.c |
138 |
+index 172fd267dcf60..0f4017a8189e5 100644 |
139 |
+--- a/drivers/macintosh/windfarm_smu_sensors.c |
140 |
++++ b/drivers/macintosh/windfarm_smu_sensors.c |
141 |
+@@ -275,8 +275,8 @@ struct smu_cpu_power_sensor { |
142 |
+ struct list_head link; |
143 |
+ struct wf_sensor *volts; |
144 |
+ struct wf_sensor *amps; |
145 |
+- int fake_volts : 1; |
146 |
+- int quadratic : 1; |
147 |
++ unsigned int fake_volts : 1; |
148 |
++ unsigned int quadratic : 1; |
149 |
+ struct wf_sensor sens; |
150 |
+ }; |
151 |
+ #define to_smu_cpu_power(c) container_of(c, struct smu_cpu_power_sensor, sens) |
152 |
+diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c |
153 |
+index aa9c0b7ee7a22..31b26b18e5251 100644 |
154 |
+--- a/drivers/media/i2c/ov5640.c |
155 |
++++ b/drivers/media/i2c/ov5640.c |
156 |
+@@ -2447,7 +2447,7 @@ static int ov5640_init_controls(struct ov5640_dev *sensor) |
157 |
+ /* Auto/manual gain */ |
158 |
+ ctrls->auto_gain = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_AUTOGAIN, |
159 |
+ 0, 1, 1, 1); |
160 |
+- ctrls->gain = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_GAIN, |
161 |
++ ctrls->gain = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_ANALOGUE_GAIN, |
162 |
+ 0, 1023, 1, 0); |
163 |
+ |
164 |
+ ctrls->saturation = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_SATURATION, |
165 |
+diff --git a/drivers/nfc/fdp/i2c.c b/drivers/nfc/fdp/i2c.c |
166 |
+index 7f143387b9ffc..64d16b195fc0a 100644 |
167 |
+--- a/drivers/nfc/fdp/i2c.c |
168 |
++++ b/drivers/nfc/fdp/i2c.c |
169 |
+@@ -263,6 +263,9 @@ static void fdp_nci_i2c_read_device_properties(struct device *dev, |
170 |
+ len, sizeof(**fw_vsc_cfg), |
171 |
+ GFP_KERNEL); |
172 |
+ |
173 |
++ if (!*fw_vsc_cfg) |
174 |
++ goto alloc_err; |
175 |
++ |
176 |
+ r = device_property_read_u8_array(dev, FDP_DP_FW_VSC_CFG_NAME, |
177 |
+ *fw_vsc_cfg, len); |
178 |
+ |
179 |
+@@ -276,6 +279,7 @@ vsc_read_err: |
180 |
+ *fw_vsc_cfg = NULL; |
181 |
+ } |
182 |
+ |
183 |
++alloc_err: |
184 |
+ dev_dbg(dev, "Clock type: %d, clock frequency: %d, VSC: %s", |
185 |
+ *clock_type, *clock_freq, *fw_vsc_cfg != NULL ? "yes" : "no"); |
186 |
+ } |
187 |
+diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c |
188 |
+index b3d6ea92b4f7c..2ffc2e15d822b 100644 |
189 |
+--- a/drivers/scsi/hosts.c |
190 |
++++ b/drivers/scsi/hosts.c |
191 |
+@@ -178,6 +178,7 @@ void scsi_remove_host(struct Scsi_Host *shost) |
192 |
+ scsi_forget_host(shost); |
193 |
+ mutex_unlock(&shost->scan_mutex); |
194 |
+ scsi_proc_host_rm(shost); |
195 |
++ scsi_proc_hostdir_rm(shost->hostt); |
196 |
+ |
197 |
+ spin_lock_irqsave(shost->host_lock, flags); |
198 |
+ if (scsi_host_set_state(shost, SHOST_DEL)) |
199 |
+@@ -329,6 +330,7 @@ static void scsi_host_dev_release(struct device *dev) |
200 |
+ struct Scsi_Host *shost = dev_to_shost(dev); |
201 |
+ struct device *parent = dev->parent; |
202 |
+ |
203 |
++ /* In case scsi_remove_host() has not been called. */ |
204 |
+ scsi_proc_hostdir_rm(shost->hostt); |
205 |
+ |
206 |
+ /* Wait for functions invoked through call_rcu(&shost->rcu, ...) */ |
207 |
+diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c b/drivers/staging/mt7621-spi/spi-mt7621.c |
208 |
+index b73823830e3a7..75ed48f60c8c7 100644 |
209 |
+--- a/drivers/staging/mt7621-spi/spi-mt7621.c |
210 |
++++ b/drivers/staging/mt7621-spi/spi-mt7621.c |
211 |
+@@ -442,9 +442,11 @@ static int mt7621_spi_probe(struct platform_device *pdev) |
212 |
+ return PTR_ERR(base); |
213 |
+ |
214 |
+ clk = devm_clk_get(&pdev->dev, NULL); |
215 |
+- if (IS_ERR(clk)) |
216 |
+- return dev_err_probe(&pdev->dev, PTR_ERR(clk), |
217 |
+- "unable to get SYS clock\n"); |
218 |
++ if (IS_ERR(clk)) { |
219 |
++ dev_err(&pdev->dev, "unable to get SYS clock, err=%d\n", |
220 |
++ status); |
221 |
++ return PTR_ERR(clk); |
222 |
++ } |
223 |
+ |
224 |
+ status = clk_prepare_enable(clk); |
225 |
+ if (status) |
226 |
+diff --git a/fs/ext4/fsmap.c b/fs/ext4/fsmap.c |
227 |
+index 6f3f245f3a803..6b52ace1463c2 100644 |
228 |
+--- a/fs/ext4/fsmap.c |
229 |
++++ b/fs/ext4/fsmap.c |
230 |
+@@ -486,6 +486,8 @@ static int ext4_getfsmap_datadev(struct super_block *sb, |
231 |
+ keys[0].fmr_physical = bofs; |
232 |
+ if (keys[1].fmr_physical >= eofs) |
233 |
+ keys[1].fmr_physical = eofs - 1; |
234 |
++ if (keys[1].fmr_physical < keys[0].fmr_physical) |
235 |
++ return 0; |
236 |
+ start_fsb = keys[0].fmr_physical; |
237 |
+ end_fsb = keys[1].fmr_physical; |
238 |
+ |
239 |
+diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c |
240 |
+index b1c6b9398eef5..07bb69cd20236 100644 |
241 |
+--- a/fs/ext4/inline.c |
242 |
++++ b/fs/ext4/inline.c |
243 |
+@@ -157,7 +157,6 @@ int ext4_find_inline_data_nolock(struct inode *inode) |
244 |
+ (void *)ext4_raw_inode(&is.iloc)); |
245 |
+ EXT4_I(inode)->i_inline_size = EXT4_MIN_INLINE_DATA_SIZE + |
246 |
+ le32_to_cpu(is.s.here->e_value_size); |
247 |
+- ext4_set_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA); |
248 |
+ } |
249 |
+ out: |
250 |
+ brelse(is.iloc.bh); |
251 |
+diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c |
252 |
+index 3c7bbdaa425a7..6e7989b04d2bf 100644 |
253 |
+--- a/fs/ext4/inode.c |
254 |
++++ b/fs/ext4/inode.c |
255 |
+@@ -4865,8 +4865,13 @@ static inline int ext4_iget_extra_inode(struct inode *inode, |
256 |
+ |
257 |
+ if (EXT4_INODE_HAS_XATTR_SPACE(inode) && |
258 |
+ *magic == cpu_to_le32(EXT4_XATTR_MAGIC)) { |
259 |
++ int err; |
260 |
++ |
261 |
+ ext4_set_inode_state(inode, EXT4_STATE_XATTR); |
262 |
+- return ext4_find_inline_data_nolock(inode); |
263 |
++ err = ext4_find_inline_data_nolock(inode); |
264 |
++ if (!err && ext4_has_inline_data(inode)) |
265 |
++ ext4_set_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA); |
266 |
++ return err; |
267 |
+ } else |
268 |
+ EXT4_I(inode)->i_inline_off = 0; |
269 |
+ return 0; |
270 |
+diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c |
271 |
+index fd0353017d897..b930e8d559d41 100644 |
272 |
+--- a/fs/ext4/ioctl.c |
273 |
++++ b/fs/ext4/ioctl.c |
274 |
+@@ -178,6 +178,7 @@ static long swap_inode_boot_loader(struct super_block *sb, |
275 |
+ ei_bl->i_flags = 0; |
276 |
+ inode_set_iversion(inode_bl, 1); |
277 |
+ i_size_write(inode_bl, 0); |
278 |
++ EXT4_I(inode_bl)->i_disksize = inode_bl->i_size; |
279 |
+ inode_bl->i_mode = S_IFREG; |
280 |
+ if (ext4_has_feature_extents(sb)) { |
281 |
+ ext4_set_inode_flag(inode_bl, EXT4_INODE_EXTENTS); |
282 |
+diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c |
283 |
+index 2c68591102bd4..db9bba3473b57 100644 |
284 |
+--- a/fs/ext4/namei.c |
285 |
++++ b/fs/ext4/namei.c |
286 |
+@@ -1419,11 +1419,10 @@ static struct buffer_head *__ext4_find_entry(struct inode *dir, |
287 |
+ int has_inline_data = 1; |
288 |
+ ret = ext4_find_inline_entry(dir, fname, res_dir, |
289 |
+ &has_inline_data); |
290 |
+- if (has_inline_data) { |
291 |
+- if (inlined) |
292 |
+- *inlined = 1; |
293 |
++ if (inlined) |
294 |
++ *inlined = has_inline_data; |
295 |
++ if (has_inline_data) |
296 |
+ goto cleanup_and_exit; |
297 |
+- } |
298 |
+ } |
299 |
+ |
300 |
+ if ((namelen <= 2) && (name[0] == '.') && |
301 |
+@@ -3515,7 +3514,8 @@ static void ext4_resetent(handle_t *handle, struct ext4_renament *ent, |
302 |
+ * so the old->de may no longer valid and need to find it again |
303 |
+ * before reset old inode info. |
304 |
+ */ |
305 |
+- old.bh = ext4_find_entry(old.dir, &old.dentry->d_name, &old.de, NULL); |
306 |
++ old.bh = ext4_find_entry(old.dir, &old.dentry->d_name, &old.de, |
307 |
++ &old.inlined); |
308 |
+ if (IS_ERR(old.bh)) |
309 |
+ retval = PTR_ERR(old.bh); |
310 |
+ if (!old.bh) |
311 |
+@@ -3677,7 +3677,8 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry, |
312 |
+ return retval; |
313 |
+ } |
314 |
+ |
315 |
+- old.bh = ext4_find_entry(old.dir, &old.dentry->d_name, &old.de, NULL); |
316 |
++ old.bh = ext4_find_entry(old.dir, &old.dentry->d_name, &old.de, |
317 |
++ &old.inlined); |
318 |
+ if (IS_ERR(old.bh)) |
319 |
+ return PTR_ERR(old.bh); |
320 |
+ /* |
321 |
+diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c |
322 |
+index 23334cfeac552..2a70b7556e419 100644 |
323 |
+--- a/fs/ext4/xattr.c |
324 |
++++ b/fs/ext4/xattr.c |
325 |
+@@ -2823,6 +2823,9 @@ shift: |
326 |
+ (void *)header, total_ino); |
327 |
+ EXT4_I(inode)->i_extra_isize = new_extra_isize; |
328 |
+ |
329 |
++ if (ext4_has_inline_data(inode)) |
330 |
++ error = ext4_find_inline_data_nolock(inode); |
331 |
++ |
332 |
+ cleanup: |
333 |
+ if (error && (mnt_count != le16_to_cpu(sbi->s_es->s_mnt_count))) { |
334 |
+ ext4_warning(inode->i_sb, "Unable to expand inode %lu. Delete some EAs or run e2fsck.", |
335 |
+diff --git a/fs/file.c b/fs/file.c |
336 |
+index d6ca500a10536..928ba7b8df1e9 100644 |
337 |
+--- a/fs/file.c |
338 |
++++ b/fs/file.c |
339 |
+@@ -627,6 +627,7 @@ int __close_fd(struct files_struct *files, unsigned fd) |
340 |
+ fdt = files_fdtable(files); |
341 |
+ if (fd >= fdt->max_fds) |
342 |
+ goto out_unlock; |
343 |
++ fd = array_index_nospec(fd, fdt->max_fds); |
344 |
+ file = fdt->fd[fd]; |
345 |
+ if (!file) |
346 |
+ goto out_unlock; |
347 |
+diff --git a/fs/udf/directory.c b/fs/udf/directory.c |
348 |
+index d9523013096f9..73720320f0ab7 100644 |
349 |
+--- a/fs/udf/directory.c |
350 |
++++ b/fs/udf/directory.c |
351 |
+@@ -34,7 +34,7 @@ struct fileIdentDesc *udf_fileident_read(struct inode *dir, loff_t *nf_pos, |
352 |
+ fibh->soffset = fibh->eoffset; |
353 |
+ |
354 |
+ if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) { |
355 |
+- fi = udf_get_fileident(iinfo->i_ext.i_data - |
356 |
++ fi = udf_get_fileident(iinfo->i_data - |
357 |
+ (iinfo->i_efe ? |
358 |
+ sizeof(struct extendedFileEntry) : |
359 |
+ sizeof(struct fileEntry)), |
360 |
+diff --git a/fs/udf/file.c b/fs/udf/file.c |
361 |
+index 88b7fb8e9998c..8fff7ffc33a81 100644 |
362 |
+--- a/fs/udf/file.c |
363 |
++++ b/fs/udf/file.c |
364 |
+@@ -50,7 +50,7 @@ static void __udf_adinicb_readpage(struct page *page) |
365 |
+ * So just sample it once and use the same value everywhere. |
366 |
+ */ |
367 |
+ kaddr = kmap_atomic(page); |
368 |
+- memcpy(kaddr, iinfo->i_ext.i_data + iinfo->i_lenEAttr, isize); |
369 |
++ memcpy(kaddr, iinfo->i_data + iinfo->i_lenEAttr, isize); |
370 |
+ memset(kaddr + isize, 0, PAGE_SIZE - isize); |
371 |
+ flush_dcache_page(page); |
372 |
+ SetPageUptodate(page); |
373 |
+@@ -76,8 +76,7 @@ static int udf_adinicb_writepage(struct page *page, |
374 |
+ BUG_ON(!PageLocked(page)); |
375 |
+ |
376 |
+ kaddr = kmap_atomic(page); |
377 |
+- memcpy(iinfo->i_ext.i_data + iinfo->i_lenEAttr, kaddr, |
378 |
+- i_size_read(inode)); |
379 |
++ memcpy(iinfo->i_data + iinfo->i_lenEAttr, kaddr, i_size_read(inode)); |
380 |
+ SetPageUptodate(page); |
381 |
+ kunmap_atomic(kaddr); |
382 |
+ mark_inode_dirty(inode); |
383 |
+@@ -213,7 +212,7 @@ long udf_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) |
384 |
+ return put_user(UDF_I(inode)->i_lenEAttr, (int __user *)arg); |
385 |
+ case UDF_GETEABLOCK: |
386 |
+ return copy_to_user((char __user *)arg, |
387 |
+- UDF_I(inode)->i_ext.i_data, |
388 |
++ UDF_I(inode)->i_data, |
389 |
+ UDF_I(inode)->i_lenEAttr) ? -EFAULT : 0; |
390 |
+ default: |
391 |
+ return -ENOIOCTLCMD; |
392 |
+diff --git a/fs/udf/ialloc.c b/fs/udf/ialloc.c |
393 |
+index f8e5872f7cc27..cdaa86e077b29 100644 |
394 |
+--- a/fs/udf/ialloc.c |
395 |
++++ b/fs/udf/ialloc.c |
396 |
+@@ -67,16 +67,16 @@ struct inode *udf_new_inode(struct inode *dir, umode_t mode) |
397 |
+ iinfo->i_efe = 1; |
398 |
+ if (UDF_VERS_USE_EXTENDED_FE > sbi->s_udfrev) |
399 |
+ sbi->s_udfrev = UDF_VERS_USE_EXTENDED_FE; |
400 |
+- iinfo->i_ext.i_data = kzalloc(inode->i_sb->s_blocksize - |
401 |
+- sizeof(struct extendedFileEntry), |
402 |
+- GFP_KERNEL); |
403 |
++ iinfo->i_data = kzalloc(inode->i_sb->s_blocksize - |
404 |
++ sizeof(struct extendedFileEntry), |
405 |
++ GFP_KERNEL); |
406 |
+ } else { |
407 |
+ iinfo->i_efe = 0; |
408 |
+- iinfo->i_ext.i_data = kzalloc(inode->i_sb->s_blocksize - |
409 |
+- sizeof(struct fileEntry), |
410 |
+- GFP_KERNEL); |
411 |
++ iinfo->i_data = kzalloc(inode->i_sb->s_blocksize - |
412 |
++ sizeof(struct fileEntry), |
413 |
++ GFP_KERNEL); |
414 |
+ } |
415 |
+- if (!iinfo->i_ext.i_data) { |
416 |
++ if (!iinfo->i_data) { |
417 |
+ iput(inode); |
418 |
+ return ERR_PTR(-ENOMEM); |
419 |
+ } |
420 |
+diff --git a/fs/udf/inode.c b/fs/udf/inode.c |
421 |
+index af1180104e560..77421e65623a1 100644 |
422 |
+--- a/fs/udf/inode.c |
423 |
++++ b/fs/udf/inode.c |
424 |
+@@ -150,8 +150,8 @@ void udf_evict_inode(struct inode *inode) |
425 |
+ truncate_inode_pages_final(&inode->i_data); |
426 |
+ invalidate_inode_buffers(inode); |
427 |
+ clear_inode(inode); |
428 |
+- kfree(iinfo->i_ext.i_data); |
429 |
+- iinfo->i_ext.i_data = NULL; |
430 |
++ kfree(iinfo->i_data); |
431 |
++ iinfo->i_data = NULL; |
432 |
+ udf_clear_extent_cache(inode); |
433 |
+ if (want_delete) { |
434 |
+ udf_free_inode(inode); |
435 |
+@@ -278,14 +278,14 @@ int udf_expand_file_adinicb(struct inode *inode) |
436 |
+ kaddr = kmap_atomic(page); |
437 |
+ memset(kaddr + iinfo->i_lenAlloc, 0x00, |
438 |
+ PAGE_SIZE - iinfo->i_lenAlloc); |
439 |
+- memcpy(kaddr, iinfo->i_ext.i_data + iinfo->i_lenEAttr, |
440 |
++ memcpy(kaddr, iinfo->i_data + iinfo->i_lenEAttr, |
441 |
+ iinfo->i_lenAlloc); |
442 |
+ flush_dcache_page(page); |
443 |
+ SetPageUptodate(page); |
444 |
+ kunmap_atomic(kaddr); |
445 |
+ } |
446 |
+ down_write(&iinfo->i_data_sem); |
447 |
+- memset(iinfo->i_ext.i_data + iinfo->i_lenEAttr, 0x00, |
448 |
++ memset(iinfo->i_data + iinfo->i_lenEAttr, 0x00, |
449 |
+ iinfo->i_lenAlloc); |
450 |
+ iinfo->i_lenAlloc = 0; |
451 |
+ if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_SHORT_AD)) |
452 |
+@@ -303,8 +303,7 @@ int udf_expand_file_adinicb(struct inode *inode) |
453 |
+ lock_page(page); |
454 |
+ down_write(&iinfo->i_data_sem); |
455 |
+ kaddr = kmap_atomic(page); |
456 |
+- memcpy(iinfo->i_ext.i_data + iinfo->i_lenEAttr, kaddr, |
457 |
+- inode->i_size); |
458 |
++ memcpy(iinfo->i_data + iinfo->i_lenEAttr, kaddr, inode->i_size); |
459 |
+ kunmap_atomic(kaddr); |
460 |
+ unlock_page(page); |
461 |
+ iinfo->i_alloc_type = ICBTAG_FLAG_AD_IN_ICB; |
462 |
+@@ -392,8 +391,7 @@ struct buffer_head *udf_expand_dir_adinicb(struct inode *inode, |
463 |
+ } |
464 |
+ mark_buffer_dirty_inode(dbh, inode); |
465 |
+ |
466 |
+- memset(iinfo->i_ext.i_data + iinfo->i_lenEAttr, 0, |
467 |
+- iinfo->i_lenAlloc); |
468 |
++ memset(iinfo->i_data + iinfo->i_lenEAttr, 0, iinfo->i_lenAlloc); |
469 |
+ iinfo->i_lenAlloc = 0; |
470 |
+ eloc.logicalBlockNum = *block; |
471 |
+ eloc.partitionReferenceNum = |
472 |
+@@ -1241,7 +1239,7 @@ set_size: |
473 |
+ if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) { |
474 |
+ down_write(&iinfo->i_data_sem); |
475 |
+ udf_clear_extent_cache(inode); |
476 |
+- memset(iinfo->i_ext.i_data + iinfo->i_lenEAttr + newsize, |
477 |
++ memset(iinfo->i_data + iinfo->i_lenEAttr + newsize, |
478 |
+ 0x00, bsize - newsize - |
479 |
+ udf_file_entry_alloc_offset(inode)); |
480 |
+ iinfo->i_lenAlloc = newsize; |
481 |
+@@ -1377,6 +1375,7 @@ reread: |
482 |
+ ret = -EIO; |
483 |
+ goto out; |
484 |
+ } |
485 |
++ iinfo->i_hidden = hidden_inode; |
486 |
+ iinfo->i_unique = 0; |
487 |
+ iinfo->i_lenEAttr = 0; |
488 |
+ iinfo->i_lenExtents = 0; |
489 |
+@@ -1390,7 +1389,7 @@ reread: |
490 |
+ sizeof(struct extendedFileEntry)); |
491 |
+ if (ret) |
492 |
+ goto out; |
493 |
+- memcpy(iinfo->i_ext.i_data, |
494 |
++ memcpy(iinfo->i_data, |
495 |
+ bh->b_data + sizeof(struct extendedFileEntry), |
496 |
+ bs - sizeof(struct extendedFileEntry)); |
497 |
+ } else if (fe->descTag.tagIdent == cpu_to_le16(TAG_IDENT_FE)) { |
498 |
+@@ -1399,7 +1398,7 @@ reread: |
499 |
+ ret = udf_alloc_i_data(inode, bs - sizeof(struct fileEntry)); |
500 |
+ if (ret) |
501 |
+ goto out; |
502 |
+- memcpy(iinfo->i_ext.i_data, |
503 |
++ memcpy(iinfo->i_data, |
504 |
+ bh->b_data + sizeof(struct fileEntry), |
505 |
+ bs - sizeof(struct fileEntry)); |
506 |
+ } else if (fe->descTag.tagIdent == cpu_to_le16(TAG_IDENT_USE)) { |
507 |
+@@ -1412,7 +1411,7 @@ reread: |
508 |
+ sizeof(struct unallocSpaceEntry)); |
509 |
+ if (ret) |
510 |
+ goto out; |
511 |
+- memcpy(iinfo->i_ext.i_data, |
512 |
++ memcpy(iinfo->i_data, |
513 |
+ bh->b_data + sizeof(struct unallocSpaceEntry), |
514 |
+ bs - sizeof(struct unallocSpaceEntry)); |
515 |
+ return 0; |
516 |
+@@ -1470,6 +1469,8 @@ reread: |
517 |
+ iinfo->i_lenEAttr = le32_to_cpu(fe->lengthExtendedAttr); |
518 |
+ iinfo->i_lenAlloc = le32_to_cpu(fe->lengthAllocDescs); |
519 |
+ iinfo->i_checkpoint = le32_to_cpu(fe->checkpoint); |
520 |
++ iinfo->i_streamdir = 0; |
521 |
++ iinfo->i_lenStreams = 0; |
522 |
+ } else { |
523 |
+ inode->i_blocks = le64_to_cpu(efe->logicalBlocksRecorded) << |
524 |
+ (inode->i_sb->s_blocksize_bits - 9); |
525 |
+@@ -1483,6 +1484,16 @@ reread: |
526 |
+ iinfo->i_lenEAttr = le32_to_cpu(efe->lengthExtendedAttr); |
527 |
+ iinfo->i_lenAlloc = le32_to_cpu(efe->lengthAllocDescs); |
528 |
+ iinfo->i_checkpoint = le32_to_cpu(efe->checkpoint); |
529 |
++ |
530 |
++ /* Named streams */ |
531 |
++ iinfo->i_streamdir = (efe->streamDirectoryICB.extLength != 0); |
532 |
++ iinfo->i_locStreamdir = |
533 |
++ lelb_to_cpu(efe->streamDirectoryICB.extLocation); |
534 |
++ iinfo->i_lenStreams = le64_to_cpu(efe->objectSize); |
535 |
++ if (iinfo->i_lenStreams >= inode->i_size) |
536 |
++ iinfo->i_lenStreams -= inode->i_size; |
537 |
++ else |
538 |
++ iinfo->i_lenStreams = 0; |
539 |
+ } |
540 |
+ inode->i_generation = iinfo->i_unique; |
541 |
+ |
542 |
+@@ -1579,8 +1590,8 @@ out: |
543 |
+ static int udf_alloc_i_data(struct inode *inode, size_t size) |
544 |
+ { |
545 |
+ struct udf_inode_info *iinfo = UDF_I(inode); |
546 |
+- iinfo->i_ext.i_data = kmalloc(size, GFP_KERNEL); |
547 |
+- if (!iinfo->i_ext.i_data) |
548 |
++ iinfo->i_data = kmalloc(size, GFP_KERNEL); |
549 |
++ if (!iinfo->i_data) |
550 |
+ return -ENOMEM; |
551 |
+ return 0; |
552 |
+ } |
553 |
+@@ -1654,7 +1665,7 @@ static int udf_update_inode(struct inode *inode, int do_sync) |
554 |
+ |
555 |
+ use->lengthAllocDescs = cpu_to_le32(iinfo->i_lenAlloc); |
556 |
+ memcpy(bh->b_data + sizeof(struct unallocSpaceEntry), |
557 |
+- iinfo->i_ext.i_data, inode->i_sb->s_blocksize - |
558 |
++ iinfo->i_data, inode->i_sb->s_blocksize - |
559 |
+ sizeof(struct unallocSpaceEntry)); |
560 |
+ use->descTag.tagIdent = cpu_to_le16(TAG_IDENT_USE); |
561 |
+ crclen = sizeof(struct unallocSpaceEntry); |
562 |
+@@ -1684,8 +1695,12 @@ static int udf_update_inode(struct inode *inode, int do_sync) |
563 |
+ |
564 |
+ if (S_ISDIR(inode->i_mode) && inode->i_nlink > 0) |
565 |
+ fe->fileLinkCount = cpu_to_le16(inode->i_nlink - 1); |
566 |
+- else |
567 |
+- fe->fileLinkCount = cpu_to_le16(inode->i_nlink); |
568 |
++ else { |
569 |
++ if (iinfo->i_hidden) |
570 |
++ fe->fileLinkCount = cpu_to_le16(0); |
571 |
++ else |
572 |
++ fe->fileLinkCount = cpu_to_le16(inode->i_nlink); |
573 |
++ } |
574 |
+ |
575 |
+ fe->informationLength = cpu_to_le64(inode->i_size); |
576 |
+ |
577 |
+@@ -1723,7 +1738,7 @@ static int udf_update_inode(struct inode *inode, int do_sync) |
578 |
+ |
579 |
+ if (iinfo->i_efe == 0) { |
580 |
+ memcpy(bh->b_data + sizeof(struct fileEntry), |
581 |
+- iinfo->i_ext.i_data, |
582 |
++ iinfo->i_data, |
583 |
+ inode->i_sb->s_blocksize - sizeof(struct fileEntry)); |
584 |
+ fe->logicalBlocksRecorded = cpu_to_le64(lb_recorded); |
585 |
+ |
586 |
+@@ -1742,12 +1757,22 @@ static int udf_update_inode(struct inode *inode, int do_sync) |
587 |
+ crclen = sizeof(struct fileEntry); |
588 |
+ } else { |
589 |
+ memcpy(bh->b_data + sizeof(struct extendedFileEntry), |
590 |
+- iinfo->i_ext.i_data, |
591 |
++ iinfo->i_data, |
592 |
+ inode->i_sb->s_blocksize - |
593 |
+ sizeof(struct extendedFileEntry)); |
594 |
+- efe->objectSize = cpu_to_le64(inode->i_size); |
595 |
++ efe->objectSize = |
596 |
++ cpu_to_le64(inode->i_size + iinfo->i_lenStreams); |
597 |
+ efe->logicalBlocksRecorded = cpu_to_le64(lb_recorded); |
598 |
+ |
599 |
++ if (iinfo->i_streamdir) { |
600 |
++ struct long_ad *icb_lad = &efe->streamDirectoryICB; |
601 |
++ |
602 |
++ icb_lad->extLocation = |
603 |
++ cpu_to_lelb(iinfo->i_locStreamdir); |
604 |
++ icb_lad->extLength = |
605 |
++ cpu_to_le32(inode->i_sb->s_blocksize); |
606 |
++ } |
607 |
++ |
608 |
+ udf_adjust_time(iinfo, inode->i_atime); |
609 |
+ udf_adjust_time(iinfo, inode->i_mtime); |
610 |
+ udf_adjust_time(iinfo, inode->i_ctime); |
611 |
+@@ -1846,8 +1871,13 @@ struct inode *__udf_iget(struct super_block *sb, struct kernel_lb_addr *ino, |
612 |
+ if (!inode) |
613 |
+ return ERR_PTR(-ENOMEM); |
614 |
+ |
615 |
+- if (!(inode->i_state & I_NEW)) |
616 |
++ if (!(inode->i_state & I_NEW)) { |
617 |
++ if (UDF_I(inode)->i_hidden != hidden_inode) { |
618 |
++ iput(inode); |
619 |
++ return ERR_PTR(-EFSCORRUPTED); |
620 |
++ } |
621 |
+ return inode; |
622 |
++ } |
623 |
+ |
624 |
+ memcpy(&UDF_I(inode)->i_location, ino, sizeof(struct kernel_lb_addr)); |
625 |
+ err = udf_read_inode(inode, hidden_inode); |
626 |
+@@ -2028,7 +2058,7 @@ void udf_write_aext(struct inode *inode, struct extent_position *epos, |
627 |
+ struct udf_inode_info *iinfo = UDF_I(inode); |
628 |
+ |
629 |
+ if (!epos->bh) |
630 |
+- ptr = iinfo->i_ext.i_data + epos->offset - |
631 |
++ ptr = iinfo->i_data + epos->offset - |
632 |
+ udf_file_entry_alloc_offset(inode) + |
633 |
+ iinfo->i_lenEAttr; |
634 |
+ else |
635 |
+@@ -2120,7 +2150,7 @@ int8_t udf_current_aext(struct inode *inode, struct extent_position *epos, |
636 |
+ if (!epos->bh) { |
637 |
+ if (!epos->offset) |
638 |
+ epos->offset = udf_file_entry_alloc_offset(inode); |
639 |
+- ptr = iinfo->i_ext.i_data + epos->offset - |
640 |
++ ptr = iinfo->i_data + epos->offset - |
641 |
+ udf_file_entry_alloc_offset(inode) + |
642 |
+ iinfo->i_lenEAttr; |
643 |
+ alen = udf_file_entry_alloc_offset(inode) + |
644 |
+diff --git a/fs/udf/misc.c b/fs/udf/misc.c |
645 |
+index 853bcff51043f..1614d308d0f06 100644 |
646 |
+--- a/fs/udf/misc.c |
647 |
++++ b/fs/udf/misc.c |
648 |
+@@ -52,9 +52,9 @@ struct genericFormat *udf_add_extendedattr(struct inode *inode, uint32_t size, |
649 |
+ uint16_t crclen; |
650 |
+ struct udf_inode_info *iinfo = UDF_I(inode); |
651 |
+ |
652 |
+- ea = iinfo->i_ext.i_data; |
653 |
++ ea = iinfo->i_data; |
654 |
+ if (iinfo->i_lenEAttr) { |
655 |
+- ad = iinfo->i_ext.i_data + iinfo->i_lenEAttr; |
656 |
++ ad = iinfo->i_data + iinfo->i_lenEAttr; |
657 |
+ } else { |
658 |
+ ad = ea; |
659 |
+ size += sizeof(struct extendedAttrHeaderDesc); |
660 |
+@@ -153,7 +153,7 @@ struct genericFormat *udf_get_extendedattr(struct inode *inode, uint32_t type, |
661 |
+ uint32_t offset; |
662 |
+ struct udf_inode_info *iinfo = UDF_I(inode); |
663 |
+ |
664 |
+- ea = iinfo->i_ext.i_data; |
665 |
++ ea = iinfo->i_data; |
666 |
+ |
667 |
+ if (iinfo->i_lenEAttr) { |
668 |
+ struct extendedAttrHeaderDesc *eahd; |
669 |
+diff --git a/fs/udf/namei.c b/fs/udf/namei.c |
670 |
+index ef251622da137..05dd1f45ba90b 100644 |
671 |
+--- a/fs/udf/namei.c |
672 |
++++ b/fs/udf/namei.c |
673 |
+@@ -478,8 +478,7 @@ add: |
674 |
+ if (dinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) { |
675 |
+ block = dinfo->i_location.logicalBlockNum; |
676 |
+ fi = (struct fileIdentDesc *) |
677 |
+- (dinfo->i_ext.i_data + |
678 |
+- fibh->soffset - |
679 |
++ (dinfo->i_data + fibh->soffset - |
680 |
+ udf_ext0_offset(dir) + |
681 |
+ dinfo->i_lenEAttr); |
682 |
+ } else { |
683 |
+@@ -962,7 +961,7 @@ static int udf_symlink(struct inode *dir, struct dentry *dentry, |
684 |
+ mark_buffer_dirty_inode(epos.bh, inode); |
685 |
+ ea = epos.bh->b_data + udf_ext0_offset(inode); |
686 |
+ } else |
687 |
+- ea = iinfo->i_ext.i_data + iinfo->i_lenEAttr; |
688 |
++ ea = iinfo->i_data + iinfo->i_lenEAttr; |
689 |
+ |
690 |
+ eoffset = sb->s_blocksize - udf_ext0_offset(inode); |
691 |
+ pc = (struct pathComponent *)ea; |
692 |
+@@ -1142,7 +1141,7 @@ static int udf_rename(struct inode *old_dir, struct dentry *old_dentry, |
693 |
+ retval = -EIO; |
694 |
+ if (old_iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) { |
695 |
+ dir_fi = udf_get_fileident( |
696 |
+- old_iinfo->i_ext.i_data - |
697 |
++ old_iinfo->i_data - |
698 |
+ (old_iinfo->i_efe ? |
699 |
+ sizeof(struct extendedFileEntry) : |
700 |
+ sizeof(struct fileEntry)), |
701 |
+diff --git a/fs/udf/partition.c b/fs/udf/partition.c |
702 |
+index 090baff83990a..4cbf40575965e 100644 |
703 |
+--- a/fs/udf/partition.c |
704 |
++++ b/fs/udf/partition.c |
705 |
+@@ -65,7 +65,7 @@ uint32_t udf_get_pblock_virt15(struct super_block *sb, uint32_t block, |
706 |
+ } |
707 |
+ |
708 |
+ if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) { |
709 |
+- loc = le32_to_cpu(((__le32 *)(iinfo->i_ext.i_data + |
710 |
++ loc = le32_to_cpu(((__le32 *)(iinfo->i_data + |
711 |
+ vdata->s_start_offset))[block]); |
712 |
+ goto translate; |
713 |
+ } |
714 |
+diff --git a/fs/udf/super.c b/fs/udf/super.c |
715 |
+index b7fb7cd35d89a..bce48a07790cb 100644 |
716 |
+--- a/fs/udf/super.c |
717 |
++++ b/fs/udf/super.c |
718 |
+@@ -146,9 +146,12 @@ static struct inode *udf_alloc_inode(struct super_block *sb) |
719 |
+ |
720 |
+ ei->i_unique = 0; |
721 |
+ ei->i_lenExtents = 0; |
722 |
++ ei->i_lenStreams = 0; |
723 |
+ ei->i_next_alloc_block = 0; |
724 |
+ ei->i_next_alloc_goal = 0; |
725 |
+ ei->i_strat4096 = 0; |
726 |
++ ei->i_streamdir = 0; |
727 |
++ ei->i_hidden = 0; |
728 |
+ init_rwsem(&ei->i_data_sem); |
729 |
+ ei->cached_extent.lstart = -1; |
730 |
+ spin_lock_init(&ei->i_extent_cache_lock); |
731 |
+@@ -172,7 +175,7 @@ static void init_once(void *foo) |
732 |
+ { |
733 |
+ struct udf_inode_info *ei = (struct udf_inode_info *)foo; |
734 |
+ |
735 |
+- ei->i_ext.i_data = NULL; |
736 |
++ ei->i_data = NULL; |
737 |
+ inode_init_once(&ei->vfs_inode); |
738 |
+ } |
739 |
+ |
740 |
+@@ -572,6 +575,11 @@ static int udf_parse_options(char *options, struct udf_options *uopt, |
741 |
+ if (!remount) { |
742 |
+ if (uopt->nls_map) |
743 |
+ unload_nls(uopt->nls_map); |
744 |
++ /* |
745 |
++ * load_nls() failure is handled later in |
746 |
++ * udf_fill_super() after all options are |
747 |
++ * parsed. |
748 |
++ */ |
749 |
+ uopt->nls_map = load_nls(args[0].from); |
750 |
+ uopt->flags |= (1 << UDF_FLAG_NLS_MAP); |
751 |
+ } |
752 |
+@@ -1200,7 +1208,7 @@ static int udf_load_vat(struct super_block *sb, int p_index, int type1_index) |
753 |
+ vat20 = (struct virtualAllocationTable20 *)bh->b_data; |
754 |
+ } else { |
755 |
+ vat20 = (struct virtualAllocationTable20 *) |
756 |
+- vati->i_ext.i_data; |
757 |
++ vati->i_data; |
758 |
+ } |
759 |
+ |
760 |
+ map->s_type_specific.s_virtual.s_start_offset = |
761 |
+diff --git a/fs/udf/symlink.c b/fs/udf/symlink.c |
762 |
+index 6023c97c6da2f..aef3e4d9014d2 100644 |
763 |
+--- a/fs/udf/symlink.c |
764 |
++++ b/fs/udf/symlink.c |
765 |
+@@ -122,7 +122,7 @@ static int udf_symlink_filler(struct file *file, struct page *page) |
766 |
+ |
767 |
+ down_read(&iinfo->i_data_sem); |
768 |
+ if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) { |
769 |
+- symlink = iinfo->i_ext.i_data + iinfo->i_lenEAttr; |
770 |
++ symlink = iinfo->i_data + iinfo->i_lenEAttr; |
771 |
+ } else { |
772 |
+ bh = sb_bread(inode->i_sb, pos); |
773 |
+ |
774 |
+diff --git a/fs/udf/udf_i.h b/fs/udf/udf_i.h |
775 |
+index 2ef0e212f08a3..b77bf713a1b68 100644 |
776 |
+--- a/fs/udf/udf_i.h |
777 |
++++ b/fs/udf/udf_i.h |
778 |
+@@ -42,12 +42,12 @@ struct udf_inode_info { |
779 |
+ unsigned i_efe : 1; /* extendedFileEntry */ |
780 |
+ unsigned i_use : 1; /* unallocSpaceEntry */ |
781 |
+ unsigned i_strat4096 : 1; |
782 |
+- unsigned reserved : 26; |
783 |
+- union { |
784 |
+- struct short_ad *i_sad; |
785 |
+- struct long_ad *i_lad; |
786 |
+- __u8 *i_data; |
787 |
+- } i_ext; |
788 |
++ unsigned i_streamdir : 1; |
789 |
++ unsigned i_hidden : 1; /* hidden system inode */ |
790 |
++ unsigned reserved : 24; |
791 |
++ __u8 *i_data; |
792 |
++ struct kernel_lb_addr i_locStreamdir; |
793 |
++ __u64 i_lenStreams; |
794 |
+ struct rw_semaphore i_data_sem; |
795 |
+ struct udf_ext_cache cached_extent; |
796 |
+ /* Spinlock for protecting extent cache */ |
797 |
+diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h |
798 |
+index 1658e9f8d8032..78c1cd4dfdc07 100644 |
799 |
+--- a/include/linux/pci_ids.h |
800 |
++++ b/include/linux/pci_ids.h |
801 |
+@@ -3097,6 +3097,8 @@ |
802 |
+ |
803 |
+ #define PCI_VENDOR_ID_3COM_2 0xa727 |
804 |
+ |
805 |
++#define PCI_VENDOR_ID_SOLIDRUN 0xd063 |
806 |
++ |
807 |
+ #define PCI_VENDOR_ID_DIGIUM 0xd161 |
808 |
+ #define PCI_DEVICE_ID_DIGIUM_HFC4S 0xb410 |
809 |
+ |
810 |
+diff --git a/net/caif/caif_usb.c b/net/caif/caif_usb.c |
811 |
+index 76d49a1bc6f68..609c5793f45a0 100644 |
812 |
+--- a/net/caif/caif_usb.c |
813 |
++++ b/net/caif/caif_usb.c |
814 |
+@@ -135,6 +135,9 @@ static int cfusbl_device_notify(struct notifier_block *me, unsigned long what, |
815 |
+ struct usb_device *usbdev; |
816 |
+ int res; |
817 |
+ |
818 |
++ if (what == NETDEV_UNREGISTER && dev->reg_state >= NETREG_UNREGISTERED) |
819 |
++ return 0; |
820 |
++ |
821 |
+ /* Check whether we have a NCM device, and find its VID/PID. */ |
822 |
+ if (!(dev->dev.parent && dev->dev.parent->driver && |
823 |
+ strcmp(dev->dev.parent->driver->name, "cdc_ncm") == 0)) |
824 |
+diff --git a/net/ipv6/ila/ila_xlat.c b/net/ipv6/ila/ila_xlat.c |
825 |
+index 7858fa9ea103b..87744eb8d0c42 100644 |
826 |
+--- a/net/ipv6/ila/ila_xlat.c |
827 |
++++ b/net/ipv6/ila/ila_xlat.c |
828 |
+@@ -480,6 +480,7 @@ int ila_xlat_nl_cmd_get_mapping(struct sk_buff *skb, struct genl_info *info) |
829 |
+ |
830 |
+ rcu_read_lock(); |
831 |
+ |
832 |
++ ret = -ESRCH; |
833 |
+ ila = ila_lookup_by_params(&xp, ilan); |
834 |
+ if (ila) { |
835 |
+ ret = ila_dump_info(ila, |
836 |
+diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c |
837 |
+index 2c5443ce449c3..f705800b22488 100644 |
838 |
+--- a/net/nfc/netlink.c |
839 |
++++ b/net/nfc/netlink.c |
840 |
+@@ -1464,8 +1464,8 @@ static int nfc_se_io(struct nfc_dev *dev, u32 se_idx, |
841 |
+ return rc; |
842 |
+ |
843 |
+ error: |
844 |
+- kfree(cb_context); |
845 |
+ device_unlock(&dev->dev); |
846 |
++ kfree(cb_context); |
847 |
+ return rc; |
848 |
+ } |
849 |
+ |
850 |
+diff --git a/net/tipc/socket.c b/net/tipc/socket.c |
851 |
+index 8266452c143b4..c83eaa7183696 100644 |
852 |
+--- a/net/tipc/socket.c |
853 |
++++ b/net/tipc/socket.c |
854 |
+@@ -388,7 +388,7 @@ static int tipc_sk_sock_err(struct socket *sock, long *timeout) |
855 |
+ rc_ = tipc_sk_sock_err((sock_), timeo_); \ |
856 |
+ if (rc_) \ |
857 |
+ break; \ |
858 |
+- prepare_to_wait(sk_sleep(sk_), &wait_, TASK_INTERRUPTIBLE); \ |
859 |
++ add_wait_queue(sk_sleep(sk_), &wait_); \ |
860 |
+ release_sock(sk_); \ |
861 |
+ *(timeo_) = wait_woken(&wait_, TASK_INTERRUPTIBLE, *(timeo_)); \ |
862 |
+ sched_annotate_sleep(); \ |
863 |
+diff --git a/scripts/Makefile.build b/scripts/Makefile.build |
864 |
+index 64fac0ad32d6b..97f59fa3e0ed9 100644 |
865 |
+--- a/scripts/Makefile.build |
866 |
++++ b/scripts/Makefile.build |
867 |
+@@ -541,7 +541,9 @@ targets += $(call intermediate_targets, .asn1.o, .asn1.c .asn1.h) \ |
868 |
+ |
869 |
+ PHONY += $(subdir-ym) |
870 |
+ $(subdir-ym): |
871 |
+- $(Q)$(MAKE) $(build)=$@ need-builtin=$(if $(findstring $@,$(subdir-obj-y)),1) |
872 |
++ $(Q)$(MAKE) $(build)=$@ \ |
873 |
++ need-builtin=$(if $(filter $@/built-in.a, $(subdir-obj-y)),1) \ |
874 |
++ need-modorder=$(if $(need-modorder),$(if $(filter $@/modules.order, $(modorder)),1)) |
875 |
+ |
876 |
+ # Add FORCE to the prequisites of a target to force it to be always rebuilt. |
877 |
+ # --------------------------------------------------------------------------- |