Skip to content

Commit 76dcd71

Browse files
committed
Merge tag 'v4.9.237' into R
This is the 4.9.237 stable release
2 parents f52bad8 + 4dd8bb0 commit 76dcd71

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+612
-829
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION = 4
22
PATCHLEVEL = 9
3-
SUBLEVEL = 236
3+
SUBLEVEL = 237
44
EXTRAVERSION =
55
NAME = Roaring Lionus
66

arch/arc/plat-eznps/include/plat/ctop.h

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
#define CTOP_AUX_HW_COMPLY (CTOP_AUX_BASE + 0x024)
4343
#define CTOP_AUX_LPC (CTOP_AUX_BASE + 0x030)
4444
#define CTOP_AUX_EFLAGS (CTOP_AUX_BASE + 0x080)
45-
#define CTOP_AUX_IACK (CTOP_AUX_BASE + 0x088)
4645
#define CTOP_AUX_GPA1 (CTOP_AUX_BASE + 0x08C)
4746
#define CTOP_AUX_UDMC (CTOP_AUX_BASE + 0x300)
4847

arch/arm/boot/dts/socfpga_arria10.dtsi

+1-1
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@
710710
timer3: timer3@ffd00100 {
711711
compatible = "snps,dw-apb-timer";
712712
interrupts = <0 118 IRQ_TYPE_LEVEL_HIGH>;
713-
reg = <0xffd01000 0x100>;
713+
reg = <0xffd00100 0x100>;
714714
clocks = <&l4_sys_free_clk>;
715715
clock-names = "timer";
716716
};

arch/mips/Kconfig

+1
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,7 @@ config SNI_RM
848848
select I8253
849849
select I8259
850850
select ISA
851+
select MIPS_L1_CACHE_SHIFT_6
851852
select SWAP_IO_SPACE if CPU_BIG_ENDIAN
852853
select SYS_HAS_CPU_R4X00
853854
select SYS_HAS_CPU_R5000

arch/mips/sni/a20r.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,10 @@ static struct platform_device sc26xx_pdev = {
143143
},
144144
};
145145

146-
static u32 a20r_ack_hwint(void)
146+
/*
147+
* Trigger chipset to update CPU's CAUSE IP field
148+
*/
149+
static u32 a20r_update_cause_ip(void)
147150
{
148151
u32 status = read_c0_status();
149152

@@ -205,12 +208,14 @@ static void a20r_hwint(void)
205208
int irq;
206209

207210
clear_c0_status(IE_IRQ0);
208-
status = a20r_ack_hwint();
211+
status = a20r_update_cause_ip();
209212
cause = read_c0_cause();
210213

211214
irq = ffs(((cause & status) >> 8) & 0xf8);
212215
if (likely(irq > 0))
213216
do_IRQ(SNI_A20R_IRQ_BASE + irq - 1);
217+
218+
a20r_update_cause_ip();
214219
set_c0_status(IE_IRQ0);
215220
}
216221

arch/powerpc/configs/pasemi_defconfig

-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ CONFIG_FB_NVIDIA=y
115115
CONFIG_FB_NVIDIA_I2C=y
116116
CONFIG_FB_RADEON=y
117117
# CONFIG_LCD_CLASS_DEVICE is not set
118-
CONFIG_VGACON_SOFT_SCROLLBACK=y
119118
CONFIG_LOGO=y
120119
CONFIG_SOUND=y
121120
CONFIG_SND=y

arch/powerpc/configs/ppc6xx_defconfig

-1
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,6 @@ CONFIG_FB_TRIDENT=m
796796
CONFIG_FB_SM501=m
797797
CONFIG_FB_IBM_GXT4500=y
798798
CONFIG_LCD_PLATFORM=m
799-
CONFIG_VGACON_SOFT_SCROLLBACK=y
800799
CONFIG_FRAMEBUFFER_CONSOLE=y
801800
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
802801
CONFIG_LOGO=y

