Annotation of /trunk/kernel-alx/patches-4.9/0265-4.9.166-all-fixes.patch
Parent Directory | Revision Log
Revision 3342 -
(hide annotations)
(download)
Tue Jun 18 09:41:56 2019 UTC (5 years, 3 months ago) by niro
File size: 24691 byte(s)
Tue Jun 18 09:41:56 2019 UTC (5 years, 3 months ago) by niro
File size: 24691 byte(s)
-linux-4.9.166
1 | niro | 3342 | diff --git a/Makefile b/Makefile |
2 | index 9b61da532c42..90478086eff5 100644 | ||
3 | --- a/Makefile | ||
4 | +++ b/Makefile | ||
5 | @@ -1,6 +1,6 @@ | ||
6 | VERSION = 4 | ||
7 | PATCHLEVEL = 9 | ||
8 | -SUBLEVEL = 165 | ||
9 | +SUBLEVEL = 166 | ||
10 | EXTRAVERSION = | ||
11 | NAME = Roaring Lionus | ||
12 | |||
13 | diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c | ||
14 | index 5963be2e05f0..28bef94cf792 100644 | ||
15 | --- a/arch/arm64/kernel/traps.c | ||
16 | +++ b/arch/arm64/kernel/traps.c | ||
17 | @@ -266,10 +266,12 @@ void die(const char *str, struct pt_regs *regs, int err) | ||
18 | { | ||
19 | struct thread_info *thread = current_thread_info(); | ||
20 | int ret; | ||
21 | + unsigned long flags; | ||
22 | + | ||
23 | + raw_spin_lock_irqsave(&die_lock, flags); | ||
24 | |||
25 | oops_enter(); | ||
26 | |||
27 | - raw_spin_lock_irq(&die_lock); | ||
28 | console_verbose(); | ||
29 | bust_spinlocks(1); | ||
30 | ret = __die(str, err, thread, regs); | ||
31 | @@ -279,13 +281,15 @@ void die(const char *str, struct pt_regs *regs, int err) | ||
32 | |||
33 | bust_spinlocks(0); | ||
34 | add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE); | ||
35 | - raw_spin_unlock_irq(&die_lock); | ||
36 | oops_exit(); | ||
37 | |||
38 | if (in_interrupt()) | ||
39 | panic("Fatal exception in interrupt"); | ||
40 | if (panic_on_oops) | ||
41 | panic("Fatal exception"); | ||
42 | + | ||
43 | + raw_spin_unlock_irqrestore(&die_lock, flags); | ||
44 | + | ||
45 | if (ret != NOTIFY_STOP) | ||
46 | do_exit(SIGSEGV); | ||
47 | } | ||
48 | diff --git a/arch/mips/include/asm/jump_label.h b/arch/mips/include/asm/jump_label.h | ||
49 | index e77672539e8e..e4456e450f94 100644 | ||
50 | --- a/arch/mips/include/asm/jump_label.h | ||
51 | +++ b/arch/mips/include/asm/jump_label.h | ||
52 | @@ -21,15 +21,15 @@ | ||
53 | #endif | ||
54 | |||
55 | #ifdef CONFIG_CPU_MICROMIPS | ||
56 | -#define NOP_INSN "nop32" | ||
57 | +#define B_INSN "b32" | ||
58 | #else | ||
59 | -#define NOP_INSN "nop" | ||
60 | +#define B_INSN "b" | ||
61 | #endif | ||
62 | |||
63 | static __always_inline bool arch_static_branch(struct static_key *key, bool branch) | ||
64 | { | ||
65 | - asm_volatile_goto("1:\t" NOP_INSN "\n\t" | ||
66 | - "nop\n\t" | ||
67 | + asm_volatile_goto("1:\t" B_INSN " 2f\n\t" | ||
68 | + "2:\tnop\n\t" | ||
69 | ".pushsection __jump_table, \"aw\"\n\t" | ||
70 | WORD_INSN " 1b, %l[l_yes], %0\n\t" | ||
71 | ".popsection\n\t" | ||
72 | diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S | ||
73 | index f0a0e6d62be3..2d965d91fee4 100644 | ||
74 | --- a/arch/mips/kernel/vmlinux.lds.S | ||
75 | +++ b/arch/mips/kernel/vmlinux.lds.S | ||
76 | @@ -138,6 +138,13 @@ SECTIONS | ||
77 | PERCPU_SECTION(1 << CONFIG_MIPS_L1_CACHE_SHIFT) | ||
78 | #endif | ||
79 | |||
80 | +#ifdef CONFIG_MIPS_ELF_APPENDED_DTB | ||
81 | + .appended_dtb : AT(ADDR(.appended_dtb) - LOAD_OFFSET) { | ||
82 | + *(.appended_dtb) | ||
83 | + KEEP(*(.appended_dtb)) | ||
84 | + } | ||
85 | +#endif | ||
86 | + | ||
87 | #ifdef CONFIG_RELOCATABLE | ||
88 | . = ALIGN(4); | ||
89 | |||
90 | @@ -162,11 +169,6 @@ SECTIONS | ||
91 | __appended_dtb = .; | ||
92 | /* leave space for appended DTB */ | ||
93 | . += 0x100000; | ||
94 | -#elif defined(CONFIG_MIPS_ELF_APPENDED_DTB) | ||
95 | - .appended_dtb : AT(ADDR(.appended_dtb) - LOAD_OFFSET) { | ||
96 | - *(.appended_dtb) | ||
97 | - KEEP(*(.appended_dtb)) | ||
98 | - } | ||
99 | #endif | ||
100 | /* | ||
101 | * Align to 64K in attempt to eliminate holes before the | ||
102 | diff --git a/arch/mips/loongson64/lemote-2f/irq.c b/arch/mips/loongson64/lemote-2f/irq.c | ||
103 | index cab5f43e0e29..d371f0294cbb 100644 | ||
104 | --- a/arch/mips/loongson64/lemote-2f/irq.c | ||
105 | +++ b/arch/mips/loongson64/lemote-2f/irq.c | ||
106 | @@ -102,7 +102,7 @@ static struct irqaction ip6_irqaction = { | ||
107 | static struct irqaction cascade_irqaction = { | ||
108 | .handler = no_action, | ||
109 | .name = "cascade", | ||
110 | - .flags = IRQF_NO_THREAD, | ||
111 | + .flags = IRQF_NO_THREAD | IRQF_NO_SUSPEND, | ||
112 | }; | ||
113 | |||
114 | void __init mach_init_irq(void) | ||
115 | diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | ||
116 | index aec6e9eef489..55884cb5a0fc 100644 | ||
117 | --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | ||
118 | +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | ||
119 | @@ -531,11 +531,9 @@ static int vmw_fb_set_par(struct fb_info *info) | ||
120 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
121 | DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) | ||
122 | }; | ||
123 | - struct drm_display_mode *old_mode; | ||
124 | struct drm_display_mode *mode; | ||
125 | int ret; | ||
126 | |||
127 | - old_mode = par->set_mode; | ||
128 | mode = drm_mode_duplicate(vmw_priv->dev, &new_mode); | ||
129 | if (!mode) { | ||
130 | DRM_ERROR("Could not create new fb mode.\n"); | ||
131 | @@ -546,11 +544,7 @@ static int vmw_fb_set_par(struct fb_info *info) | ||
132 | mode->vdisplay = var->yres; | ||
133 | vmw_guess_mode_timing(mode); | ||
134 | |||
135 | - if (old_mode && drm_mode_equal(old_mode, mode)) { | ||
136 | - drm_mode_destroy(vmw_priv->dev, mode); | ||
137 | - mode = old_mode; | ||
138 | - old_mode = NULL; | ||
139 | - } else if (!vmw_kms_validate_mode_vram(vmw_priv, | ||
140 | + if (!vmw_kms_validate_mode_vram(vmw_priv, | ||
141 | mode->hdisplay * | ||
142 | DIV_ROUND_UP(var->bits_per_pixel, 8), | ||
143 | mode->vdisplay)) { | ||
144 | @@ -613,8 +607,8 @@ static int vmw_fb_set_par(struct fb_info *info) | ||
145 | schedule_delayed_work(&par->local_work, 0); | ||
146 | |||
147 | out_unlock: | ||
148 | - if (old_mode) | ||
149 | - drm_mode_destroy(vmw_priv->dev, old_mode); | ||
150 | + if (par->set_mode) | ||
151 | + drm_mode_destroy(vmw_priv->dev, par->set_mode); | ||
152 | par->set_mode = mode; | ||
153 | |||
154 | drm_modeset_unlock_all(vmw_priv->dev); | ||
155 | diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c | ||
156 | index ca22483d253f..c1233d0288a0 100644 | ||
157 | --- a/drivers/iommu/amd_iommu.c | ||
158 | +++ b/drivers/iommu/amd_iommu.c | ||
159 | @@ -2599,7 +2599,12 @@ static int map_sg(struct device *dev, struct scatterlist *sglist, | ||
160 | |||
161 | /* Everything is mapped - write the right values into s->dma_address */ | ||
162 | for_each_sg(sglist, s, nelems, i) { | ||
163 | - s->dma_address += address + s->offset; | ||
164 | + /* | ||
165 | + * Add in the remaining piece of the scatter-gather offset that | ||
166 | + * was masked out when we were determining the physical address | ||
167 | + * via (sg_phys(s) & PAGE_MASK) earlier. | ||
168 | + */ | ||
169 | + s->dma_address += address + (s->offset & ~PAGE_MASK); | ||
170 | s->dma_length = s->length; | ||
171 | } | ||
172 | |||
173 | diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c | ||
174 | index 20397aba6849..d92967e2e385 100644 | ||
175 | --- a/drivers/media/usb/uvc/uvc_ctrl.c | ||
176 | +++ b/drivers/media/usb/uvc/uvc_ctrl.c | ||
177 | @@ -1203,7 +1203,7 @@ static void uvc_ctrl_fill_event(struct uvc_video_chain *chain, | ||
178 | |||
179 | __uvc_query_v4l2_ctrl(chain, ctrl, mapping, &v4l2_ctrl); | ||
180 | |||
181 | - memset(ev->reserved, 0, sizeof(ev->reserved)); | ||
182 | + memset(ev, 0, sizeof(*ev)); | ||
183 | ev->type = V4L2_EVENT_CTRL; | ||
184 | ev->id = v4l2_ctrl.id; | ||
185 | ev->u.ctrl.value = value; | ||
186 | diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c | ||
187 | index bd6884223a0d..c56d649fa7da 100644 | ||
188 | --- a/drivers/media/v4l2-core/v4l2-ctrls.c | ||
189 | +++ b/drivers/media/v4l2-core/v4l2-ctrls.c | ||
190 | @@ -1231,7 +1231,7 @@ static u32 user_flags(const struct v4l2_ctrl *ctrl) | ||
191 | |||
192 | static void fill_event(struct v4l2_event *ev, struct v4l2_ctrl *ctrl, u32 changes) | ||
193 | { | ||
194 | - memset(ev->reserved, 0, sizeof(ev->reserved)); | ||
195 | + memset(ev, 0, sizeof(*ev)); | ||
196 | ev->type = V4L2_EVENT_CTRL; | ||
197 | ev->id = ctrl->id; | ||
198 | ev->u.ctrl.changes = changes; | ||
199 | diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c | ||
200 | index c763b404510f..3e139692fe8f 100644 | ||
201 | --- a/drivers/mmc/host/pxamci.c | ||
202 | +++ b/drivers/mmc/host/pxamci.c | ||
203 | @@ -181,7 +181,7 @@ static void pxamci_dma_irq(void *param); | ||
204 | static void pxamci_setup_data(struct pxamci_host *host, struct mmc_data *data) | ||
205 | { | ||
206 | struct dma_async_tx_descriptor *tx; | ||
207 | - enum dma_data_direction direction; | ||
208 | + enum dma_transfer_direction direction; | ||
209 | struct dma_slave_config config; | ||
210 | struct dma_chan *chan; | ||
211 | unsigned int nob = data->blocks; | ||
212 | diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c | ||
213 | index 21aec5c252ee..bbfe7be214e1 100644 | ||
214 | --- a/drivers/net/wireless/ath/ath10k/wmi.c | ||
215 | +++ b/drivers/net/wireless/ath/ath10k/wmi.c | ||
216 | @@ -4277,7 +4277,7 @@ static void ath10k_tpc_config_disp_tables(struct ath10k *ar, | ||
217 | rate_code[i], | ||
218 | type); | ||
219 | snprintf(buff, sizeof(buff), "%8d ", tpc[j]); | ||
220 | - strncat(tpc_value, buff, strlen(buff)); | ||
221 | + strlcat(tpc_value, buff, sizeof(tpc_value)); | ||
222 | } | ||
223 | tpc_stats->tpc_table[type].pream_idx[i] = pream_idx; | ||
224 | tpc_stats->tpc_table[type].rate_code[i] = rate_code[i]; | ||
225 | diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c | ||
226 | index e664ca7c0afd..13f23c00538b 100644 | ||
227 | --- a/drivers/power/supply/charger-manager.c | ||
228 | +++ b/drivers/power/supply/charger-manager.c | ||
229 | @@ -1212,7 +1212,6 @@ static int charger_extcon_init(struct charger_manager *cm, | ||
230 | if (ret < 0) { | ||
231 | pr_info("Cannot register extcon_dev for %s(cable: %s)\n", | ||
232 | cable->extcon_name, cable->name); | ||
233 | - ret = -EINVAL; | ||
234 | } | ||
235 | |||
236 | return ret; | ||
237 | @@ -1634,7 +1633,7 @@ static int charger_manager_probe(struct platform_device *pdev) | ||
238 | |||
239 | if (IS_ERR(desc)) { | ||
240 | dev_err(&pdev->dev, "No platform data (desc) found\n"); | ||
241 | - return -ENODEV; | ||
242 | + return PTR_ERR(desc); | ||
243 | } | ||
244 | |||
245 | cm = devm_kzalloc(&pdev->dev, | ||
246 | diff --git a/drivers/rtc/rtc-lib.c b/drivers/rtc/rtc-lib.c | ||
247 | index e6bfb9c42a10..5b136bdc03d4 100644 | ||
248 | --- a/drivers/rtc/rtc-lib.c | ||
249 | +++ b/drivers/rtc/rtc-lib.c | ||
250 | @@ -52,13 +52,11 @@ EXPORT_SYMBOL(rtc_year_days); | ||
251 | */ | ||
252 | void rtc_time64_to_tm(time64_t time, struct rtc_time *tm) | ||
253 | { | ||
254 | - unsigned int month, year; | ||
255 | - unsigned long secs; | ||
256 | + unsigned int month, year, secs; | ||
257 | int days; | ||
258 | |||
259 | /* time must be positive */ | ||
260 | - days = div_s64(time, 86400); | ||
261 | - secs = time - (unsigned int) days * 86400; | ||
262 | + days = div_s64_rem(time, 86400, &secs); | ||
263 | |||
264 | /* day of the week, 1970-01-01 was a Thursday */ | ||
265 | tm->tm_wday = (days + 4) % 7; | ||
266 | diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c | ||
267 | index 5cfd56f08ffb..0b858414c558 100644 | ||
268 | --- a/drivers/scsi/ufs/ufshcd.c | ||
269 | +++ b/drivers/scsi/ufs/ufshcd.c | ||
270 | @@ -1348,10 +1348,11 @@ static int ufshcd_comp_devman_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp) | ||
271 | u32 upiu_flags; | ||
272 | int ret = 0; | ||
273 | |||
274 | - if (hba->ufs_version == UFSHCI_VERSION_20) | ||
275 | - lrbp->command_type = UTP_CMD_TYPE_UFS_STORAGE; | ||
276 | - else | ||
277 | + if ((hba->ufs_version == UFSHCI_VERSION_10) || | ||
278 | + (hba->ufs_version == UFSHCI_VERSION_11)) | ||
279 | lrbp->command_type = UTP_CMD_TYPE_DEV_MANAGE; | ||
280 | + else | ||
281 | + lrbp->command_type = UTP_CMD_TYPE_UFS_STORAGE; | ||
282 | |||
283 | ufshcd_prepare_req_desc_hdr(lrbp, &upiu_flags, DMA_NONE); | ||
284 | if (hba->dev_cmd.type == DEV_CMD_TYPE_QUERY) | ||
285 | @@ -1375,10 +1376,11 @@ static int ufshcd_comp_scsi_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp) | ||
286 | u32 upiu_flags; | ||
287 | int ret = 0; | ||
288 | |||
289 | - if (hba->ufs_version == UFSHCI_VERSION_20) | ||
290 | - lrbp->command_type = UTP_CMD_TYPE_UFS_STORAGE; | ||
291 | - else | ||
292 | + if ((hba->ufs_version == UFSHCI_VERSION_10) || | ||
293 | + (hba->ufs_version == UFSHCI_VERSION_11)) | ||
294 | lrbp->command_type = UTP_CMD_TYPE_SCSI; | ||
295 | + else | ||
296 | + lrbp->command_type = UTP_CMD_TYPE_UFS_STORAGE; | ||
297 | |||
298 | if (likely(lrbp->cmd)) { | ||
299 | ufshcd_prepare_req_desc_hdr(lrbp, &upiu_flags, | ||
300 | diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c | ||
301 | index 699447aa8b43..747560feb63e 100644 | ||
302 | --- a/drivers/tty/serial/sprd_serial.c | ||
303 | +++ b/drivers/tty/serial/sprd_serial.c | ||
304 | @@ -36,7 +36,7 @@ | ||
305 | #define SPRD_FIFO_SIZE 128 | ||
306 | #define SPRD_DEF_RATE 26000000 | ||
307 | #define SPRD_BAUD_IO_LIMIT 3000000 | ||
308 | -#define SPRD_TIMEOUT 256 | ||
309 | +#define SPRD_TIMEOUT 256000 | ||
310 | |||
311 | /* the offset of serial registers and BITs for them */ | ||
312 | /* data registers */ | ||
313 | @@ -63,6 +63,7 @@ | ||
314 | |||
315 | /* interrupt clear register */ | ||
316 | #define SPRD_ICLR 0x0014 | ||
317 | +#define SPRD_ICLR_TIMEOUT BIT(13) | ||
318 | |||
319 | /* line control register */ | ||
320 | #define SPRD_LCR 0x0018 | ||
321 | @@ -298,7 +299,8 @@ static irqreturn_t sprd_handle_irq(int irq, void *dev_id) | ||
322 | return IRQ_NONE; | ||
323 | } | ||
324 | |||
325 | - serial_out(port, SPRD_ICLR, ~0); | ||
326 | + if (ims & SPRD_IMSR_TIMEOUT) | ||
327 | + serial_out(port, SPRD_ICLR, SPRD_ICLR_TIMEOUT); | ||
328 | |||
329 | if (ims & (SPRD_IMSR_RX_FIFO_FULL | | ||
330 | SPRD_IMSR_BREAK_DETECT | SPRD_IMSR_TIMEOUT)) | ||
331 | diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c | ||
332 | index 5e6136d2ed71..c6578b321838 100644 | ||
333 | --- a/drivers/usb/core/config.c | ||
334 | +++ b/drivers/usb/core/config.c | ||
335 | @@ -763,18 +763,21 @@ void usb_destroy_configuration(struct usb_device *dev) | ||
336 | return; | ||
337 | |||
338 | if (dev->rawdescriptors) { | ||
339 | - for (i = 0; i < dev->descriptor.bNumConfigurations; i++) | ||
340 | + for (i = 0; i < dev->descriptor.bNumConfigurations && | ||
341 | + i < USB_MAXCONFIG; i++) | ||
342 | kfree(dev->rawdescriptors[i]); | ||
343 | |||
344 | kfree(dev->rawdescriptors); | ||
345 | dev->rawdescriptors = NULL; | ||
346 | } | ||
347 | |||
348 | - for (c = 0; c < dev->descriptor.bNumConfigurations; c++) { | ||
349 | + for (c = 0; c < dev->descriptor.bNumConfigurations && | ||
350 | + c < USB_MAXCONFIG; c++) { | ||
351 | struct usb_host_config *cf = &dev->config[c]; | ||
352 | |||
353 | kfree(cf->string); | ||
354 | - for (i = 0; i < cf->desc.bNumInterfaces; i++) { | ||
355 | + for (i = 0; i < cf->desc.bNumInterfaces && | ||
356 | + i < USB_MAXINTERFACES; i++) { | ||
357 | if (cf->intf_cache[i]) | ||
358 | kref_put(&cf->intf_cache[i]->ref, | ||
359 | usb_release_interface_cache); | ||
360 | diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c | ||
361 | index d95ae092f154..baa1510a5298 100644 | ||
362 | --- a/drivers/video/backlight/pwm_bl.c | ||
363 | +++ b/drivers/video/backlight/pwm_bl.c | ||
364 | @@ -54,10 +54,11 @@ static void pwm_backlight_power_on(struct pwm_bl_data *pb, int brightness) | ||
365 | if (err < 0) | ||
366 | dev_err(pb->dev, "failed to enable power supply\n"); | ||
367 | |||
368 | + pwm_enable(pb->pwm); | ||
369 | + | ||
370 | if (pb->enable_gpio) | ||
371 | gpiod_set_value_cansleep(pb->enable_gpio, 1); | ||
372 | |||
373 | - pwm_enable(pb->pwm); | ||
374 | pb->enabled = true; | ||
375 | } | ||
376 | |||
377 | @@ -66,12 +67,12 @@ static void pwm_backlight_power_off(struct pwm_bl_data *pb) | ||
378 | if (!pb->enabled) | ||
379 | return; | ||
380 | |||
381 | - pwm_config(pb->pwm, 0, pb->period); | ||
382 | - pwm_disable(pb->pwm); | ||
383 | - | ||
384 | if (pb->enable_gpio) | ||
385 | gpiod_set_value_cansleep(pb->enable_gpio, 0); | ||
386 | |||
387 | + pwm_config(pb->pwm, 0, pb->period); | ||
388 | + pwm_disable(pb->pwm); | ||
389 | + | ||
390 | regulator_disable(pb->power_supply); | ||
391 | pb->enabled = false; | ||
392 | } | ||
393 | diff --git a/fs/dcache.c b/fs/dcache.c | ||
394 | index 29c0286bd638..05bad55352bb 100644 | ||
395 | --- a/fs/dcache.c | ||
396 | +++ b/fs/dcache.c | ||
397 | @@ -1522,7 +1522,7 @@ static void check_and_drop(void *_data) | ||
398 | { | ||
399 | struct detach_data *data = _data; | ||
400 | |||
401 | - if (!data->mountpoint && !data->select.found) | ||
402 | + if (!data->mountpoint && list_empty(&data->select.dispose)) | ||
403 | __d_drop(data->select.start); | ||
404 | } | ||
405 | |||
406 | @@ -1564,17 +1564,15 @@ void d_invalidate(struct dentry *dentry) | ||
407 | |||
408 | d_walk(dentry, &data, detach_and_collect, check_and_drop); | ||
409 | |||
410 | - if (data.select.found) | ||
411 | + if (!list_empty(&data.select.dispose)) | ||
412 | shrink_dentry_list(&data.select.dispose); | ||
413 | + else if (!data.mountpoint) | ||
414 | + return; | ||
415 | |||
416 | if (data.mountpoint) { | ||
417 | detach_mounts(data.mountpoint); | ||
418 | dput(data.mountpoint); | ||
419 | } | ||
420 | - | ||
421 | - if (!data.mountpoint && !data.select.found) | ||
422 | - break; | ||
423 | - | ||
424 | cond_resched(); | ||
425 | } | ||
426 | } | ||
427 | diff --git a/fs/ext4/ext4_jbd2.h b/fs/ext4/ext4_jbd2.h | ||
428 | index f97611171023..4b7cc1af03a0 100644 | ||
429 | --- a/fs/ext4/ext4_jbd2.h | ||
430 | +++ b/fs/ext4/ext4_jbd2.h | ||
431 | @@ -391,7 +391,7 @@ static inline void ext4_update_inode_fsync_trans(handle_t *handle, | ||
432 | { | ||
433 | struct ext4_inode_info *ei = EXT4_I(inode); | ||
434 | |||
435 | - if (ext4_handle_valid(handle)) { | ||
436 | + if (ext4_handle_valid(handle) && !is_handle_aborted(handle)) { | ||
437 | ei->i_sync_tid = handle->h_transaction->t_tid; | ||
438 | if (datasync) | ||
439 | ei->i_datasync_tid = handle->h_transaction->t_tid; | ||
440 | diff --git a/fs/ext4/file.c b/fs/ext4/file.c | ||
441 | index 08fca4add1e2..fe76d0957a1f 100644 | ||
442 | --- a/fs/ext4/file.c | ||
443 | +++ b/fs/ext4/file.c | ||
444 | @@ -79,7 +79,7 @@ ext4_unaligned_aio(struct inode *inode, struct iov_iter *from, loff_t pos) | ||
445 | struct super_block *sb = inode->i_sb; | ||
446 | int blockmask = sb->s_blocksize - 1; | ||
447 | |||
448 | - if (pos >= i_size_read(inode)) | ||
449 | + if (pos >= ALIGN(i_size_read(inode), sb->s_blocksize)) | ||
450 | return 0; | ||
451 | |||
452 | if ((pos | iov_iter_alignment(from)) & blockmask) | ||
453 | diff --git a/fs/ext4/indirect.c b/fs/ext4/indirect.c | ||
454 | index 58229c1b4a3d..14007e621d2a 100644 | ||
455 | --- a/fs/ext4/indirect.c | ||
456 | +++ b/fs/ext4/indirect.c | ||
457 | @@ -1385,10 +1385,14 @@ end_range: | ||
458 | partial->p + 1, | ||
459 | partial2->p, | ||
460 | (chain+n-1) - partial); | ||
461 | - BUFFER_TRACE(partial->bh, "call brelse"); | ||
462 | - brelse(partial->bh); | ||
463 | - BUFFER_TRACE(partial2->bh, "call brelse"); | ||
464 | - brelse(partial2->bh); | ||
465 | + while (partial > chain) { | ||
466 | + BUFFER_TRACE(partial->bh, "call brelse"); | ||
467 | + brelse(partial->bh); | ||
468 | + } | ||
469 | + while (partial2 > chain2) { | ||
470 | + BUFFER_TRACE(partial2->bh, "call brelse"); | ||
471 | + brelse(partial2->bh); | ||
472 | + } | ||
473 | return 0; | ||
474 | } | ||
475 | |||
476 | diff --git a/fs/udf/truncate.c b/fs/udf/truncate.c | ||
477 | index 42b8c57795cb..c6ce7503a329 100644 | ||
478 | --- a/fs/udf/truncate.c | ||
479 | +++ b/fs/udf/truncate.c | ||
480 | @@ -260,6 +260,9 @@ void udf_truncate_extents(struct inode *inode) | ||
481 | epos.block = eloc; | ||
482 | epos.bh = udf_tread(sb, | ||
483 | udf_get_lb_pblock(sb, &eloc, 0)); | ||
484 | + /* Error reading indirect block? */ | ||
485 | + if (!epos.bh) | ||
486 | + return; | ||
487 | if (elen) | ||
488 | indirect_ext_len = | ||
489 | (elen + sb->s_blocksize - 1) >> | ||
490 | diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h | ||
491 | index a8a574897d3c..fe757514feb1 100644 | ||
492 | --- a/include/linux/ceph/libceph.h | ||
493 | +++ b/include/linux/ceph/libceph.h | ||
494 | @@ -276,6 +276,8 @@ extern void ceph_destroy_client(struct ceph_client *client); | ||
495 | extern int __ceph_open_session(struct ceph_client *client, | ||
496 | unsigned long started); | ||
497 | extern int ceph_open_session(struct ceph_client *client); | ||
498 | +int ceph_wait_for_latest_osdmap(struct ceph_client *client, | ||
499 | + unsigned long timeout); | ||
500 | |||
501 | /* pagevec.c */ | ||
502 | extern void ceph_release_page_vector(struct page **pages, int num_pages); | ||
503 | diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h | ||
504 | index 197a30d221e9..146054ceea8e 100644 | ||
505 | --- a/include/net/inet_connection_sock.h | ||
506 | +++ b/include/net/inet_connection_sock.h | ||
507 | @@ -289,11 +289,6 @@ static inline int inet_csk_reqsk_queue_len(const struct sock *sk) | ||
508 | return reqsk_queue_len(&inet_csk(sk)->icsk_accept_queue); | ||
509 | } | ||
510 | |||
511 | -static inline int inet_csk_reqsk_queue_young(const struct sock *sk) | ||
512 | -{ | ||
513 | - return reqsk_queue_len_young(&inet_csk(sk)->icsk_accept_queue); | ||
514 | -} | ||
515 | - | ||
516 | static inline int inet_csk_reqsk_queue_is_full(const struct sock *sk) | ||
517 | { | ||
518 | return inet_csk_reqsk_queue_len(sk) >= sk->sk_max_ack_backlog; | ||
519 | diff --git a/kernel/futex.c b/kernel/futex.c | ||
520 | index 30fe0432c46d..2e766ffff2cb 100644 | ||
521 | --- a/kernel/futex.c | ||
522 | +++ b/kernel/futex.c | ||
523 | @@ -3110,6 +3110,10 @@ int handle_futex_death(u32 __user *uaddr, struct task_struct *curr, int pi) | ||
524 | { | ||
525 | u32 uval, uninitialized_var(nval), mval; | ||
526 | |||
527 | + /* Futex address must be 32bit aligned */ | ||
528 | + if ((((unsigned long)uaddr) % sizeof(*uaddr)) != 0) | ||
529 | + return -1; | ||
530 | + | ||
531 | retry: | ||
532 | if (get_user(uval, uaddr)) | ||
533 | return -1; | ||
534 | diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c | ||
535 | index 26fc428476b9..d5b779d7e79f 100644 | ||
536 | --- a/kernel/locking/lockdep.c | ||
537 | +++ b/kernel/locking/lockdep.c | ||
538 | @@ -3446,6 +3446,9 @@ __lock_set_class(struct lockdep_map *lock, const char *name, | ||
539 | unsigned int depth; | ||
540 | int i; | ||
541 | |||
542 | + if (unlikely(!debug_locks)) | ||
543 | + return 0; | ||
544 | + | ||
545 | depth = curr->lockdep_depth; | ||
546 | /* | ||
547 | * This function is about (re)setting the class of a held lock, | ||
548 | diff --git a/lib/int_sqrt.c b/lib/int_sqrt.c | ||
549 | index 1ef4cc344977..1afb545a37c5 100644 | ||
550 | --- a/lib/int_sqrt.c | ||
551 | +++ b/lib/int_sqrt.c | ||
552 | @@ -22,6 +22,9 @@ unsigned long int_sqrt(unsigned long x) | ||
553 | return x; | ||
554 | |||
555 | m = 1UL << (BITS_PER_LONG - 2); | ||
556 | + while (m > x) | ||
557 | + m >>= 2; | ||
558 | + | ||
559 | while (m != 0) { | ||
560 | b = y + m; | ||
561 | y >>= 1; | ||
562 | diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c | ||
563 | index c88a6007e643..ca1836941f3c 100644 | ||
564 | --- a/net/bluetooth/hci_sock.c | ||
565 | +++ b/net/bluetooth/hci_sock.c | ||
566 | @@ -826,8 +826,6 @@ static int hci_sock_release(struct socket *sock) | ||
567 | if (!sk) | ||
568 | return 0; | ||
569 | |||
570 | - hdev = hci_pi(sk)->hdev; | ||
571 | - | ||
572 | switch (hci_pi(sk)->channel) { | ||
573 | case HCI_CHANNEL_MONITOR: | ||
574 | atomic_dec(&monitor_promisc); | ||
575 | @@ -849,6 +847,7 @@ static int hci_sock_release(struct socket *sock) | ||
576 | |||
577 | bt_sock_unlink(&hci_sk_list, sk); | ||
578 | |||
579 | + hdev = hci_pi(sk)->hdev; | ||
580 | if (hdev) { | ||
581 | if (hci_pi(sk)->channel == HCI_CHANNEL_USER) { | ||
582 | /* When releasing an user channel exclusive access, | ||
583 | diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c | ||
584 | index 464e88599b9d..bf0294cf4d22 100644 | ||
585 | --- a/net/ceph/ceph_common.c | ||
586 | +++ b/net/ceph/ceph_common.c | ||
587 | @@ -699,7 +699,6 @@ int __ceph_open_session(struct ceph_client *client, unsigned long started) | ||
588 | } | ||
589 | EXPORT_SYMBOL(__ceph_open_session); | ||
590 | |||
591 | - | ||
592 | int ceph_open_session(struct ceph_client *client) | ||
593 | { | ||
594 | int ret; | ||
595 | @@ -715,6 +714,23 @@ int ceph_open_session(struct ceph_client *client) | ||
596 | } | ||
597 | EXPORT_SYMBOL(ceph_open_session); | ||
598 | |||
599 | +int ceph_wait_for_latest_osdmap(struct ceph_client *client, | ||
600 | + unsigned long timeout) | ||
601 | +{ | ||
602 | + u64 newest_epoch; | ||
603 | + int ret; | ||
604 | + | ||
605 | + ret = ceph_monc_get_version(&client->monc, "osdmap", &newest_epoch); | ||
606 | + if (ret) | ||
607 | + return ret; | ||
608 | + | ||
609 | + if (client->osdc.osdmap->epoch >= newest_epoch) | ||
610 | + return 0; | ||
611 | + | ||
612 | + ceph_osdc_maybe_request_map(&client->osdc); | ||
613 | + return ceph_monc_wait_osdmap(&client->monc, newest_epoch, timeout); | ||
614 | +} | ||
615 | +EXPORT_SYMBOL(ceph_wait_for_latest_osdmap); | ||
616 | |||
617 | static int __init init_ceph_lib(void) | ||
618 | { | ||
619 | diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c | ||
620 | index 500481003de4..288c1fcbcdf6 100644 | ||
621 | --- a/net/ceph/mon_client.c | ||
622 | +++ b/net/ceph/mon_client.c | ||
623 | @@ -914,6 +914,15 @@ int ceph_monc_blacklist_add(struct ceph_mon_client *monc, | ||
624 | mutex_unlock(&monc->mutex); | ||
625 | |||
626 | ret = wait_generic_request(req); | ||
627 | + if (!ret) | ||
628 | + /* | ||
629 | + * Make sure we have the osdmap that includes the blacklist | ||
630 | + * entry. This is needed to ensure that the OSDs pick up the | ||
631 | + * new blacklist before processing any future requests from | ||
632 | + * this client. | ||
633 | + */ | ||
634 | + ret = ceph_wait_for_latest_osdmap(monc->client, 0); | ||
635 | + | ||
636 | out: | ||
637 | put_generic_request(req); | ||
638 | return ret; | ||
639 | diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c | ||
640 | index 28ad6f187e19..1d6d3aaa8c3d 100644 | ||
641 | --- a/net/dccp/ipv4.c | ||
642 | +++ b/net/dccp/ipv4.c | ||
643 | @@ -596,13 +596,7 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | ||
644 | if (inet_csk_reqsk_queue_is_full(sk)) | ||
645 | goto drop; | ||
646 | |||
647 | - /* | ||
648 | - * Accept backlog is full. If we have already queued enough | ||
649 | - * of warm entries in syn queue, drop request. It is better than | ||
650 | - * clogging syn queue with openreqs with exponentially increasing | ||
651 | - * timeout. | ||
652 | - */ | ||
653 | - if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) | ||
654 | + if (sk_acceptq_is_full(sk)) | ||
655 | goto drop; | ||
656 | |||
657 | req = inet_reqsk_alloc(&dccp_request_sock_ops, sk, true); | ||
658 | diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c | ||
659 | index 6cbcf399d22b..93c706172f40 100644 | ||
660 | --- a/net/dccp/ipv6.c | ||
661 | +++ b/net/dccp/ipv6.c | ||
662 | @@ -328,7 +328,7 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb) | ||
663 | if (inet_csk_reqsk_queue_is_full(sk)) | ||
664 | goto drop; | ||
665 | |||
666 | - if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) | ||
667 | + if (sk_acceptq_is_full(sk)) | ||
668 | goto drop; | ||
669 | |||
670 | req = inet_reqsk_alloc(&dccp6_request_sock_ops, sk, true); | ||
671 | diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c | ||
672 | index 48fe63c4fe24..cd4f13dda49e 100644 | ||
673 | --- a/net/ipv4/tcp_input.c | ||
674 | +++ b/net/ipv4/tcp_input.c | ||
675 | @@ -6374,13 +6374,7 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops, | ||
676 | goto drop; | ||
677 | } | ||
678 | |||
679 | - | ||
680 | - /* Accept backlog is full. If we have already queued enough | ||
681 | - * of warm entries in syn queue, drop request. It is better than | ||
682 | - * clogging syn queue with openreqs with exponentially increasing | ||
683 | - * timeout. | ||
684 | - */ | ||
685 | - if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) { | ||
686 | + if (sk_acceptq_is_full(sk)) { | ||
687 | NET_INC_STATS(sock_net(sk), LINUX_MIB_LISTENOVERFLOWS); | ||
688 | goto drop; | ||
689 | } | ||
690 | diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c | ||
691 | index c6b046ddefdd..1b5e217d1bb2 100644 | ||
692 | --- a/sound/pci/hda/hda_codec.c | ||
693 | +++ b/sound/pci/hda/hda_codec.c | ||
694 | @@ -3004,6 +3004,7 @@ static void hda_call_codec_resume(struct hda_codec *codec) | ||
695 | hda_jackpoll_work(&codec->jackpoll_work.work); | ||
696 | else | ||
697 | snd_hda_jack_report_sync(codec); | ||
698 | + codec->core.dev.power.power_state = PMSG_ON; | ||
699 | atomic_dec(&codec->core.in_pm); | ||
700 | } | ||
701 | |||
702 | @@ -3036,10 +3037,62 @@ static int hda_codec_runtime_resume(struct device *dev) | ||
703 | } | ||
704 | #endif /* CONFIG_PM */ | ||
705 | |||
706 | +#ifdef CONFIG_PM_SLEEP | ||
707 | +static int hda_codec_force_resume(struct device *dev) | ||
708 | +{ | ||
709 | + int ret; | ||
710 | + | ||
711 | + /* The get/put pair below enforces the runtime resume even if the | ||
712 | + * device hasn't been used at suspend time. This trick is needed to | ||
713 | + * update the jack state change during the sleep. | ||
714 | + */ | ||
715 | + pm_runtime_get_noresume(dev); | ||
716 | + ret = pm_runtime_force_resume(dev); | ||
717 | + pm_runtime_put(dev); | ||
718 | + return ret; | ||
719 | +} | ||
720 | + | ||
721 | +static int hda_codec_pm_suspend(struct device *dev) | ||
722 | +{ | ||
723 | + dev->power.power_state = PMSG_SUSPEND; | ||
724 | + return pm_runtime_force_suspend(dev); | ||
725 | +} | ||
726 | + | ||
727 | +static int hda_codec_pm_resume(struct device *dev) | ||
728 | +{ | ||
729 | + dev->power.power_state = PMSG_RESUME; | ||
730 | + return hda_codec_force_resume(dev); | ||
731 | +} | ||
732 | + | ||
733 | +static int hda_codec_pm_freeze(struct device *dev) | ||
734 | +{ | ||
735 | + dev->power.power_state = PMSG_FREEZE; | ||
736 | + return pm_runtime_force_suspend(dev); | ||
737 | +} | ||
738 | + | ||
739 | +static int hda_codec_pm_thaw(struct device *dev) | ||
740 | +{ | ||
741 | + dev->power.power_state = PMSG_THAW; | ||
742 | + return hda_codec_force_resume(dev); | ||
743 | +} | ||
744 | + | ||
745 | +static int hda_codec_pm_restore(struct device *dev) | ||
746 | +{ | ||
747 | + dev->power.power_state = PMSG_RESTORE; | ||
748 | + return hda_codec_force_resume(dev); | ||
749 | +} | ||
750 | +#endif /* CONFIG_PM_SLEEP */ | ||
751 | + | ||
752 | /* referred in hda_bind.c */ | ||
753 | const struct dev_pm_ops hda_codec_driver_pm = { | ||
754 | - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, | ||
755 | - pm_runtime_force_resume) | ||
756 | +#ifdef CONFIG_PM_SLEEP | ||
757 | + .suspend = hda_codec_pm_suspend, | ||
758 | + .resume = hda_codec_pm_resume, | ||
759 | + .freeze = hda_codec_pm_freeze, | ||
760 | + .thaw = hda_codec_pm_thaw, | ||
761 | + .poweroff = hda_codec_pm_suspend, | ||
762 | + .restore = hda_codec_pm_restore, | ||
763 | +#endif /* CONFIG_PM_SLEEP */ | ||
764 | SET_RUNTIME_PM_OPS(hda_codec_runtime_suspend, hda_codec_runtime_resume, | ||
765 | NULL) | ||
766 | }; | ||
767 | diff --git a/tools/objtool/check.c b/tools/objtool/check.c | ||
768 | index e128d1c71c30..3ff025b64527 100644 | ||
769 | --- a/tools/objtool/check.c | ||
770 | +++ b/tools/objtool/check.c | ||
771 | @@ -2132,9 +2132,10 @@ static void cleanup(struct objtool_file *file) | ||
772 | elf_close(file->elf); | ||
773 | } | ||
774 | |||
775 | +static struct objtool_file file; | ||
776 | + | ||
777 | int check(const char *_objname, bool orc) | ||
778 | { | ||
779 | - struct objtool_file file; | ||
780 | int ret, warnings = 0; | ||
781 | |||
782 | objname = _objname; |