Skip to content

Commit 0097883

Browse files
committed
Merge tag 'v4.14.52' into master-next
This is the 4.14.52 stable release Signed-off-by: Jack Vogel <[email protected]>
2 parents 1399b72 + a26899e commit 0097883

Some content is hidden

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

56 files changed

+471
-213
lines changed

arch/x86/kernel/cpu/intel_rdt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,8 @@ static __init void rdt_quirks(void)
773773
case INTEL_FAM6_SKYLAKE_X:
774774
if (boot_cpu_data.x86_stepping <= 4)
775775
set_rdt_options("!cmt,!mbmtotal,!mbmlocal,!l3cat");
776+
else
777+
set_rdt_options("!l3cat");
776778
}
777779
}
778780

arch/x86/kernel/cpu/mcheck/mce-inject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static struct dentry *dfs_inj;
4848

4949
static u8 n_banks;
5050

51-
#define MAX_FLAG_OPT_SIZE 3
51+
#define MAX_FLAG_OPT_SIZE 4
5252
#define NBCFG 0x44
5353

5454
enum injection_type {

block/blk-mq.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2284,16 +2284,15 @@ static void blk_mq_del_queue_tag_set(struct request_queue *q)
22842284

22852285
mutex_lock(&set->tag_list_lock);
22862286
list_del_rcu(&q->tag_set_list);
2287-
INIT_LIST_HEAD(&q->tag_set_list);
22882287
if (list_is_singular(&set->tag_list)) {
22892288
/* just transitioned to unshared */
22902289
set->flags &= ~BLK_MQ_F_TAG_SHARED;
22912290
/* update existing queue */
22922291
blk_mq_update_tag_set_depth(set, false);
22932292
}
22942293
mutex_unlock(&set->tag_list_lock);
2295-
22962294
synchronize_rcu();
2295+
INIT_LIST_HEAD(&q->tag_set_list);
22972296
}
22982297

22992298
static void blk_mq_add_queue_tag_set(struct blk_mq_tag_set *set,

drivers/ata/libata-core.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4543,9 +4543,6 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
45434543
ATA_HORKAGE_ZERO_AFTER_TRIM |
45444544
ATA_HORKAGE_NOLPM, },
45454545

4546-
/* Sandisk devices which are known to not handle LPM well */
4547-
{ "SanDisk SD7UB3Q*G1001", NULL, ATA_HORKAGE_NOLPM, },
4548-
45494546
/* devices that don't properly handle queued TRIM commands */
45504547
{ "Micron_M500IT_*", "MU01", ATA_HORKAGE_NO_NCQ_TRIM |
45514548
ATA_HORKAGE_ZERO_AFTER_TRIM, },