arch/powerpc/kernel/dma-iommu.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ static u64 dma_iommu_get_required_mask(struct device *dev)
9999
if (!tbl)
100100
return 0;
101101

102-
mask = 1ULL < (fls_long(tbl->it_offset + tbl->it_size) - 1);
102+
mask = 1ULL << (fls_long(tbl->it_offset + tbl->it_size) +
103+
tbl->it_page_shift - 1);
103104
mask += mask - 1;
104105

105106
return mask;

arch/x86/configs/i386_defconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ CONFIG_FB_MODE_HELPERS=y
217217
CONFIG_FB_TILEBLITTING=y
218218
CONFIG_FB_EFI=y
219219
# CONFIG_LCD_CLASS_DEVICE is not set
220-
CONFIG_VGACON_SOFT_SCROLLBACK=y
221220
CONFIG_LOGO=y
222221
# CONFIG_LOGO_LINUX_MONO is not set
223222
# CONFIG_LOGO_LINUX_VGA16 is not set
@@ -247,6 +246,7 @@ CONFIG_USB_HIDDEV=y
247246
CONFIG_USB=y
248247
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
249248
CONFIG_USB_MON=y
249+
CONFIG_USB_XHCI_HCD=y
250250
CONFIG_USB_EHCI_HCD=y
251251
CONFIG_USB_EHCI_TT_NEWSCHED=y
252252
CONFIG_USB_OHCI_HCD=y

arch/x86/configs/x86_64_defconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ CONFIG_FB_MODE_HELPERS=y
212212
CONFIG_FB_TILEBLITTING=y
213213
CONFIG_FB_EFI=y
214214
# CONFIG_LCD_CLASS_DEVICE is not set
215-
CONFIG_VGACON_SOFT_SCROLLBACK=y
216215
CONFIG_LOGO=y
217216
# CONFIG_LOGO_LINUX_MONO is not set
218217
# CONFIG_LOGO_LINUX_VGA16 is not set
@@ -242,6 +241,7 @@ CONFIG_USB_HIDDEV=y
242241
CONFIG_USB=y
243242
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
244243
CONFIG_USB_MON=y
244+
CONFIG_USB_XHCI_HCD=y
245245
CONFIG_USB_EHCI_HCD=y
246246
CONFIG_USB_EHCI_TT_NEWSCHED=y
247247
CONFIG_USB_OHCI_HCD=y

arch/x86/kvm/vmx.c

+1
Original file line numberDiff line numberDiff line change
@@ -8606,6 +8606,7 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu)
86068606
(exit_reason != EXIT_REASON_EXCEPTION_NMI &&
86078607
exit_reason != EXIT_REASON_EPT_VIOLATION &&
86088608
exit_reason != EXIT_REASON_PML_FULL &&
8609+
exit_reason != EXIT_REASON_APIC_ACCESS &&
86098610
exit_reason != EXIT_REASON_TASK_SWITCH)) {
86108611
vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
86118612
vcpu->run->internal.suberror = KVM_INTERNAL_ERROR_DELIVERY_EV;

drivers/atm/firestream.c

+1
Original file line numberDiff line numberDiff line change
@@ -1013,6 +1013,7 @@ static int fs_open(struct atm_vcc *atm_vcc)
10131013
error = make_rate (pcr, r, &tmc0, NULL);
10141014
if (error) {
10151015
kfree(tc);
1016+
kfree(vcc);
10161017
return error;
10171018
}
10181019
}

drivers/block/rbd.c

