1 |
commit: 43779e853a8df23e968a7cb008b1a2a6fe2f1689 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 2 17:14:29 2017 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 2 17:14:29 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=43779e85 |
7 |
|
8 |
Linux patch 4.4.86 |
9 |
|
10 |
0000_README | 4 + |
11 |
1085_linux-4.4.86.patch | 393 ++++++++++++++++++++++++++++++++++++++++++++++++ |
12 |
2 files changed, 397 insertions(+) |
13 |
|
14 |
diff --git a/0000_README b/0000_README |
15 |
index e008a1d..9eb8ca5 100644 |
16 |
--- a/0000_README |
17 |
+++ b/0000_README |
18 |
@@ -383,6 +383,10 @@ Patch: 1084_linux-4.4.85.patch |
19 |
From: http://www.kernel.org |
20 |
Desc: Linux 4.4.85 |
21 |
|
22 |
+Patch: 1085_linux-4.4.86.patch |
23 |
+From: http://www.kernel.org |
24 |
+Desc: Linux 4.4.86 |
25 |
+ |
26 |
Patch: 1500_XATTR_USER_PREFIX.patch |
27 |
From: https://bugs.gentoo.org/show_bug.cgi?id=470644 |
28 |
Desc: Support for namespace user.pax.* on tmpfs. |
29 |
|
30 |
diff --git a/1085_linux-4.4.86.patch b/1085_linux-4.4.86.patch |
31 |
new file mode 100644 |
32 |
index 0000000..a20d519 |
33 |
--- /dev/null |
34 |
+++ b/1085_linux-4.4.86.patch |
35 |
@@ -0,0 +1,393 @@ |
36 |
+diff --git a/Makefile b/Makefile |
37 |
+index 0f3d843f42a7..1207bf6a0e7a 100644 |
38 |
+--- a/Makefile |
39 |
++++ b/Makefile |
40 |
+@@ -1,6 +1,6 @@ |
41 |
+ VERSION = 4 |
42 |
+ PATCHLEVEL = 4 |
43 |
+-SUBLEVEL = 85 |
44 |
++SUBLEVEL = 86 |
45 |
+ EXTRAVERSION = |
46 |
+ NAME = Blurry Fish Butt |
47 |
+ |
48 |
+diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c |
49 |
+index 4c46c54a3ad7..6638903f0cb9 100644 |
50 |
+--- a/arch/arm64/kernel/fpsimd.c |
51 |
++++ b/arch/arm64/kernel/fpsimd.c |
52 |
+@@ -157,9 +157,11 @@ void fpsimd_thread_switch(struct task_struct *next) |
53 |
+ |
54 |
+ void fpsimd_flush_thread(void) |
55 |
+ { |
56 |
++ preempt_disable(); |
57 |
+ memset(¤t->thread.fpsimd_state, 0, sizeof(struct fpsimd_state)); |
58 |
+ fpsimd_flush_task_state(current); |
59 |
+ set_thread_flag(TIF_FOREIGN_FPSTATE); |
60 |
++ preempt_enable(); |
61 |
+ } |
62 |
+ |
63 |
+ /* |
64 |
+diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c |
65 |
+index a4b466424a32..7fabf49f2aeb 100644 |
66 |
+--- a/arch/arm64/mm/fault.c |
67 |
++++ b/arch/arm64/mm/fault.c |
68 |
+@@ -313,8 +313,11 @@ retry: |
69 |
+ * signal first. We do not need to release the mmap_sem because it |
70 |
+ * would already be released in __lock_page_or_retry in mm/filemap.c. |
71 |
+ */ |
72 |
+- if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current)) |
73 |
++ if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current)) { |
74 |
++ if (!user_mode(regs)) |
75 |
++ goto no_context; |
76 |
+ return 0; |
77 |
++ } |
78 |
+ |
79 |
+ /* |
80 |
+ * Major/minor page fault accounting is only done on the initial |
81 |
+diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h |
82 |
+index de25aad07853..9016b4b70375 100644 |
83 |
+--- a/arch/x86/include/asm/io.h |
84 |
++++ b/arch/x86/include/asm/io.h |
85 |
+@@ -304,13 +304,13 @@ static inline unsigned type in##bwl##_p(int port) \ |
86 |
+ static inline void outs##bwl(int port, const void *addr, unsigned long count) \ |
87 |
+ { \ |
88 |
+ asm volatile("rep; outs" #bwl \ |
89 |
+- : "+S"(addr), "+c"(count) : "d"(port)); \ |
90 |
++ : "+S"(addr), "+c"(count) : "d"(port) : "memory"); \ |
91 |
+ } \ |
92 |
+ \ |
93 |
+ static inline void ins##bwl(int port, void *addr, unsigned long count) \ |
94 |
+ { \ |
95 |
+ asm volatile("rep; ins" #bwl \ |
96 |
+- : "+D"(addr), "+c"(count) : "d"(port)); \ |
97 |
++ : "+D"(addr), "+c"(count) : "d"(port) : "memory"); \ |
98 |
+ } |
99 |
+ |
100 |
+ BUILDIO(b, b, char) |
101 |
+diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c |
102 |
+index cc91ae832ffb..6fd7b50c5747 100644 |
103 |
+--- a/drivers/gpu/drm/i915/intel_uncore.c |
104 |
++++ b/drivers/gpu/drm/i915/intel_uncore.c |
105 |
+@@ -635,7 +635,8 @@ hsw_unclaimed_reg_detect(struct drm_i915_private *dev_priv) |
106 |
+ "enabling oneshot unclaimed register reporting. " |
107 |
+ "Please use i915.mmio_debug=N for more information.\n"); |
108 |
+ __raw_i915_write32(dev_priv, FPGA_DBG, FPGA_DBG_RM_NOCLAIM); |
109 |
+- i915.mmio_debug = mmio_debug_once--; |
110 |
++ i915.mmio_debug = mmio_debug_once; |
111 |
++ mmio_debug_once = false; |
112 |
+ } |
113 |
+ } |
114 |
+ |
115 |
+diff --git a/drivers/i2c/busses/i2c-jz4780.c b/drivers/i2c/busses/i2c-jz4780.c |
116 |
+index f325663c27c5..4b58e8aaf5c5 100644 |
117 |
+--- a/drivers/i2c/busses/i2c-jz4780.c |
118 |
++++ b/drivers/i2c/busses/i2c-jz4780.c |
119 |
+@@ -786,10 +786,6 @@ static int jz4780_i2c_probe(struct platform_device *pdev) |
120 |
+ |
121 |
+ jz4780_i2c_writew(i2c, JZ4780_I2C_INTM, 0x0); |
122 |
+ |
123 |
+- i2c->cmd = 0; |
124 |
+- memset(i2c->cmd_buf, 0, BUFSIZE); |
125 |
+- memset(i2c->data_buf, 0, BUFSIZE); |
126 |
+- |
127 |
+ i2c->irq = platform_get_irq(pdev, 0); |
128 |
+ ret = devm_request_irq(&pdev->dev, i2c->irq, jz4780_i2c_irq, 0, |
129 |
+ dev_name(&pdev->dev), i2c); |
130 |
+diff --git a/drivers/net/wireless/p54/fwio.c b/drivers/net/wireless/p54/fwio.c |
131 |
+index 257a9eadd595..4ac6764f4897 100644 |
132 |
+--- a/drivers/net/wireless/p54/fwio.c |
133 |
++++ b/drivers/net/wireless/p54/fwio.c |
134 |
+@@ -488,7 +488,7 @@ int p54_scan(struct p54_common *priv, u16 mode, u16 dwell) |
135 |
+ |
136 |
+ entry += sizeof(__le16); |
137 |
+ chan->pa_points_per_curve = 8; |
138 |
+- memset(chan->curve_data, 0, sizeof(*chan->curve_data)); |
139 |
++ memset(chan->curve_data, 0, sizeof(chan->curve_data)); |
140 |
+ memcpy(chan->curve_data, entry, |
141 |
+ sizeof(struct p54_pa_curve_data_sample) * |
142 |
+ min((u8)8, curve_data->points_per_channel)); |
143 |
+diff --git a/drivers/scsi/isci/remote_node_context.c b/drivers/scsi/isci/remote_node_context.c |
144 |
+index 1910100638a2..00602abec0ea 100644 |
145 |
+--- a/drivers/scsi/isci/remote_node_context.c |
146 |
++++ b/drivers/scsi/isci/remote_node_context.c |
147 |
+@@ -66,6 +66,9 @@ const char *rnc_state_name(enum scis_sds_remote_node_context_states state) |
148 |
+ { |
149 |
+ static const char * const strings[] = RNC_STATES; |
150 |
+ |
151 |
++ if (state >= ARRAY_SIZE(strings)) |
152 |
++ return "UNKNOWN"; |
153 |
++ |
154 |
+ return strings[state]; |
155 |
+ } |
156 |
+ #undef C |
157 |
+diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c |
158 |
+index 0e6aaef9a038..c74f74ab981c 100644 |
159 |
+--- a/drivers/scsi/lpfc/lpfc_els.c |
160 |
++++ b/drivers/scsi/lpfc/lpfc_els.c |
161 |
+@@ -1054,7 +1054,10 @@ stop_rr_fcf_flogi: |
162 |
+ lpfc_sli4_unreg_all_rpis(vport); |
163 |
+ } |
164 |
+ } |
165 |
+- lpfc_issue_reg_vfi(vport); |
166 |
++ |
167 |
++ /* Do not register VFI if the driver aborted FLOGI */ |
168 |
++ if (!lpfc_error_lost_link(irsp)) |
169 |
++ lpfc_issue_reg_vfi(vport); |
170 |
+ lpfc_nlp_put(ndlp); |
171 |
+ goto out; |
172 |
+ } |
173 |
+diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c |
174 |
+index 6514636431ab..8a9e139e2853 100644 |
175 |
+--- a/drivers/scsi/sg.c |
176 |
++++ b/drivers/scsi/sg.c |
177 |
+@@ -153,6 +153,7 @@ typedef struct sg_fd { /* holds the state of a file descriptor */ |
178 |
+ struct sg_device *parentdp; /* owning device */ |
179 |
+ wait_queue_head_t read_wait; /* queue read until command done */ |
180 |
+ rwlock_t rq_list_lock; /* protect access to list in req_arr */ |
181 |
++ struct mutex f_mutex; /* protect against changes in this fd */ |
182 |
+ int timeout; /* defaults to SG_DEFAULT_TIMEOUT */ |
183 |
+ int timeout_user; /* defaults to SG_DEFAULT_TIMEOUT_USER */ |
184 |
+ Sg_scatter_hold reserve; /* buffer held for this file descriptor */ |
185 |
+@@ -166,6 +167,7 @@ typedef struct sg_fd { /* holds the state of a file descriptor */ |
186 |
+ unsigned char next_cmd_len; /* 0: automatic, >0: use on next write() */ |
187 |
+ char keep_orphan; /* 0 -> drop orphan (def), 1 -> keep for read() */ |
188 |
+ char mmap_called; /* 0 -> mmap() never called on this fd */ |
189 |
++ char res_in_use; /* 1 -> 'reserve' array in use */ |
190 |
+ struct kref f_ref; |
191 |
+ struct execute_work ew; |
192 |
+ } Sg_fd; |
193 |
+@@ -209,7 +211,6 @@ static void sg_remove_sfp(struct kref *); |
194 |
+ static Sg_request *sg_get_rq_mark(Sg_fd * sfp, int pack_id); |
195 |
+ static Sg_request *sg_add_request(Sg_fd * sfp); |
196 |
+ static int sg_remove_request(Sg_fd * sfp, Sg_request * srp); |
197 |
+-static int sg_res_in_use(Sg_fd * sfp); |
198 |
+ static Sg_device *sg_get_dev(int dev); |
199 |
+ static void sg_device_destroy(struct kref *kref); |
200 |
+ |
201 |
+@@ -625,6 +626,7 @@ sg_write(struct file *filp, const char __user *buf, size_t count, loff_t * ppos) |
202 |
+ } |
203 |
+ buf += SZ_SG_HEADER; |
204 |
+ __get_user(opcode, buf); |
205 |
++ mutex_lock(&sfp->f_mutex); |
206 |
+ if (sfp->next_cmd_len > 0) { |
207 |
+ cmd_size = sfp->next_cmd_len; |
208 |
+ sfp->next_cmd_len = 0; /* reset so only this write() effected */ |
209 |
+@@ -633,6 +635,7 @@ sg_write(struct file *filp, const char __user *buf, size_t count, loff_t * ppos) |
210 |
+ if ((opcode >= 0xc0) && old_hdr.twelve_byte) |
211 |
+ cmd_size = 12; |
212 |
+ } |
213 |
++ mutex_unlock(&sfp->f_mutex); |
214 |
+ SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sdp, |
215 |
+ "sg_write: scsi opcode=0x%02x, cmd_size=%d\n", (int) opcode, cmd_size)); |
216 |
+ /* Determine buffer size. */ |
217 |
+@@ -732,7 +735,7 @@ sg_new_write(Sg_fd *sfp, struct file *file, const char __user *buf, |
218 |
+ sg_remove_request(sfp, srp); |
219 |
+ return -EINVAL; /* either MMAP_IO or DIRECT_IO (not both) */ |
220 |
+ } |
221 |
+- if (sg_res_in_use(sfp)) { |
222 |
++ if (sfp->res_in_use) { |
223 |
+ sg_remove_request(sfp, srp); |
224 |
+ return -EBUSY; /* reserve buffer already being used */ |
225 |
+ } |
226 |
+@@ -902,7 +905,7 @@ sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg) |
227 |
+ return result; |
228 |
+ if (val) { |
229 |
+ sfp->low_dma = 1; |
230 |
+- if ((0 == sfp->low_dma) && (0 == sg_res_in_use(sfp))) { |
231 |
++ if ((0 == sfp->low_dma) && !sfp->res_in_use) { |
232 |
+ val = (int) sfp->reserve.bufflen; |
233 |
+ sg_remove_scat(sfp, &sfp->reserve); |
234 |
+ sg_build_reserve(sfp, val); |
235 |
+@@ -977,12 +980,18 @@ sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg) |
236 |
+ return -EINVAL; |
237 |
+ val = min_t(int, val, |
238 |
+ max_sectors_bytes(sdp->device->request_queue)); |
239 |
++ mutex_lock(&sfp->f_mutex); |
240 |
+ if (val != sfp->reserve.bufflen) { |
241 |
+- if (sg_res_in_use(sfp) || sfp->mmap_called) |
242 |
++ if (sfp->mmap_called || |
243 |
++ sfp->res_in_use) { |
244 |
++ mutex_unlock(&sfp->f_mutex); |
245 |
+ return -EBUSY; |
246 |
++ } |
247 |
++ |
248 |
+ sg_remove_scat(sfp, &sfp->reserve); |
249 |
+ sg_build_reserve(sfp, val); |
250 |
+ } |
251 |
++ mutex_unlock(&sfp->f_mutex); |
252 |
+ return 0; |
253 |
+ case SG_GET_RESERVED_SIZE: |
254 |
+ val = min_t(int, sfp->reserve.bufflen, |
255 |
+@@ -1737,13 +1746,22 @@ sg_start_req(Sg_request *srp, unsigned char *cmd) |
256 |
+ md = &map_data; |
257 |
+ |
258 |
+ if (md) { |
259 |
+- if (!sg_res_in_use(sfp) && dxfer_len <= rsv_schp->bufflen) |
260 |
++ mutex_lock(&sfp->f_mutex); |
261 |
++ if (dxfer_len <= rsv_schp->bufflen && |
262 |
++ !sfp->res_in_use) { |
263 |
++ sfp->res_in_use = 1; |
264 |
+ sg_link_reserve(sfp, srp, dxfer_len); |
265 |
+- else { |
266 |
++ } else if ((hp->flags & SG_FLAG_MMAP_IO) && sfp->res_in_use) { |
267 |
++ mutex_unlock(&sfp->f_mutex); |
268 |
++ return -EBUSY; |
269 |
++ } else { |
270 |
+ res = sg_build_indirect(req_schp, sfp, dxfer_len); |
271 |
+- if (res) |
272 |
++ if (res) { |
273 |
++ mutex_unlock(&sfp->f_mutex); |
274 |
+ return res; |
275 |
++ } |
276 |
+ } |
277 |
++ mutex_unlock(&sfp->f_mutex); |
278 |
+ |
279 |
+ md->pages = req_schp->pages; |
280 |
+ md->page_order = req_schp->page_order; |
281 |
+@@ -2034,6 +2052,8 @@ sg_unlink_reserve(Sg_fd * sfp, Sg_request * srp) |
282 |
+ req_schp->sglist_len = 0; |
283 |
+ sfp->save_scat_len = 0; |
284 |
+ srp->res_used = 0; |
285 |
++ /* Called without mutex lock to avoid deadlock */ |
286 |
++ sfp->res_in_use = 0; |
287 |
+ } |
288 |
+ |
289 |
+ static Sg_request * |
290 |
+@@ -2145,6 +2165,7 @@ sg_add_sfp(Sg_device * sdp) |
291 |
+ rwlock_init(&sfp->rq_list_lock); |
292 |
+ |
293 |
+ kref_init(&sfp->f_ref); |
294 |
++ mutex_init(&sfp->f_mutex); |
295 |
+ sfp->timeout = SG_DEFAULT_TIMEOUT; |
296 |
+ sfp->timeout_user = SG_DEFAULT_TIMEOUT_USER; |
297 |
+ sfp->force_packid = SG_DEF_FORCE_PACK_ID; |
298 |
+@@ -2220,20 +2241,6 @@ sg_remove_sfp(struct kref *kref) |
299 |
+ schedule_work(&sfp->ew.work); |
300 |
+ } |
301 |
+ |
302 |
+-static int |
303 |
+-sg_res_in_use(Sg_fd * sfp) |
304 |
+-{ |
305 |
+- const Sg_request *srp; |
306 |
+- unsigned long iflags; |
307 |
+- |
308 |
+- read_lock_irqsave(&sfp->rq_list_lock, iflags); |
309 |
+- for (srp = sfp->headrp; srp; srp = srp->nextrp) |
310 |
+- if (srp->res_used) |
311 |
+- break; |
312 |
+- read_unlock_irqrestore(&sfp->rq_list_lock, iflags); |
313 |
+- return srp ? 1 : 0; |
314 |
+-} |
315 |
+- |
316 |
+ #ifdef CONFIG_SCSI_PROC_FS |
317 |
+ static int |
318 |
+ sg_idr_max_id(int id, void *p, void *data) |
319 |
+diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c |
320 |
+index 9c62a6f9757a..600c67ef8a03 100644 |
321 |
+--- a/fs/btrfs/volumes.c |
322 |
++++ b/fs/btrfs/volumes.c |
323 |
+@@ -108,7 +108,7 @@ const struct btrfs_raid_attr btrfs_raid_array[BTRFS_NR_RAID_TYPES] = { |
324 |
+ }, |
325 |
+ }; |
326 |
+ |
327 |
+-const u64 const btrfs_raid_group[BTRFS_NR_RAID_TYPES] = { |
328 |
++const u64 btrfs_raid_group[BTRFS_NR_RAID_TYPES] = { |
329 |
+ [BTRFS_RAID_RAID10] = BTRFS_BLOCK_GROUP_RAID10, |
330 |
+ [BTRFS_RAID_RAID1] = BTRFS_BLOCK_GROUP_RAID1, |
331 |
+ [BTRFS_RAID_DUP] = BTRFS_BLOCK_GROUP_DUP, |
332 |
+diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h |
333 |
+index 782d4e814e21..4bc4b1b13193 100644 |
334 |
+--- a/include/linux/lightnvm.h |
335 |
++++ b/include/linux/lightnvm.h |
336 |
+@@ -310,6 +310,7 @@ static inline struct ppa_addr dev_to_generic_addr(struct nvm_dev *dev, |
337 |
+ { |
338 |
+ struct ppa_addr l; |
339 |
+ |
340 |
++ l.ppa = 0; |
341 |
+ /* |
342 |
+ * (r.ppa << X offset) & X len bitmask. X eq. blk, pg, etc. |
343 |
+ */ |
344 |
+diff --git a/kernel/gcov/base.c b/kernel/gcov/base.c |
345 |
+index 7080ae1eb6c1..f850e906564b 100644 |
346 |
+--- a/kernel/gcov/base.c |
347 |
++++ b/kernel/gcov/base.c |
348 |
+@@ -98,6 +98,12 @@ void __gcov_merge_icall_topn(gcov_type *counters, unsigned int n_counters) |
349 |
+ } |
350 |
+ EXPORT_SYMBOL(__gcov_merge_icall_topn); |
351 |
+ |
352 |
++void __gcov_exit(void) |
353 |
++{ |
354 |
++ /* Unused. */ |
355 |
++} |
356 |
++EXPORT_SYMBOL(__gcov_exit); |
357 |
++ |
358 |
+ /** |
359 |
+ * gcov_enable_events - enable event reporting through gcov_event() |
360 |
+ * |
361 |
+diff --git a/kernel/gcov/gcc_4_7.c b/kernel/gcov/gcc_4_7.c |
362 |
+index e25e92fb44fa..46a18e72bce6 100644 |
363 |
+--- a/kernel/gcov/gcc_4_7.c |
364 |
++++ b/kernel/gcov/gcc_4_7.c |
365 |
+@@ -18,7 +18,9 @@ |
366 |
+ #include <linux/vmalloc.h> |
367 |
+ #include "gcov.h" |
368 |
+ |
369 |
+-#if __GNUC__ == 5 && __GNUC_MINOR__ >= 1 |
370 |
++#if (__GNUC__ >= 7) |
371 |
++#define GCOV_COUNTERS 9 |
372 |
++#elif (__GNUC__ > 5) || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1) |
373 |
+ #define GCOV_COUNTERS 10 |
374 |
+ #elif __GNUC__ == 4 && __GNUC_MINOR__ >= 9 |
375 |
+ #define GCOV_COUNTERS 9 |
376 |
+diff --git a/sound/pci/au88x0/au88x0_core.c b/sound/pci/au88x0/au88x0_core.c |
377 |
+index 74177189063c..d3125c169684 100644 |
378 |
+--- a/sound/pci/au88x0/au88x0_core.c |
379 |
++++ b/sound/pci/au88x0/au88x0_core.c |
380 |
+@@ -2150,8 +2150,7 @@ vortex_adb_allocroute(vortex_t *vortex, int dma, int nr_ch, int dir, |
381 |
+ stream->resources, en, |
382 |
+ VORTEX_RESOURCE_SRC)) < 0) { |
383 |
+ memset(stream->resources, 0, |
384 |
+- sizeof(unsigned char) * |
385 |
+- VORTEX_RESOURCE_LAST); |
386 |
++ sizeof(stream->resources)); |
387 |
+ return -EBUSY; |
388 |
+ } |
389 |
+ if (stream->type != VORTEX_PCM_A3D) { |
390 |
+@@ -2161,7 +2160,7 @@ vortex_adb_allocroute(vortex_t *vortex, int dma, int nr_ch, int dir, |
391 |
+ VORTEX_RESOURCE_MIXIN)) < 0) { |
392 |
+ memset(stream->resources, |
393 |
+ 0, |
394 |
+- sizeof(unsigned char) * VORTEX_RESOURCE_LAST); |
395 |
++ sizeof(stream->resources)); |
396 |
+ return -EBUSY; |
397 |
+ } |
398 |
+ } |
399 |
+@@ -2174,8 +2173,7 @@ vortex_adb_allocroute(vortex_t *vortex, int dma, int nr_ch, int dir, |
400 |
+ stream->resources, en, |
401 |
+ VORTEX_RESOURCE_A3D)) < 0) { |
402 |
+ memset(stream->resources, 0, |
403 |
+- sizeof(unsigned char) * |
404 |
+- VORTEX_RESOURCE_LAST); |
405 |
++ sizeof(stream->resources)); |
406 |
+ dev_err(vortex->card->dev, |
407 |
+ "out of A3D sources. Sorry\n"); |
408 |
+ return -EBUSY; |
409 |
+@@ -2289,8 +2287,7 @@ vortex_adb_allocroute(vortex_t *vortex, int dma, int nr_ch, int dir, |
410 |
+ VORTEX_RESOURCE_MIXOUT)) |
411 |
+ < 0) { |
412 |
+ memset(stream->resources, 0, |
413 |
+- sizeof(unsigned char) * |
414 |
+- VORTEX_RESOURCE_LAST); |
415 |
++ sizeof(stream->resources)); |
416 |
+ return -EBUSY; |
417 |
+ } |
418 |
+ if ((src[i] = |
419 |
+@@ -2298,8 +2295,7 @@ vortex_adb_allocroute(vortex_t *vortex, int dma, int nr_ch, int dir, |
420 |
+ stream->resources, en, |
421 |
+ VORTEX_RESOURCE_SRC)) < 0) { |
422 |
+ memset(stream->resources, 0, |
423 |
+- sizeof(unsigned char) * |
424 |
+- VORTEX_RESOURCE_LAST); |
425 |
++ sizeof(stream->resources)); |
426 |
+ return -EBUSY; |
427 |
+ } |
428 |
+ } |