drivers/ata/libata-zpodd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct zpodd {
3535
static int eject_tray(struct ata_device *dev)
3636
{
3737
struct ata_taskfile tf;
38-
static const char cdb[] = { GPCMD_START_STOP_UNIT,
38+
static const char cdb[ATAPI_CDB_LEN] = { GPCMD_START_STOP_UNIT,
3939
0, 0, 0,
4040
0x02, /* LoEj */
4141
0, 0, 0, 0, 0, 0, 0,

drivers/base/core.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,7 +1461,7 @@ class_dir_create_and_add(struct class *class, struct kobject *parent_kobj)
14611461

14621462
dir = kzalloc(sizeof(*dir), GFP_KERNEL);
14631463
if (!dir)
1464-
return NULL;
1464+
return ERR_PTR(-ENOMEM);
14651465

14661466
dir->class = class;
14671467
kobject_init(&dir->kobj, &class_dir_ktype);
@@ -1471,7 +1471,7 @@ class_dir_create_and_add(struct class *class, struct kobject *parent_kobj)
14711471
retval = kobject_add(&dir->kobj, parent_kobj, "%s", class->name);
14721472
if (retval < 0) {
14731473
kobject_put(&dir->kobj);
1474-
return NULL;
1474+
return ERR_PTR(retval);
14751475
}
14761476
return &dir->kobj;
14771477
}
@@ -1778,6 +1778,10 @@ int device_add(struct device *dev)
17781778

17791779
parent = get_device(dev->parent);
17801780
kobj = get_device_parent(dev, parent);
1781+
if (IS_ERR(kobj)) {
1782+
error = PTR_ERR(kobj);
1783+
goto parent_error;
1784+
}
17811785
if (kobj)
17821786
dev->kobj.parent = kobj;
17831787

@@ -1876,6 +1880,7 @@ int device_add(struct device *dev)
18761880
kobject_del(&dev->kobj);
18771881
Error:
18781882
cleanup_glue_dir(dev, glue_dir);
1883+
parent_error:
18791884
put_device(parent);
18801885
name_error:
18811886
kfree(dev->p);
@@ -2695,6 +2700,11 @@ int device_move(struct device *dev, struct device *new_parent,
26952700
device_pm_lock();
26962701
new_parent = get_device(new_parent);
26972702
new_parent_kobj = get_device_parent(dev, new_parent);
2703+
if (IS_ERR(new_parent_kobj)) {
2704+
error = PTR_ERR(new_parent_kobj);
2705+
put_device(new_parent);
2706+
goto out;
2707+
}
26982708

26992709
pr_debug("device: '%s': %s: moving to '%s'\n", dev_name(dev),
27002710
__func__, new_parent ? dev_name(new_parent) : "<NULL>");

drivers/block/nbd.c

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,12 @@ static const struct device_attribute pid_attr = {
173173
static void nbd_dev_remove(struct nbd_device *nbd)
174174
{
175175
struct gendisk *disk = nbd->disk;
176+
struct request_queue *q;
177+
176178
if (disk) {
179+
q = disk->queue;
177180
del_gendisk(disk);
178-
blk_cleanup_queue(disk->queue);
181+
blk_cleanup_queue(q);
179182
blk_mq_free_tag_set(&nbd->tag_set);
180183
disk->private_data = NULL;
181184
put_disk(disk);
@@ -231,9 +234,18 @@ static void nbd_size_clear(struct nbd_device *nbd)
231234
static void nbd_size_update(struct nbd_device *nbd)
232235
{
233236
struct nbd_config *config = nbd->config;
237+
struct block_device *bdev = bdget_disk(nbd->disk, 0);
238+
234239
blk_queue_logical_block_size(nbd->disk->queue, config->blksize);
235240
blk_queue_physical_block_size(nbd->disk->queue, config->blksize);
236241
set_capacity(nbd->disk, config->bytesize >> 9);
242+
if (bdev) {
243+
if (bdev->bd_disk)
244+
bd_set_size(bdev, config->bytesize);
245+
else
246+
bdev->bd_invalidated = 1;
247+
bdput(bdev);
248+
}
237249
kobject_uevent(&nbd_to_dev(nbd)->kobj, KOBJ_CHANGE);
238250
}
239251

@@ -243,6 +255,8 @@ static void nbd_size_set(struct nbd_device *nbd, loff_t blocksize,
243255
struct nbd_config *config = nbd->config;
244256
config->blksize = blocksize;
245257
config->bytesize = blocksize * nr_blocks;
258+
if (nbd->task_recv != NULL)
259+
nbd_size_update(nbd);
246260
}
247261

248262
static void nbd_complete_rq(struct request *req)
@@ -1109,7 +1123,6 @@ static int nbd_start_device_ioctl(struct nbd_device *nbd, struct block_device *b
11091123
if (ret)
11101124
return ret;
11111125

1112-
bd_set_size(bdev, config->bytesize);
11131126
if (max_part)
11141127
bdev->bd_invalidated = 1;
11151128
mutex_unlock(&nbd->config_lock);

drivers/cpufreq/cpufreq.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,8 @@ static ssize_t store_##file_name \
693693
struct cpufreq_policy new_policy; \
694694
\
695695
memcpy(&new_policy, policy, sizeof(*policy)); \
696+
new_policy.min = policy->user_policy.min; \
697+
new_policy.max = policy->user_policy.max; \
696698
\
697699
ret = sscanf(buf, "%u", &new_policy.object); \
698700
if (ret != 1) \

drivers/cpufreq/cpufreq_governor.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ unsigned int dbs_update(struct cpufreq_policy *policy)
165165
* calls, so the previous load value can be used then.
166166
*/
167167
load = j_cdbs->prev_load;
168-
} else if (unlikely(time_elapsed > 2 * sampling_rate &&
168+
} else if (unlikely((int)idle_time > 2 * sampling_rate &&
169169
j_cdbs->prev_load)) {
170170
/*
171171
* If the CPU had gone completely idle and a task has
@@ -185,10 +185,8 @@ unsigned int dbs_update(struct cpufreq_policy *policy)
185185
* clear prev_load to guarantee that the load will be
186186
* computed again next time.
187187
*
188-
* Detecting this situation is easy: the governor's
189-
* utilization update handler would not have run during
190-
* CPU-idle periods. Hence, an unusually large
191-
* 'time_elapsed' (as compared to the sampling rate)
188+
* Detecting this situation is easy: an unusually large
189+
* 'idle_time' (as compared to the sampling rate)
192190
* indicates this scenario.
193191
*/
194192
load = j_cdbs->prev_load;
@@ -217,8 +215,8 @@ unsigned int dbs_update(struct cpufreq_policy *policy)
217215
j_cdbs->prev_load = load;
218216
}
219217

220-
if (time_elapsed > 2 * sampling_rate) {
221-
unsigned int periods = time_elapsed / sampling_rate;
218+
if (unlikely((int)idle_time > 2 * sampling_rate)) {
219+
unsigned int periods = idle_time / sampling_rate;
222220

223221
if (periods < idle_periods)
224222
idle_periods = periods;

drivers/hid/intel-ish-hid/ipc/pci-ish.c

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,7 @@ static void ish_remove(struct pci_dev *pdev)
204204
kfree(ishtp_dev);
205205
}
206206

207-
#ifdef CONFIG_PM
208-
static struct device *ish_resume_device;
207+
static struct device __maybe_unused *ish_resume_device;
209208

210209
/* 50ms to get resume response */
211210
#define WAIT_FOR_RESUME_ACK_MS 50
@@ -219,7 +218,7 @@ static struct device *ish_resume_device;
219218
* in that case a simple resume message is enough, others we need
220219
* a reset sequence.
221220
*/
222-
static void ish_resume_handler(struct work_struct *work)
221+
static void __maybe_unused ish_resume_handler(struct work_struct *work)
223222
{
224223
struct pci_dev *pdev = to_pci_dev(ish_resume_device);
225224
struct ishtp_device *dev = pci_get_drvdata(pdev);
@@ -261,7 +260,7 @@ static void ish_resume_handler(struct work_struct *work)
261260
*
262261
* Return: 0 to the pm core
263262
*/
264-
static int ish_suspend(struct device *device)
263+
static int __maybe_unused ish_suspend(struct device *device)
265264
{
266265
struct pci_dev *pdev = to_pci_dev(device);
267266
struct ishtp_device *dev = pci_get_drvdata(pdev);
@@ -287,7 +286,7 @@ static int ish_suspend(struct device *device)
287286
return 0;
288287
}
289288

290-
static DECLARE_WORK(resume_work, ish_resume_handler);
289+
static __maybe_unused DECLARE_WORK(resume_work, ish_resume_handler);
291290
/**
292291
* ish_resume() - ISH resume callback
293292
* @device: device pointer
@@ -296,7 +295,7 @@ static DECLARE_WORK(resume_work, ish_resume_handler);
296295
*
297296
* Return: 0 to the pm core
298297
*/
299-
static int ish_resume(struct device *device)
298+
static int __maybe_unused ish_resume(struct device *device)
300299
{
301300
struct pci_dev *pdev = to_pci_dev(device);
302301
struct ishtp_device *dev = pci_get_drvdata(pdev);
@@ -310,21 +309,14 @@ static int ish_resume(struct device *device)
310309
return 0;
311310
}
312311

313-
static const struct dev_pm_ops ish_pm_ops = {
314-
.suspend = ish_suspend,
315-
.resume = ish_resume,
316-
};
317-
#define ISHTP_ISH_PM_OPS (&ish_pm_ops)
318-
#else
319-
#define ISHTP_ISH_PM_OPS NULL
320-
#endif /* CONFIG_PM */
312+
static SIMPLE_DEV_PM_OPS(ish_pm_ops, ish_suspend, ish_resume);
321313

322314
static struct pci_driver ish_driver = {
323315
.name = KBUILD_MODNAME,
324316
.id_table = ish_pci_tbl,
325317
.probe = ish_probe,
326318
.remove = ish_remove,
327-
.driver.pm = ISHTP_ISH_PM_OPS,
319+
.driver.pm = &ish_pm_ops,
328320
};
329321

330322
module_pci_driver(ish_driver);

drivers/hid/wacom_sys.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,14 @@ static void wacom_usage_mapping(struct hid_device *hdev,
284284
}
285285
}
286286

287+
/* 2nd-generation Intuos Pro Large has incorrect Y maximum */
288+
if (hdev->vendor == USB_VENDOR_ID_WACOM &&
289+
hdev->product == 0x0358 &&
290+
WACOM_PEN_FIELD(field) &&
291+
wacom_equivalent_usage(usage->hid) == HID_GD_Y) {
292+
field->logical_maximum = 43200;
293+
}
294+
287295
switch (usage->hid) {
288296
case HID_GD_X:
289297
features->x_max = field->logical_maximum;

drivers/net/bonding/bond_options.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,6 +1142,7 @@ static int bond_option_primary_set(struct bonding *bond,
11421142
slave->dev->name);
11431143
rcu_assign_pointer(bond->primary_slave, slave);
11441144
strcpy(bond->params.primary, slave->dev->name);
1145+
bond->force_primary = true;
11451146
bond_select_active_slave(bond);
11461147
goto out;
11471148
}

drivers/net/hyperv/netvsc_drv.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,10 @@ static int netvsc_open(struct net_device *net)
126126
}
127127

128128
rdev = nvdev->extension;
129-
if (!rdev->link_state)
129+
if (!rdev->link_state) {
130130
netif_carrier_on(net);
131+
netif_tx_wake_all_queues(net);
132+
}
131133

132134
if (vf_netdev) {
133135
/* Setting synthetic device up transparently sets

drivers/net/tap.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,13 +777,16 @@ static ssize_t tap_put_user(struct tap_queue *q,
777777
int total;
778778

779779
if (q->flags & IFF_VNET_HDR) {
780+
int vlan_hlen = skb_vlan_tag_present(skb) ? VLAN_HLEN : 0;
780781
struct virtio_net_hdr vnet_hdr;
782+
781783
vnet_hdr_len = READ_ONCE(q->vnet_hdr_sz);
782784
if (iov_iter_count(iter) < vnet_hdr_len)
783785
return -EINVAL;
784786

785787
if (virtio_net_hdr_from_skb(skb, &vnet_hdr,
786-
tap_is_little_endian(q), true))
788+
tap_is_little_endian(q), true,
789+
vlan_hlen))
787790
BUG();
788791

789792
if (copy_to_iter(&vnet_hdr, sizeof(vnet_hdr), iter) !=

drivers/net/tun.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1648,7 +1648,8 @@ static ssize_t tun_put_user(struct tun_struct *tun,
16481648
return -EINVAL;
16491649

16501650
if (virtio_net_hdr_from_skb(skb, &gso,
1651-
tun_is_little_endian(tun), true)) {
1651+
tun_is_little_endian(tun), true,
1652+
vlan_hlen)) {
16521653
struct skb_shared_info *sinfo = skb_shinfo(skb);
16531654
pr_err("unexpected GSO type: "
16541655
"0x%x, gso_size %d, hdr_len %d\n",

drivers/net/usb/cdc_ncm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ cdc_ncm_fill_tx_frame(struct usbnet *dev, struct sk_buff *skb, __le32 sign)
11241124
* accordingly. Otherwise, we should check here.
11251125
*/
11261126
if (ctx->drvflags & CDC_NCM_FLAG_NDP_TO_END)
1127-
delayed_ndp_size = ctx->max_ndp_size;
1127+
delayed_ndp_size = ALIGN(ctx->max_ndp_size, ctx->tx_ndp_modulus);
11281128
else
11291129
delayed_ndp_size = 0;
11301130

@@ -1285,7 +1285,7 @@ cdc_ncm_fill_tx_frame(struct usbnet *dev, struct sk_buff *skb, __le32 sign)
12851285
/* If requested, put NDP at end of frame. */
12861286
if (ctx->drvflags & CDC_NCM_FLAG_NDP_TO_END) {
12871287
nth16 = (struct usb_cdc_ncm_nth16 *)skb_out->data;
1288-
cdc_ncm_align_tail(skb_out, ctx->tx_ndp_modulus, 0, ctx->tx_curr_size);
1288+
cdc_ncm_align_tail(skb_out, ctx->tx_ndp_modulus, 0, ctx->tx_curr_size - ctx->max_ndp_size);
12891289
nth16->wNdpIndex = cpu_to_le16(skb_out->len);
12901290
skb_put_data(skb_out, ctx->delayed_ndp16, ctx->max_ndp_size);
12911291

drivers/net/virtio_net.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1356,7 +1356,8 @@ static int xmit_skb(struct send_queue *sq, struct sk_buff *skb)
13561356
hdr = skb_vnet_hdr(skb);
13571357

13581358
if (virtio_net_hdr_from_skb(skb, &hdr->hdr,
1359-
virtio_is_little_endian(vi->vdev), false))
1359+
virtio_is_little_endian(vi->vdev), false,
1360+
0))
13601361
BUG();
13611362

13621363
if (vi->mergeable_rx_bufs)

0 commit comments

Comments
 (0)