+12
Original file line numberDiff line numberDiff line change
@@ -4614,6 +4614,9 @@ static ssize_t rbd_config_info_show(struct device *dev,
46144614
{
46154615
struct rbd_device *rbd_dev = dev_to_rbd_dev(dev);
46164616

4617+
if (!capable(CAP_SYS_ADMIN))
4618+
return -EPERM;
4619+
46174620
return sprintf(buf, "%s\n", rbd_dev->config_info);
46184621
}
46194622

@@ -4715,6 +4718,9 @@ static ssize_t rbd_image_refresh(struct device *dev,
47154718
struct rbd_device *rbd_dev = dev_to_rbd_dev(dev);
47164719
int ret;
47174720

4721+
if (!capable(CAP_SYS_ADMIN))
4722+
return -EPERM;
4723+
47184724
ret = rbd_dev_refresh(rbd_dev);
47194725
if (ret)
47204726
return ret;
@@ -6192,6 +6198,9 @@ static ssize_t do_rbd_add(struct bus_type *bus,
61926198
bool read_only;
61936199
int rc;
61946200

6201+
if (!capable(CAP_SYS_ADMIN))
6202+
return -EPERM;
6203+
61956204
if (!try_module_get(THIS_MODULE))
61966205
return -ENODEV;
61976206

@@ -6340,6 +6349,9 @@ static ssize_t do_rbd_remove(struct bus_type *bus,
63406349
bool force = false;
63416350
int ret;
63426351

6352+
if (!capable(CAP_SYS_ADMIN))
6353+
return -EPERM;
6354+
63436355
dev_id = -1;
63446356
opt_buf[0] = '\0';
63456357
sscanf(buf, "%d %5s", &dev_id, opt_buf);

drivers/clk/rockchip/clk-rk3228.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ PNAME(mux_usb480m_p) = { "usb480m_phy", "xin24m" };
126126
PNAME(mux_hdmiphy_p) = { "hdmiphy_phy", "xin24m" };
127127
PNAME(mux_aclk_cpu_src_p) = { "cpll_aclk_cpu", "gpll_aclk_cpu", "hdmiphy_aclk_cpu" };
128128

129-
PNAME(mux_pll_src_4plls_p) = { "cpll", "gpll", "hdmiphy" "usb480m" };
129+
PNAME(mux_pll_src_4plls_p) = { "cpll", "gpll", "hdmiphy", "usb480m" };
130130
PNAME(mux_pll_src_3plls_p) = { "cpll", "gpll", "hdmiphy" };
131131
PNAME(mux_pll_src_2plls_p) = { "cpll", "gpll" };
132132
PNAME(mux_sclk_hdmi_cec_p) = { "cpll", "gpll", "xin24m" };

drivers/gpu/drm/mediatek/mtk_drm_drv.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,13 @@ static int mtk_drm_probe(struct platform_device *pdev)
457457
pm_runtime_disable(dev);
458458
err_node:
459459
of_node_put(private->mutex_node);
460-
for (i = 0; i < DDP_COMPONENT_ID_MAX; i++)
460+
for (i = 0; i < DDP_COMPONENT_ID_MAX; i++) {
461461
of_node_put(private->comp_node[i]);
462+
if (private->ddp_comp[i]) {
463+
put_device(private->ddp_comp[i]->larb_dev);
464+
private->ddp_comp[i] = NULL;
465+
}
466+
}
462467
return ret;
463468
}
464469

drivers/hv/channel_mgmt.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ static void vmbus_wait_for_unload(void)
681681
void *page_addr;
682682
struct hv_message *msg;
683683
struct vmbus_channel_message_header *hdr;
684-
u32 message_type;
684+
u32 message_type, i;
685685

686686
/*
687687
* CHANNELMSG_UNLOAD_RESPONSE is always delivered to the CPU which was
@@ -691,8 +691,11 @@ static void vmbus_wait_for_unload(void)
691691
* functional and vmbus_unload_response() will complete
692692
* vmbus_connection.unload_event. If not, the last thing we can do is
693693
* read message pages for all CPUs directly.
694+
*
695+
* Wait no more than 10 seconds so that the panic path can't get
696+
* hung forever in case the response message isn't seen.
694697
*/
695-
while (1) {
698+
for (i = 0; i < 1000; i++) {
696699
if (completion_done(&vmbus_connection.unload_event))
697700
break;
698701

drivers/i2c/algos/i2c-algo-pca.c

+23-12
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,22 @@ static void pca_reset(struct i2c_algo_pca_data *adap)
5050
pca_outw(adap, I2C_PCA_INDPTR, I2C_PCA_IPRESET);
5151
pca_outw(adap, I2C_PCA_IND, 0xA5);
5252
pca_outw(adap, I2C_PCA_IND, 0x5A);
53+
54+
/*
55+
* After a reset we need to re-apply any configuration
56+
* (calculated in pca_init) to get the bus in a working state.
57+
*/
58+
pca_outw(adap, I2C_PCA_INDPTR, I2C_PCA_IMODE);
59+
pca_outw(adap, I2C_PCA_IND, adap->bus_settings.mode);
60+
pca_outw(adap, I2C_PCA_INDPTR, I2C_PCA_ISCLL);
61+
pca_outw(adap, I2C_PCA_IND, adap->bus_settings.tlow);
62+
pca_outw(adap, I2C_PCA_INDPTR, I2C_PCA_ISCLH);
63+
pca_outw(adap, I2C_PCA_IND, adap->bus_settings.thi);
64+
65+
pca_set_con(adap, I2C_PCA_CON_ENSIO);
5366
} else {
5467
adap->reset_chip(adap->data);
68+
pca_set_con(adap, I2C_PCA_CON_ENSIO | adap->bus_settings.clock_freq);
5569
}
5670
}
5771

@@ -435,13 +449,14 @@ static int pca_init(struct i2c_adapter *adap)
435449
" Use the nominal frequency.\n", adap->name);
436450
}
437451

438-
pca_reset(pca_data);
439-
440452
clock = pca_clock(pca_data);
441453
printk(KERN_INFO "%s: Clock frequency is %dkHz\n",
442454
adap->name, freqs[clock]);
443455

444-
pca_set_con(pca_data, I2C_PCA_CON_ENSIO | clock);
456+
/* Store settings as these will be needed when the PCA chip is reset */
457+
pca_data->bus_settings.clock_freq = clock;
458+
459+
pca_reset(pca_data);
445460
} else {
446461
int clock;
447462
int mode;
@@ -508,19 +523,15 @@ static int pca_init(struct i2c_adapter *adap)
508523
thi = tlow * min_thi / min_tlow;
509524
}
510525

