Linux 4.19.304
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.19.304 kernel.
All users of the 4.19 kernel series must upgrade.
The updated 4.19.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.19.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/mach-omap2/id.c | 5 arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 4 arch/s390/include/asm/fpu/api.h | 2 arch/x86/kernel/alternative.c | 2 drivers/iio/common/ms_sensors/ms_sensors_i2c.c | 4 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 4 drivers/input/keyboard/ipaq-micro-keys.c | 3 drivers/md/dm-integrity.c | 11 + drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 5 drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c | 4 drivers/pinctrl/pinctrl-at91-pio4.c | 8 + drivers/reset/core.c | 3 drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 12 -- drivers/usb/host/fotg210-hcd.c | 3 drivers/usb/musb/musb_core.c | 3 drivers/usb/serial/ftdi_sio.c | 6 - drivers/usb/serial/ftdi_sio_ids.h | 6 - drivers/usb/serial/option.c | 5 fs/afs/dynroot.c | 13 -- fs/block_dev.c | 9 + fs/btrfs/ioctl.c | 9 + fs/cifs/misc.c | 4 fs/cifs/smb2misc.c | 26 +--- fs/cifs/smb2pdu.h | 2 net/8021q/vlan_core.c | 9 + net/9p/protocol.c | 17 ++ net/bluetooth/hci_event.c | 3 net/core/dev.c | 8 + net/ife/ife.c | 1 net/mac80211/mesh_plink.c | 10 - net/rfkill/rfkill-gpio.c | 8 + net/rose/af_rose.c | 39 +++++- net/wireless/certs/wens.hex | 87 +++++++++++++++ sound/pci/hda/patch_realtek.c | 30 +++++ 35 files changed, 283 insertions(+), 84 deletions(-)
Alexis Lothoré (1):
pinctrl: at91-pio4: use dedicated lock class for IRQ
Alper Ak (1):
USB: serial: option: add Quectel EG912Y module support
AngeloGioacchino Del Regno (1):
arm64: dts: mediatek: mt8173-evb: Fix regulator-fixed node names
Bin Li (2):
ALSA: hda/realtek: Enable headset onLenovo M70/M90
ALSA: hda/realtek: Enable headset on Lenovo M90 Gen5
Chen-Yu Tsai (1):
wifi: cfg80211: Add my certificate
Dan Carpenter (1):
usb: fotg210-hcd: delete an incorrect bounds test
David Howells (1):
afs: Fix the dynamic root's d_delete to always delete unused dentries
Edward Pacman (1):
ALSA: hda/realtek: Add quirk for Lenovo TianYi510Pro-14IOB
Eric Dumazet (3):
net: sched: ife: fix potential use-after-free net/rose: fix races in rose_kill_by_device()
net: check dev->gso_max_size in gso_features_check()
Fedor Pchelkin (1):
net: 9p: avoid freeing uninit memory in p9pdu_vreadf
Geert Uytterhoeven (1):
reset: Fix crash when freeing non-existent optional resets
Greg Kroah-Hartman (1):
Linux 4.19.304
Haoran Liu (1):
Input: ipaq-micro-keys - add error handling for devm_kmemdup
Heiko Carstens (1):
s390/vx: fix save/restore of fpu kernel context
Heiner Kallweit (1):
net: warn if gso_type isn't set for a GSO SKB
Hu Haowen (1):
net/mlx5: improve some comments
Javier Carrasco (1):
iio: common: ms_sensors: ms_sensors_i2c: fix humidity conversion time table
Johannes Berg (2):
wifi: mac80211: mesh_plink: fix matches_local logic
wifi: cfg80211: fix certs build to not depend on file order
Josef Bacik (1):
btrfs: do not allow non subvolume root targets for snapshot
Kunwu Chan (1):
ARM: OMAP2+: Fix null pointer dereference and memory leak in omap_soc_device_init
Liu Jian (1):
net: check vlan filter feature in vlan_vids_add_by_dev() and vlan_vids_del_by_dev()
Luiz Augusto von Dentz (1):
Bluetooth: hci_event: Fix not checking if HCI_OP_INQUIRY has been sent
Mark Glover (1):
USB: serial: ftdi_sio: update Actisense PIDs constant names
Mikulas Patocka (1):
dm-integrity: don't modify bio's immutable bio_vec in integrity_metadata()
Moshe Shemesh (1):
net/mlx5: Fix fw tracer first block check
Namjae Jeon (1):
ksmbd: fix wrong name of SMB2_CREATE_ALLOCATION_SIZE
Paulo Alcantara (2):
smb: client: fix NULL deref in asn1_ber_decoder()
smb: client: fix OOB in smbCalcSize()
Reinhard Speyerer (1):
USB: serial: option: add Quectel RM500Q R13 firmware support
Rouven Czerwinski (1):
net: rfkill: gpio: set GPIO direction
Sarthak Kukreti (1):
block: Don't invalidate pagecache for invalid falloc modes
Slark Xiao (1):
USB: serial: option: add Foxconn T99W265 with new baseline
Su Hui (1):
iio: imu: inv_mpu6050: fix an error code problem in inv_mpu6050_read_raw
Thomas Gleixner (1):
x86/alternatives: Sync core before enabling interrupts
Thomas Petazzoni (1):
usb: musb: fix MUSB_QUIRK_B_DISCONNECT_99 handling
Wei Yongjun (1):
scsi: bnx2fc: Fix skb double free in bnx2fc_rcv()
YueHaibing (1):
scsi: bnx2fc: Remove set but not used variable 'oxid'
Zhipeng Lu (1):
ethernet: atheros: fix a memleak in atl1e_setup_ring_resources
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 19 -SUBLEVEL = 303 +SUBLEVEL = 304 EXTRAVERSION = NAME = "People's Front"
arch/arm/mach-omap2/id.c +5 -0
@@ -800,10 +800,15 @@ void __init omap_soc_device_init(void) soc_dev_attr->machine = soc_name; soc_dev_attr->family =omap_get_family (); +if (!soc_dev_attr->family) { +kfree (soc_dev_attr); +return ; + } soc_dev_attr->revision = soc_rev; soc_dev =soc_device_register (soc_dev_attr);if (IS_ERR (soc_dev)) { +kfree (soc_dev_attr->family);kfree (soc_dev_attr);return ; }
arch/arm64/boot/dts/mediatek/mt8173-evb.dts +2 -2
@@ -51,7 +51,7 @@ id-gpio = <&pio 16 GPIO_ACTIVE_HIGH>; }; - usb_p1_vbus: regulator@0 { + usb_p1_vbus: regulator-usb-p1 { compatible = "regulator-fixed"; regulator-name = "usb_vbus"; regulator-min-microvolt = <5000000>;
@@ -60,7 +60,7 @@ enable-active-high; }; - usb_p0_vbus: regulator@1 { + usb_p0_vbus: regulator-usb-p0 { compatible = "regulator-fixed"; regulator-name = "vbus"; regulator-min-microvolt = <5000000>;
arch/s390/include/asm/fpu/api.h +1 -1
@@ -76,7 +76,7 @@ static inline int test_fp_ctl(u32 fpc)#define KERNEL_VXR_HIGH (KERNEL_VXR_V16V23|KERNEL_VXR_V24V31)#define KERNEL_VXR (KERNEL_VXR_LOW|KERNEL_VXR_HIGH) -#define KERNEL_FPR (KERNEL_FPC|KERNEL_VXR_V0V7) +#define KERNEL_FPR (KERNEL_FPC|KERNEL_VXR_LOW)struct kernel_fpu ;
arch/x86/kernel/alternative.c +1 -1
@@ -690,8 +690,8 @@ void *__init_or_module text_poke_early(void *addr, const void *opcode, }else {local_irq_save (flags);memcpy (addr, opcode, len); -local_irq_restore (flags);sync_core (); +local_irq_restore (flags);/* * Could also do a CLFLUSH here to speed up CPU recovery; but
drivers/iio/common/ms_sensors/ms_sensors_i2c.c +2 -2
@@ -16,8 +16,8 @@/* Conversion times in us */ static const u16 ms_sensors_ht_t_conversion_time[] = {50000 ,25000 ,13000 ,7000 }; -static const u16 ms_sensors_ht_h_conversion_time[] = {16000 ,3000 , -5000 ,8000 }; +static const u16 ms_sensors_ht_h_conversion_time[] = {16000 ,5000 , +3000 ,8000 };static const u16 ms_sensors_tp_conversion_time[] = {500 ,1100 ,2100 ,4100 ,8220 ,16440 };
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +2 -2
@@ -508,13 +508,13 @@ inv_mpu6050_read_raw(struct iio_dev *indio_dev, ret =inv_mpu6050_sensor_show (st, st->reg->gyro_offset, chan->channel2, val);mutex_unlock (&st->lock); -return IIO_VAL_INT ; +return ret;case IIO_ACCEL :mutex_lock (&st->lock); ret =inv_mpu6050_sensor_show (st, st->reg->accl_offset, chan->channel2, val);mutex_unlock (&st->lock); -return IIO_VAL_INT ; +return ret;default :return -EINVAL ;
drivers/input/keyboard/ipaq-micro-keys.c +3 -0
@@ -108,6 +108,9 @@ static int micro_key_probe(struct platform_device *pdev) keys->codes =devm_kmemdup (&pdev->dev, micro_keycodes, keys->input->keycodesize * keys->input->keycodemax,GFP_KERNEL ); +if (!keys->codes) +return -ENOMEM ; + keys->input->keycode = keys->codes;__set_bit (EV_KEY , keys->input->evbit);
drivers/md/dm-integrity.c +6 -5
@@ -1379,11 +1379,12 @@ static void integrity_metadata(struct work_struct *w) checksums = checksums_onstack;__bio_for_each_segment (bv, bio, iter, dio->bio_details.bi_iter) { +struct bio_vec bv_copy = bv;unsigned pos;char *mem, *checksums_ptr; again: - mem = (char *)kmap_atomic (bv.bv_page) + bv.bv_offset; + mem = (char *)kmap_atomic (bv_copy.bv_page) + bv_copy.bv_offset; pos =0 ; checksums_ptr = checksums; do {
@@ -1392,7 +1393,7 @@ static void integrity_metadata(struct work_struct *w) sectors_to_process -= ic->sectors_per_block; pos += ic->sectors_per_block <<SECTOR_SHIFT ; sector += ic->sectors_per_block; - }while (pos < bv.bv_len && sectors_to_process && checksums != checksums_onstack); + }while (pos < bv_copy.bv_len && sectors_to_process && checksums != checksums_onstack);kunmap_atomic (mem); r = dm_integrity_rw_tag(ic, checksums, &dio->metadata_block, &dio->metadata_offset,
@@ -1412,9 +1413,9 @@ static void integrity_metadata(struct work_struct *w)if (!sectors_to_process)break ; -if (unlikely (pos < bv.bv_len)) { - bv.bv_offset += pos; - bv.bv_len -= pos; +if (unlikely (pos < bv_copy.bv_len)) { + bv_copy.bv_offset += pos; + bv_copy.bv_len -= pos; goto again; } }
drivers/net/ethernet/atheros/atl1e/atl1e_main.c +4 -1
@@ -881,10 +881,13 @@ static int atl1e_setup_ring_resources(struct atl1e_adapter *adapter)netdev_err (adapter->netdev,"offset(%d) > ring size(%d) !!\n" , offset, adapter->ring_size); err =-1 ; - goto failed; + goto free_buffer; }return 0 ; +free_buffer: +kfree (tx_ring->tx_buffer); + tx_ring->tx_buffer =NULL ; failed:if (adapter->ring_vir_addr !=NULL ) { pci_free_consistent(pdev, adapter->ring_size,
drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c +2 -2
@@ -651,8 +651,8 @@ static void mlx5_fw_tracer_handle_traces(struct work_struct *work)get_block_timestamp (tracer, &tmp_trace_block[TRACES_PER_BLOCK -1 ]);while (block_timestamp > tracer->last_timestamp) { -/* Check block override if its not the first block */ -if (!tracer->last_timestamp) { +/* Check block override if it's not the first block */ +if (tracer->last_timestamp) {u64 *ts_event;/* To avoid block override be the HW in case of buffer * wraparound, the time stamp of the previous block
drivers/pinctrl/pinctrl-at91-pio4.c +8 -0
@@ -939,6 +939,13 @@ static const struct of_device_id atmel_pctrl_of_match[] = { } }; +/* +* This lock class allows to tell lockdep that parent IRQ and children IRQ do +* not share the same class so it does not raise false positive +*/ +static struct lock_class_key atmel_lock_key; +static struct lock_class_key atmel_request_key; +static int atmel_pinctrl_probe (struct platform_device *pdev) {struct device *dev = &pdev->dev;
@@ -1089,6 +1096,7 @@ static int atmel_pinctrl_probe(struct platform_device *pdev)irq_set_chip_and_handler (irq, &atmel_gpio_irq_chip, handle_simple_irq);irq_set_chip_data (irq, atmel_pioctrl); +irq_set_lockdep_class (irq, &atmel_lock_key, &atmel_request_key);dev_dbg (dev,"atmel gpio irq domain: hwirq: %d, linux irq: %d\n" , i, irq);
drivers/reset/core.c +3 -0
@@ -459,6 +459,9 @@ static void __reset_control_put_internal(struct reset_control *rstc) {lockdep_assert_held (&reset_list_mutex); +if (IS_ERR_OR_NULL (rstc)) +return ; +kref_put (&rstc->refcnt, __reset_control_release); }
drivers/scsi/bnx2fc/bnx2fc_fcoe.c +3 -9
@@ -435,8 +435,6 @@ static int bnx2fc_rcv(struct sk_buff *skb, struct net_device *dev,struct fc_frame_header *fh;struct fcoe_rcv_info *fr;struct fcoe_percpu_s *bg; -struct sk_buff *tmp_skb; -unsigned short oxid; interface = container_of(ptype, struct bnx2fc_interface, fcoe_packet_type);
@@ -448,11 +446,9 @@ static int bnx2fc_rcv(struct sk_buff *skb, struct net_device *dev, goto err; } - tmp_skb =skb_share_check (skb,GFP_ATOMIC ); -if (!tmp_skb) - goto err; - - skb = tmp_skb; + skb =skb_share_check (skb,GFP_ATOMIC ); +if (!skb) +return -1 ;if (unlikely (eth_hdr (skb)->h_proto !=htons (ETH_P_FCOE ))) { printk(KERN_ERR PFX "bnx2fc_rcv: Wrong FC type frame\n");
@@ -470,8 +466,6 @@ static int bnx2fc_rcv(struct sk_buff *skb, struct net_device *dev,skb_set_transport_header (skb,sizeof (struct fcoe_hdr )); fh = (struct fc_frame_header *)skb_transport_header (skb); - oxid =ntohs (fh->fh_ox_id); - fr =fcoe_dev_from_skb (skb); fr->fr_dev = lport;
drivers/usb/host/fotg210-hcd.c +0 -3
@@ -426,8 +426,6 @@ static void qh_lines(struct fotg210_hcd *fotg210, struct fotg210_qh *qh, temp = size; size -= temp; next += temp; -if (temp == size) - goto done; } temp =snprintf (next, size,"\n" );
@@ -437,7 +435,6 @@ static void qh_lines(struct fotg210_hcd *fotg210, struct fotg210_qh *qh, size -= temp; next += temp; -done: *sizep = size; *nextp = next; }
drivers/usb/musb/musb_core.c +1 -2
@@ -1873,9 +1873,8 @@ static void musb_pm_runtime_check_session(struct musb *musb)schedule_delayed_work (&musb->irq_work,msecs_to_jiffies (1000 )); musb->quirk_retries--; -break ; } -/* fall through */ +break ;case MUSB_QUIRK_B_INVALID_VBUS_91 :if (musb->quirk_retries && !musb->flush_irq_work) { musb_dbg(musb,
drivers/usb/serial/ftdi_sio.c +3 -3
@@ -1001,9 +1001,9 @@ static const struct usb_device_id id_table_combined[] = { { USB_DEVICE(FTDI_VID, ACTISENSE_USG_PID) }, { USB_DEVICE(FTDI_VID, ACTISENSE_NGT_PID) }, { USB_DEVICE(FTDI_VID, ACTISENSE_NGW_PID) }, - { USB_DEVICE(FTDI_VID, ACTISENSE_D9AC_PID) }, - { USB_DEVICE(FTDI_VID, ACTISENSE_D9AD_PID) }, - { USB_DEVICE(FTDI_VID, ACTISENSE_D9AE_PID) }, + { USB_DEVICE(FTDI_VID, ACTISENSE_UID_PID) }, + { USB_DEVICE(FTDI_VID, ACTISENSE_USA_PID) }, + { USB_DEVICE(FTDI_VID, ACTISENSE_NGX_PID) }, { USB_DEVICE(FTDI_VID, ACTISENSE_D9AF_PID) }, { USB_DEVICE(FTDI_VID, CHETCO_SEAGAUGE_PID) }, { USB_DEVICE(FTDI_VID, CHETCO_SEASWITCH_PID) },
drivers/usb/serial/ftdi_sio_ids.h +3 -3
@@ -1561,9 +1561,9 @@#define ACTISENSE_USG_PID 0xD9A9/* USG USB Serial Adapter */ #define ACTISENSE_NGT_PID 0xD9AA/* NGT NMEA2000 Interface */ #define ACTISENSE_NGW_PID 0xD9AB/* NGW NMEA2000 Gateway */ -#define ACTISENSE_D9AC_PID 0xD9AC/* Actisense Reserved */ -#define ACTISENSE_D9AD_PID 0xD9AD/* Actisense Reserved */ -#define ACTISENSE_D9AE_PID 0xD9AE/* Actisense Reserved */ +#define ACTISENSE_UID_PID 0xD9AC/* USB Isolating Device */ +#define ACTISENSE_USA_PID 0xD9AD/* USB to Serial Adapter */ +#define ACTISENSE_NGX_PID 0xD9AE/* NGX NMEA2000 Gateway */ #define ACTISENSE_D9AF_PID 0xD9AF/* Actisense Reserved */ #define CHETCO_SEAGAUGE_PID 0xA548/* SeaGauge USB Adapter */ #define CHETCO_SEASWITCH_PID 0xA549/* SeaSwitch USB Adapter */
drivers/usb/serial/option.c +5 -0
@@ -272,6 +272,7 @@ static void option_instat_callback(struct urb *urb);#define QUECTEL_PRODUCT_RM500Q 0x0800#define QUECTEL_PRODUCT_RM520N 0x0801#define QUECTEL_PRODUCT_EC200U 0x0901 +#define QUECTEL_PRODUCT_EG912Y 0x6001#define QUECTEL_PRODUCT_EC200S_CN 0x6002#define QUECTEL_PRODUCT_EC200A 0x6005#define QUECTEL_PRODUCT_EM061K_LWW 0x6008
@@ -1232,6 +1233,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, 0x0700, 0xff), /* BG95 */ .driver_info = RSVD(3) | ZLP }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x30) }, + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0, 0x40) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x10), .driver_info = ZLP },
@@ -1244,6 +1246,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200U, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200S_CN, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200T, 0xff, 0, 0) }, + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG912Y, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500K, 0xff, 0x00, 0x00) }, { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) },
@@ -2242,6 +2245,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = RSVD(0) | RSVD(1) | RSVD(6) }, { USB_DEVICE(0x0489, 0xe0b5), /* Foxconn T77W968 ESIM */ .driver_info = RSVD(0) | RSVD(1) | RSVD(6) }, + { USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0da, 0xff), /* Foxconn T99W265 MBIM variant */ + .driver_info = RSVD(3) | RSVD(5) }, { USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0db, 0xff), /* Foxconn T99W265 MBIM */ .driver_info = RSVD(3) }, { USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe0ee, 0xff), /* Foxconn T99W368 MBIM */
fs/afs/dynroot.c +1 -12
@@ -172,20 +172,9 @@ static int afs_dynroot_d_revalidate(struct dentry *dentry, unsigned int flags)return 1 ; } -/* -* Allow the VFS to enquire as to whether a dentry should be unhashed (mustn't -* sleep) -* - called from dput() when d_count is going to 0. -* - return 1 to request dentry be unhashed, 0 otherwise -*/ -static int afs_dynroot_d_delete (const struct dentry *dentry) -{ -return d_really_is_positive (dentry); -} -const struct dentry_operations afs_dynroot_dentry_operations = { .d_revalidate = afs_dynroot_d_revalidate, - .d_delete = afs_dynroot_d_delete, + .d_delete = always_delete_dentry, .d_release = afs_d_release, .d_automount = afs_d_automount, };
fs/block_dev.c +7 -2
@@ -2041,21 +2041,26 @@ static long blkdev_fallocate(struct file *file, int mode, loff_t start,if ((start | len) & (bdev_logical_block_size (bdev) -1 ))return -EINVAL ; -/* Invalidate the page cache, including dirty pages. */ +/* +* Invalidate the page cache, including dirty pages, for valid +* de-allocate mode calls to fallocate(). +*/ mapping = bdev->bd_inode->i_mapping; -truncate_inode_pages_range (mapping, start, end);switch (mode) {case FALLOC_FL_ZERO_RANGE :case FALLOC_FL_ZERO_RANGE |FALLOC_FL_KEEP_SIZE : +truncate_inode_pages_range (mapping, start, end); error =blkdev_issue_zeroout (bdev, start >>9 , len >>9 ,GFP_KERNEL ,BLKDEV_ZERO_NOUNMAP );break ;case FALLOC_FL_PUNCH_HOLE |FALLOC_FL_KEEP_SIZE : +truncate_inode_pages_range (mapping, start, end); error =blkdev_issue_zeroout (bdev, start >>9 , len >>9 ,GFP_KERNEL ,BLKDEV_ZERO_NOFALLBACK );break ;case FALLOC_FL_PUNCH_HOLE |FALLOC_FL_KEEP_SIZE |FALLOC_FL_NO_HIDE_STALE : +truncate_inode_pages_range (mapping, start, end); error =blkdev_issue_discard (bdev, start >>9 , len >>9 ,GFP_KERNEL ,0 );break ;
fs/btrfs/ioctl.c +9 -0
@@ -1789,6 +1789,15 @@ static noinline int btrfs_ioctl_snap_create_transid(struct file *file,* are limited to own subvolumes only */ ret = -EPERM ; + }else if (btrfs_ino (BTRFS_I (src_inode)) !=BTRFS_FIRST_FREE_OBJECTID ) { +/* +* Snapshots must be made with the src_inode referring +* to the subvolume inode, otherwise the permission +* checking above is useless because we may have +* permission on a lower directory but not the subvol +* itself. +*/ + ret = -EINVAL ; }else { ret = btrfs_mksubvol(&file->f_path, name, namelen, BTRFS_I(src_inode)->root,
fs/cifs/misc.c +4 -0
@@ -338,6 +338,10 @@ checkSMB(char *buf, unsigned int total_read, struct TCP_Server_Info *server)cifs_dbg (VFS ,"Length less than smb header size\n" ); }return -EIO ; + }else if (total_read <sizeof (*smb) +2 * smb->WordCount) { +cifs_dbg (VFS ,"%s: can't read BCC due to invalid WordCount(%u)\n" , + __func__, smb->WordCount); +return -EIO ; }/* otherwise, there is enough to get to the BCC */
fs/cifs/smb2misc.c +10 -16
@@ -302,6 +302,9 @@ static const bool has_smb2_data_area[NUMBER_OF_SMB2_COMMANDS] = {char *smb2_get_data_area_len (int *off,int *len,struct smb2_sync_hdr *shdr) { +const int max_off =4096 ; +const int max_len =128 *1024 ; + *off =0 ; *len =0 ;
@@ -369,29 +372,20 @@ smb2_get_data_area_len(int *off, int *len, struct smb2_sync_hdr *shdr)* Invalid length or offset probably means data area is invalid, but * we have little choice but to ignore the data area in this case. */ -if (*off >4096 ) { -cifs_dbg (VFS ,"offset %d too large, data area ignored\n" , *off); - *len =0 ; - *off =0 ; - }else if (*off <0 ) { -cifs_dbg (VFS ,"negative offset %d to data invalid ignore data area\n" , - *off); +if (unlikely (*off <0 || *off > max_off || + *len <0 || *len > max_len)) { +cifs_dbg (VFS ,"%s: invalid data area (off=%d len=%d)\n" , + __func__, *off, *len); *off =0 ; *len =0 ; - }else if (*len <0 ) { -cifs_dbg (VFS ,"negative data length %d invalid, data area ignored\n" , - *len); - *len =0 ; - }else if (*len >128 *1024 ) { -cifs_dbg (VFS ,"data area larger than 128K: %d\n" , *len); + }else if (*off ==0 ) { *len =0 ; }/* return pointer to beginning of data area, ie offset from SMB start */ -if ((*off !=0 ) && (*len !=0 )) +if (*off >0 && *len >0 )return (char *)shdr + *off; -else -return NULL ; +return NULL ; }/*
fs/cifs/smb2pdu.h +1 -1
@@ -610,7 +610,7 @@ struct smb2_tree_disconnect_rsp {#define SMB2_CREATE_SD_BUFFER "SecD"/* security descriptor */ #define SMB2_CREATE_DURABLE_HANDLE_REQUEST "DHnQ"#define SMB2_CREATE_DURABLE_HANDLE_RECONNECT "DHnC" -#define SMB2_CREATE_ALLOCATION_SIZE "AISi" +#define SMB2_CREATE_ALLOCATION_SIZE "AlSi"#define SMB2_CREATE_QUERY_MAXIMAL_ACCESS_REQUEST "MxAc"#define SMB2_CREATE_TIMEWARP_REQUEST "TWrp"#define SMB2_CREATE_QUERY_ON_DISK_ID "QFid"
net/8021q/vlan_core.c +8 -1
@@ -380,6 +380,8 @@ int vlan_vids_add_by_dev(struct net_device *dev,return 0 ;list_for_each_entry (vid_info, &vlan_info->vid_list, list) { +if (!vlan_hw_filter_capable (by_dev, vid_info->proto)) +continue ; err =vlan_vid_add (dev, vid_info->proto, vid_info->vid);if (err) goto unwind;
@@ -390,6 +392,8 @@ int vlan_vids_add_by_dev(struct net_device *dev,list_for_each_entry_continue_reverse (vid_info, &vlan_info->vid_list, list) { +if (!vlan_hw_filter_capable (by_dev, vid_info->proto)) +continue ;vlan_vid_del (dev, vid_info->proto, vid_info->vid); }
@@ -409,8 +413,11 @@ void vlan_vids_del_by_dev(struct net_device *dev,if (!vlan_info)return ; -list_for_each_entry (vid_info, &vlan_info->vid_list, list) +list_for_each_entry (vid_info, &vlan_info->vid_list, list) { +if (!vlan_hw_filter_capable (by_dev, vid_info->proto)) +continue ;vlan_vid_del (dev, vid_info->proto, vid_info->vid); + } }EXPORT_SYMBOL (vlan_vids_del_by_dev);
net/9p/protocol.c +13 -4
@@ -243,6 +243,8 @@ p9pdu_vreadf(struct p9_fcall *pdu, int proto_version, const char *fmt, uint16_t *nwname = va_arg(ap, uint16_t *); char ***wnames = va_arg(ap, char ***); + *wnames =NULL ; + errcode =p9pdu_readf (pdu, proto_version,"w" , nwname);if (!errcode) {
@@ -252,6 +254,8 @@ p9pdu_vreadf(struct p9_fcall *pdu, int proto_version, const char *fmt, GFP_NOFS);if (!*wnames) errcode = -ENOMEM ; +else + (*wnames)[0 ] =NULL ; }if (!errcode) {
@@ -263,8 +267,10 @@ p9pdu_vreadf(struct p9_fcall *pdu, int proto_version, const char *fmt, proto_version,"s" , &(*wnames)[i]); -if (errcode) +if (errcode) { + (*wnames)[i] =NULL ;break ; + } } }
@@ -272,11 +278,14 @@ p9pdu_vreadf(struct p9_fcall *pdu, int proto_version, const char *fmt,if (*wnames) {int i; -for (i =0 ; i < *nwname; i++) +for (i =0 ; i < *nwname; i++) { +if (!(*wnames)[i]) +break ;kfree ((*wnames)[i]); + } +kfree (*wnames); + *wnames =NULL ; } -kfree (*wnames); - *wnames =NULL ; } }break ;
net/bluetooth/hci_event.c +2 -1
@@ -1701,7 +1701,8 @@ static void hci_cs_inquiry(struct hci_dev *hdev, __u8 status)return ; } -set_bit (HCI_INQUIRY , &hdev->flags); +if (hci_sent_cmd_data (hdev,HCI_OP_INQUIRY )) +set_bit (HCI_INQUIRY , &hdev->flags); }static void hci_cs_create_conn (struct hci_dev *hdev,__u8 status)
net/core/dev.c +8 -0
@@ -3200,6 +3200,14 @@ static netdev_features_t gso_features_check(const struct sk_buff *skb,if (gso_segs > dev->gso_max_segs)return features & ~NETIF_F_GSO_MASK ; +if (unlikely (skb->len >=READ_ONCE (dev->gso_max_size))) +return features & ~NETIF_F_GSO_MASK ; + +if (!skb_shinfo (skb)->gso_type) { +skb_warn_bad_offload (skb); +return features & ~NETIF_F_GSO_MASK ; + } +/* Support for GSO partial features requires software * intervention before we can actually process the packets * so we need to strip support for any partial features now
net/ife/ife.c +1 -0
@@ -82,6 +82,7 @@ void *ife_decode(struct sk_buff *skb, u16 *metalen)if (unlikely (!pskb_may_pull (skb, total_pull)))return NULL ; + ifehdr = (struct ifeheadr *)(skb->data + skb->dev->hard_header_len);skb_set_mac_header (skb, total_pull);__skb_pull (skb, total_pull); *metalen = ifehdrln -IFE_METAHDRLEN ;
net/mac80211/mesh_plink.c +5 -5
@@ -1022,8 +1022,8 @@ mesh_plink_get_event(struct ieee80211_sub_if_data *sdata,case WLAN_SP_MESH_PEERING_OPEN :if (!matches_local) event =OPN_RJCT ; -if (!mesh_plink_free_count (sdata) || - (sta->mesh->plid && sta->mesh->plid != plid)) +else if (!mesh_plink_free_count (sdata) || + (sta->mesh->plid && sta->mesh->plid != plid)) event =OPN_IGNR ;else event =OPN_ACPT ;
@@ -1031,9 +1031,9 @@ mesh_plink_get_event(struct ieee80211_sub_if_data *sdata,case WLAN_SP_MESH_PEERING_CONFIRM :if (!matches_local) event =CNF_RJCT ; -if (!mesh_plink_free_count (sdata) || - sta->mesh->llid != llid || - (sta->mesh->plid && sta->mesh->plid != plid)) +else if (!mesh_plink_free_count (sdata) || + sta->mesh->llid != llid || + (sta->mesh->plid && sta->mesh->plid != plid)) event =CNF_IGNR ;else event =CNF_ACPT ;
net/rfkill/rfkill-gpio.c +8 -0
@@ -130,6 +130,14 @@ static int rfkill_gpio_probe(struct platform_device *pdev)return -EINVAL ; } + ret =gpiod_direction_output (rfkill->reset_gpio, true); +if (ret) +return ret; + + ret =gpiod_direction_output (rfkill->shutdown_gpio, true); +if (ret) +return ret; + rfkill->rfkill_dev =rfkill_alloc (rfkill->name, &pdev->dev, rfkill->type, &rfkill_gpio_ops, rfkill);
net/rose/af_rose.c +34 -5
@@ -184,21 +184,47 @@ void rose_kill_by_neigh(struct rose_neigh *neigh)*/ static void rose_kill_by_device (struct net_device *dev) { -struct sock *s; +struct sock *sk, *array[16 ]; +struct rose_sock *rose; +bool rescan; +int i, cnt; +start: + rescan = false; + cnt =0 ;spin_lock_bh (&rose_list_lock); -sk_for_each (s, &rose_list) { -struct rose_sock *rose =rose_sk (s); +sk_for_each (sk, &rose_list) { + rose =rose_sk (sk); +if (rose->device == dev) { +if (cnt ==ARRAY_SIZE (array)) { + rescan = true; +break ; + } +sock_hold (sk); + array[cnt++] = sk; + } + } +spin_unlock_bh (&rose_list_lock); +for (i =0 ; i < cnt; i++) { + sk = array[cnt]; + rose =rose_sk (sk); +lock_sock (sk); +spin_lock_bh (&rose_list_lock);if (rose->device == dev) { -rose_disconnect (s,ENETUNREACH ,ROSE_OUT_OF_ORDER ,0 ); +rose_disconnect (sk,ENETUNREACH ,ROSE_OUT_OF_ORDER ,0 );if (rose->neighbour) rose->neighbour->use--;dev_put (rose->device); rose->device =NULL ; } +spin_unlock_bh (&rose_list_lock); +release_sock (sk); +sock_put (sk); +cond_resched (); } -spin_unlock_bh (&rose_list_lock); +if (rescan) + goto start; }/*
@@ -658,7 +684,10 @@ static int rose_release(struct socket *sock)break ; } +spin_lock_bh (&rose_list_lock);dev_put (rose->device); + rose->device =NULL ; +spin_unlock_bh (&rose_list_lock); sock->sk =NULL ;release_sock (sk);sock_put (sk);
net/wireless/certs/wens.hex new file +87 -0
87 lines not on this page · raw message
sound/pci/hda/patch_realtek.c +30 -0
@@ -8606,6 +8606,17 @@ static void alc897_fixup_lenovo_headset_mic(struct hda_codec *codec, } } +static void alc897_fixup_lenovo_headset_mode (struct hda_codec *codec, +const struct hda_fixup *fix,int action) +{ +struct alc_spec *spec = codec->spec; + +if (action ==HDA_FIXUP_ACT_PRE_PROBE ) { + spec->parse_flags |=HDA_PINCFG_HEADSET_MIC ; + spec->gen.hp_automute_hook = alc897_hp_automute_hook; + } +} +static const struct coef_fw alc668_coefs[] = {WRITE_COEF (0x01 ,0xbebe ),WRITE_COEF (0x02 ,0xaaaa ),WRITE_COEF (0x03 ,0x0 ),WRITE_COEF (0x04 ,0x0180 ),WRITE_COEF (0x06 ,0x0 ),WRITE_COEF (0x07 ,0x0f80 ),
@@ -8688,6 +8699,8 @@ enum {ALC897_FIXUP_LENOVO_HEADSET_MIC ,ALC897_FIXUP_HEADSET_MIC_PIN ,ALC897_FIXUP_HP_HSMIC_VERB , +ALC897_FIXUP_LENOVO_HEADSET_MODE , + ALC897_FIXUP_HEADSET_MIC_PIN2, }; static const struct hda_fixup alc662_fixups[] = {
@@ -9095,6 +9108,19 @@ static const struct hda_fixup alc662_fixups[] = { { } }, }, + [ALC897_FIXUP_LENOVO_HEADSET_MODE ] = { + .type =HDA_FIXUP_FUNC , + .v.func = alc897_fixup_lenovo_headset_mode, + }, + [ALC897_FIXUP_HEADSET_MIC_PIN2 ] = { + .type =HDA_FIXUP_PINS , + .v.pins = (const struct hda_pintbl []) { + {0x1a ,0x01a11140 },/* use as headset mic, without its own jack detect */ + { } + }, + .chained = true, + .chain_id =ALC897_FIXUP_LENOVO_HEADSET_MODE + }, };static const struct snd_pci_quirk alc662_fixup_tbl[] = {
@@ -9144,6 +9170,10 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {SND_PCI_QUIRK (0x17aa ,0x32cb ,"Lenovo ThinkCentre M70" ,ALC897_FIXUP_HEADSET_MIC_PIN ),SND_PCI_QUIRK (0x17aa ,0x32cf ,"Lenovo ThinkCentre M950" ,ALC897_FIXUP_HEADSET_MIC_PIN ),SND_PCI_QUIRK (0x17aa ,0x32f7 ,"Lenovo ThinkCentre M90" ,ALC897_FIXUP_HEADSET_MIC_PIN ), +SND_PCI_QUIRK (0x17aa ,0x3321 ,"Lenovo ThinkCentre M70 Gen4" ,ALC897_FIXUP_HEADSET_MIC_PIN ), +SND_PCI_QUIRK (0x17aa ,0x331b ,"Lenovo ThinkCentre M90 Gen4" ,ALC897_FIXUP_HEADSET_MIC_PIN ), +SND_PCI_QUIRK (0x17aa ,0x3364 ,"Lenovo ThinkCentre M90 Gen5" ,ALC897_FIXUP_HEADSET_MIC_PIN ), +SND_PCI_QUIRK (0x17aa ,0x3742 ,"Lenovo TianYi510Pro-14IOB" ,ALC897_FIXUP_HEADSET_MIC_PIN2 ),SND_PCI_QUIRK (0x17aa ,0x38af ,"Lenovo Ideapad Y550P" ,ALC662_FIXUP_IDEAPAD ),SND_PCI_QUIRK (0x17aa ,0x3a0d ,"Lenovo Ideapad Y550" ,ALC662_FIXUP_IDEAPAD ), SND_PCI_QUIRK(0x1849, 0x5892, "ASRock B150M", ALC892_FIXUP_ASROCK_MOBO),