526+
/* Store settings as these will be needed when the PCA chip is reset */
527+
pca_data->bus_settings.mode = mode;
528+
pca_data->bus_settings.tlow = tlow;
529+
pca_data->bus_settings.thi = thi;
530+
511531
pca_reset(pca_data);
512532

513533
printk(KERN_INFO
514534
"%s: Clock frequency is %dHz\n", adap->name, clock * 100);
515-
516-
pca_outw(pca_data, I2C_PCA_INDPTR, I2C_PCA_IMODE);
517-
pca_outw(pca_data, I2C_PCA_IND, mode);
518-
pca_outw(pca_data, I2C_PCA_INDPTR, I2C_PCA_ISCLL);
519-
pca_outw(pca_data, I2C_PCA_IND, tlow);
520-
pca_outw(pca_data, I2C_PCA_INDPTR, I2C_PCA_ISCLH);
521-
pca_outw(pca_data, I2C_PCA_IND, thi);
522-
523-
pca_set_con(pca_data, I2C_PCA_CON_ENSIO);
524535
}
525536
udelay(500); /* 500 us for oscillator to stabilise */
526537

drivers/iio/accel/bmc150-accel-core.c

+12-3
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,14 @@ struct bmc150_accel_data {
197197
struct mutex mutex;
198198
u8 fifo_mode, watermark;
199199
s16 buffer[8];
200+
/*
201+
* Ensure there is sufficient space and correct alignment for
202+
* the timestamp if enabled
203+
*/
204+
struct {
205+
__le16 channels[3];
206+
s64 ts __aligned(8);
207+
} scan;
200208
u8 bw_bits;
201209
u32 slope_dur;
202210
u32 slope_thres;
@@ -933,15 +941,16 @@ static int __bmc150_accel_fifo_flush(struct iio_dev *indio_dev,
933941
* now.
934942
*/
935943
for (i = 0; i < count; i++) {
936-
u16 sample[8];
937944
int j, bit;
938945

939946
j = 0;
940947
for_each_set_bit(bit, indio_dev->active_scan_mask,
941948
indio_dev->masklength)
942-
memcpy(&sample[j++], &buffer[i * 3 + bit], 2);
949+
memcpy(&data->scan.channels[j++], &buffer[i * 3 + bit],
950+
sizeof(data->scan.channels[0]));
943951

944-
iio_push_to_buffers_with_timestamp(indio_dev, sample, tstamp);
952+
iio_push_to_buffers_with_timestamp(indio_dev, &data->scan,
953+
tstamp);
945954

946955
tstamp += sample_period;
947956
}

drivers/iio/accel/kxsd9.c

+11-5
Original file line numberDiff line numberDiff line change
@@ -212,22 +212,28 @@ static irqreturn_t kxsd9_trigger_handler(int irq, void *p)
212212
const struct iio_poll_func *pf = p;
213213
struct iio_dev *indio_dev = pf->indio_dev;
214214
struct kxsd9_state *st = iio_priv(indio_dev);
215+
/*
216+
* Ensure correct positioning and alignment of timestamp.
217+
* No need to zero initialize as all elements written.
218+
*/
219+
struct {
220+
__be16 chan[4];
221+
s64 ts __aligned(8);
222+
} hw_values;
215223
int ret;
216-
/* 4 * 16bit values AND timestamp */
217-
__be16 hw_values[8];
218224

219225
ret = regmap_bulk_read(st->map,
220226
KXSD9_REG_X,
221-
&hw_values,
222-
8);
227+
hw_values.chan,
228+
sizeof(hw_values.chan));
223229
if (ret) {
224230
dev_err(st->dev,
225231
"error reading data\n");
226232
return ret;
227233
}
228234

229235
iio_push_to_buffers_with_timestamp(indio_dev,
230-
hw_values,
236+
&hw_values,
231237
iio_get_time_ns(indio_dev));
232238
iio_trigger_notify_done(indio_dev->trig);
233239

drivers/iio/accel/mma7455_core.c

+12-4
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@
5555

5656
struct mma7455_data {
5757
struct regmap *regmap;
58+
/*
59+
* Used to reorganize data. Will ensure correct alignment of
60+
* the timestamp if present
61+
*/
62+
struct {
63+
__le16 channels[3];
64+
s64 ts __aligned(8);
65+
} scan;
5866
};
5967

6068
static int mma7455_drdy(struct mma7455_data *mma7455)
@@ -85,19 +93,19 @@ static irqreturn_t mma7455_trigger_handler(int irq, void *p)
8593
struct iio_poll_func *pf = p;
8694
struct iio_dev *indio_dev = pf->indio_dev;
8795
struct mma7455_data *mma7455 = iio_priv(indio_dev);
88-
u8 buf[16]; /* 3 x 16-bit channels + padding + ts */
8996
int ret;
9097

9198
ret = mma7455_drdy(mma7455);
9299
if (ret)
93100
goto done;
94101

95-
ret = regmap_bulk_read(mma7455->regmap, MMA7455_REG_XOUTL, buf,
96-
sizeof(__le16) * 3);
102+
ret = regmap_bulk_read(mma7455->regmap, MMA7455_REG_XOUTL,
103+
mma7455->scan.channels,
104+
sizeof(mma7455->scan.channels));
97105
if (ret)
98106
goto done;
99107

100-
iio_push_to_buffers_with_timestamp(indio_dev, buf,
108+
iio_push_to_buffers_with_timestamp(indio_dev, &mma7455->scan,
101109
iio_get_time_ns(indio_dev));
102110

103111
done:

0 commit comments

Comments
 (0)