Linux 4.14.52
Greg KH
maintainerI'm announcing the release of the 4.14.52 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/x86/kernel/cpu/intel_rdt.c | 2 arch/x86/kernel/cpu/mcheck/mce-inject.c | 2 block/blk-mq.c | 3 drivers/ata/libata-core.c | 3 drivers/ata/libata-zpodd.c | 2 drivers/base/core.c | 14 ++ drivers/block/nbd.c | 17 ++ drivers/cpufreq/cpufreq.c | 2 drivers/cpufreq/cpufreq_governor.c | 12 -- drivers/hid/intel-ish-hid/ipc/pci-ish.c | 22 +-- drivers/hid/wacom_sys.c | 8 + drivers/net/bonding/bond_options.c | 1 drivers/net/hyperv/netvsc_drv.c | 4 drivers/net/tap.c | 5 drivers/net/tun.c | 3 drivers/net/usb/cdc_ncm.c | 4 drivers/net/virtio_net.c | 3 drivers/net/wireless/intel/iwlwifi/fw/paging.c | 49 ++++++-- drivers/vhost/vhost.c | 3 drivers/w1/masters/mxc_w1.c | 20 ++- fs/binfmt_misc.c | 12 +- fs/btrfs/inode.c | 4 fs/btrfs/ioctl.c | 18 +-- fs/btrfs/scrub.c | 2 fs/cifs/cifsacl.h | 14 ++ fs/cifs/smb2ops.c | 68 +++++++---- fs/cifs/smb2pdu.c | 4 fs/ext4/indirect.c | 14 +- fs/ext4/inline.c | 6 + fs/ext4/inode.c | 46 ++++--- fs/ext4/resize.c | 2 fs/ext4/xattr.c | 2 fs/nfs/nfs4_fs.h | 2 fs/nfs/nfs4proc.c | 148 +++++++++++++++++-------- fs/orangefs/inode.c | 7 + fs/orangefs/namei.c | 7 + include/linux/virtio_net.h | 11 - include/net/transp_v6.h | 11 + include/net/udp.h | 5 mm/backing-dev.c | 18 ++- mm/page_alloc.c | 1 net/dsa/tag_trailer.c | 3 net/ipv4/tcp_ipv4.c | 4 net/ipv4/udp.c | 2 net/ipv4/udp_diag.c | 2 net/ipv6/datagram.c | 6 - net/ipv6/route.c | 3 net/ipv6/tcp_ipv6.c | 4 net/ipv6/udp.c | 3 net/packet/af_packet.c | 4 net/sched/act_simple.c | 15 +- net/socket.c | 18 ++- net/tls/tls_sw.c | 26 ++-- sound/pci/hda/hda_controller.c | 4 sound/pci/hda/patch_conexant.c | 3 sound/pci/hda/patch_realtek.c | 6 - 57 files changed, 472 insertions(+), 214 deletions(-)
Bjørn Mork (1):
cdc_ncm: avoid padding beyond end of skb
Bo Chen (1):
ALSA: hda - Handle kzalloc() failure in snd_hda_attach_pcm_stream()
Chen Yu (1):
cpufreq: governors: Fix long idle detection logic in load calculation
Cong Wang (1):
socket: close race condition between sock_close() and sockfs_setattr()
Dan Carpenter (1):
libata: zpodd: small read overflow in eject_tray()
Daniel Borkmann (1):
tls: fix use-after-free in tls_push_record
Davide Caratti (1):
net/sched: act_simple: fix parsing of TCA_DEF_DATA
Dennis Wassenberg (2):
ALSA: hda: add dock and led support for HP EliteBook 830 G5
ALSA: hda: add dock and led support for HP ProBook 640 G4
Dexuan Cui (1):
hv_netvsc: Fix a network regression after ifdown/ifup
Even Xu (1):
HID: intel_ish-hid: ipc: register more pm callbacks to support hibernation
Frank van der Linden (1):
tcp: verify the checksum of the first data segment in a new connection
Greg Kroah-Hartman (1):
Linux 4.14.52
Hans de Goede (1):
libata: Drop SanDisk SD7UB3Q*G1001 NOLPM quirk
Hui Wang (1):
ALSA: hda/realtek - Enable mic-mute hotkey for several Lenovo AIOs
Jan Kara (2):
ext4: fix hole length detection in ext4_ind_map_blocks()
ext4: fix fencepost error in check for inode count overflow during resize
Jason Gerecke (1):
HID: wacom: Correct logical maximum Y for 2nd-gen Intuos Pro large
Josef Bacik (3):
nbd: fix nbd device deletion
nbd: update size when connected
nbd: use bd_set_size when updating disk size
Julian Anastasov (1):
ipv6: allow PMTU exceptions to local routes
Luca Coelho (1):
iwlwifi: fw: harden page loading code
Lukas Czerner (1):
ext4: update mtime in ext4_punch_hole even if no blocks are released
Mark Syms (1):
CIFS: 511c54a2f69195b28afb9dd119f03787b1625bb4 adds a check for session expiry
Martin Brandenburg (2):
orangefs: set i_size on new symlink
orangefs: report attributes_mask and attributes for statx
Michael S. Tsirkin (1):
vhost: fix info leak due to uninitialized memory
Omar Sandoval (2):
Btrfs: fix clone vs chattr NODATASUM race
Btrfs: fix memory and mount leak in btrfs_ioctl_rm_dev_v2()
Paolo Abeni (1):
udp: fix rx queue len reported by diag and proc interface
Qu Wenruo (1):
btrfs: scrub: Don't use inode pages for device replace
Roman Pen (1):
blk-mq: reinit q->tag_set_list entry only after grace period
Shirish Pargaonkar (1):
cifs: For SMB2 security informaion query, check for minimum sized security descriptor instead of sizeof FileAllInformation class
Stefan Potyra (1):
w1: mxc_w1: Enable clock before calling clk_get_rate() on it
Steve French (2):
smb3: fix various xid leaks
smb3: on reconnect set PreviousSessionId field
Su Yue (1):
btrfs: return error value if create_io_em failed in cow_file_range
Takashi Iwai (1):
ALSA: hda/conexant - Add fixup for HP Z2 G4 workstation
Tao Wang (1):
cpufreq: Fix new policy initialization during limits updates via sysfs
Tejun Heo (1):
bdi: Move cgroup bdi_writeback to a dedicated low concurrency workqueue
Tetsuo Handa (1):
driver core: Don't ignore class_dir_create_and_add() failure.
Thadeu Lima de Souza Cascardo (1):
fs/binfmt_misc.c: do not allow offset overflow
Theodore Ts'o (3):
ext4: do not allow external inodes for inline data
ext4: bubble errors from ext4_find_inline_data_nolock() up to ext4_iget()
ext4: correctly handle a zero-length xattr with a non-zero e_value_offs
Tony Luck (2):
x86/MCE: Fix stack out-of-bounds write in mce-inject.c: Flags_read() x86/intel_rdt: Enable CMT and MBM on new Skylake stepping
Trond Myklebust (1):
NFSv4.1: Fix up replays of interrupted requests
Vlastimil Babka (1):
mm, page_alloc: do not break __GFP_THISNODE by zonelist reset
Willem de Bruijn (1):
net: in virtio_net_hdr only add VLAN_HLEN to csum_start if payload holds vlan
Xiangning Yu (1):
bonding: re-evaluate force_primary when the primary slave name changes
Zhouyang Jia (1):
net: dsa: add error handling for pskb_trim_rcsum
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 51 +SUBLEVEL = 52 EXTRAVERSION = NAME = Petit Gorille
arch/x86/kernel/cpu/intel_rdt.c +2 -0
@@ -773,6 +773,8 @@ static __init void rdt_quirks(void)case INTEL_FAM6_SKYLAKE_X :if (boot_cpu_data.x86_stepping <=4 )set_rdt_options ("!cmt,!mbmtotal,!mbmlocal,!l3cat" ); +else +set_rdt_options ("!l3cat" ); } }
arch/x86/kernel/cpu/mcheck/mce-inject.c +1 -1
@@ -48,7 +48,7 @@ static struct dentry *dfs_inj;static u8 n_banks; -#define MAX_FLAG_OPT_SIZE 3 +#define MAX_FLAG_OPT_SIZE 4#define NBCFG 0x44enum injection_type {
block/blk-mq.c +1 -2
@@ -2252,7 +2252,6 @@ static void blk_mq_del_queue_tag_set(struct request_queue *q)mutex_lock (&set->tag_list_lock);list_del_rcu (&q->tag_set_list); -INIT_LIST_HEAD (&q->tag_set_list);if (list_is_singular (&set->tag_list)) {/* just transitioned to unshared */ set->flags &= ~BLK_MQ_F_TAG_SHARED ;
@@ -2260,8 +2259,8 @@ static void blk_mq_del_queue_tag_set(struct request_queue *q)blk_mq_update_tag_set_depth (set, false); }mutex_unlock (&set->tag_list_lock); -synchronize_rcu (); +INIT_LIST_HEAD (&q->tag_set_list); } static void blk_mq_add_queue_tag_set(struct blk_mq_tag_set *set,
drivers/ata/libata-core.c +0 -3
@@ -4543,9 +4543,6 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { ATA_HORKAGE_ZERO_AFTER_TRIM | ATA_HORKAGE_NOLPM, }, -/* Sandisk devices which are known to not handle LPM well */ - { "SanDisk SD7UB3Q*G1001", NULL, ATA_HORKAGE_NOLPM, }, -/* devices that don't properly handle queued TRIM commands */ {"Micron_M500IT_*" ,"MU01" ,ATA_HORKAGE_NO_NCQ_TRIM | ATA_HORKAGE_ZERO_AFTER_TRIM, },
drivers/ata/libata-zpodd.c +1 -1
@@ -35,7 +35,7 @@ struct zpodd {static int eject_tray (struct ata_device *dev) {struct ata_taskfile tf; -static const char cdb[] = {GPCMD_START_STOP_UNIT , +static const char cdb[ATAPI_CDB_LEN ] = {GPCMD_START_STOP_UNIT ,0 ,0 ,0 ,0x02 ,/* LoEj */ 0 ,0 ,0 ,0 ,0 ,0 ,0 ,
drivers/base/core.c +12 -2
@@ -1461,7 +1461,7 @@ class_dir_create_and_add(struct class *class, struct kobject *parent_kobj) dir =kzalloc (sizeof (*dir),GFP_KERNEL );if (!dir) -return NULL ; +return ERR_PTR (-ENOMEM ); dir->class = class;kobject_init (&dir->kobj, &class_dir_ktype);
@@ -1471,7 +1471,7 @@ class_dir_create_and_add(struct class *class, struct kobject *parent_kobj) retval =kobject_add (&dir->kobj, parent_kobj,"%s" , class->name);if (retval <0 ) {kobject_put (&dir->kobj); -return NULL ; +return ERR_PTR (retval); }return &dir->kobj; }
@@ -1778,6 +1778,10 @@ int device_add(struct device *dev) parent =get_device (dev->parent); kobj =get_device_parent (dev, parent); +if (IS_ERR (kobj)) { + error =PTR_ERR (kobj); + goto parent_error; + }if (kobj) dev->kobj.parent = kobj;
@@ -1876,6 +1880,7 @@ int device_add(struct device *dev)kobject_del (&dev->kobj); Error:cleanup_glue_dir (dev, glue_dir); +parent_error:put_device (parent); name_error:kfree (dev->p);
@@ -2695,6 +2700,11 @@ int device_move(struct device *dev, struct device *new_parent,device_pm_lock (); new_parent =get_device (new_parent); new_parent_kobj =get_device_parent (dev, new_parent); +if (IS_ERR (new_parent_kobj)) { + error =PTR_ERR (new_parent_kobj); +put_device (new_parent); + goto out; + }pr_debug ("device: '%s': %s: moving to '%s'\n" ,dev_name (dev), __func__, new_parent ?dev_name (new_parent) :"<NULL>" );
drivers/block/nbd.c +15 -2
@@ -173,9 +173,12 @@ static const struct device_attribute pid_attr = {static void nbd_dev_remove (struct nbd_device *nbd) {struct gendisk *disk = nbd->disk; +struct request_queue *q; +if (disk) { + q = disk->queue;del_gendisk (disk); -blk_cleanup_queue (disk->queue); +blk_cleanup_queue (q);blk_mq_free_tag_set (&nbd->tag_set); disk->private_data =NULL ;put_disk (disk);
@@ -231,9 +234,18 @@ static void nbd_size_clear(struct nbd_device *nbd)static void nbd_size_update (struct nbd_device *nbd) {struct nbd_config *config = nbd->config; +struct block_device *bdev =bdget_disk (nbd->disk,0 ); +blk_queue_logical_block_size (nbd->disk->queue, config->blksize);blk_queue_physical_block_size (nbd->disk->queue, config->blksize);set_capacity (nbd->disk, config->bytesize >>9 ); +if (bdev) { +if (bdev->bd_disk) +bd_set_size (bdev, config->bytesize); +else + bdev->bd_invalidated =1 ; +bdput (bdev); + }kobject_uevent (&nbd_to_dev (nbd)->kobj,KOBJ_CHANGE ); }
@@ -243,6 +255,8 @@ static void nbd_size_set(struct nbd_device *nbd, loff_t blocksize,struct nbd_config *config = nbd->config; config->blksize = blocksize; config->bytesize = blocksize * nr_blocks; +if (nbd->task_recv !=NULL ) +nbd_size_update (nbd); }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 *bif (ret)return ret; -bd_set_size (bdev, config->bytesize);if (max_part) bdev->bd_invalidated =1 ;mutex_unlock (&nbd->config_lock);
drivers/cpufreq/cpufreq.c +2 -0
@@ -693,6 +693,8 @@ static ssize_t store_##file_name \struct cpufreq_policy new_policy; \ \memcpy (&new_policy, policy,sizeof (*policy)); \ + new_policy.min = policy->user_policy.min; \ + new_policy.max = policy->user_policy.max; \ \ ret =sscanf (buf,"%u" , &new_policy.object); \if (ret !=1 ) \
drivers/cpufreq/cpufreq_governor.c +5 -7
@@ -165,7 +165,7 @@ unsigned int dbs_update(struct cpufreq_policy *policy)* calls, so the previous load value can be used then. */ load = j_cdbs->prev_load; - }else if (unlikely (time_elapsed >2 * sampling_rate && + }else if (unlikely ((int )idle_time >2 * sampling_rate && j_cdbs->prev_load)) {/* * If the CPU had gone completely idle and a task has
@@ -185,10 +185,8 @@ unsigned int dbs_update(struct cpufreq_policy *policy)* clear prev_load to guarantee that the load will be * computed again next time. * -* Detecting this situation is easy: the governor's -* utilization update handler would not have run during -* CPU-idle periods. Hence, an unusually large -* 'time_elapsed' (as compared to the sampling rate) +* Detecting this situation is easy: an unusually large +* 'idle_time' (as compared to the sampling rate) * indicates this scenario. */ load = j_cdbs->prev_load;
@@ -217,8 +215,8 @@ unsigned int dbs_update(struct cpufreq_policy *policy) j_cdbs->prev_load = load; } -if (time_elapsed >2 * sampling_rate) { -unsigned int periods = time_elapsed / sampling_rate; +if (unlikely ((int )idle_time >2 * sampling_rate)) { +unsigned int periods = idle_time / sampling_rate;if (periods < idle_periods) idle_periods = periods;
drivers/hid/intel-ish-hid/ipc/pci-ish.c +7 -15
@@ -204,8 +204,7 @@ static void ish_remove(struct pci_dev *pdev)kfree (ishtp_dev); } -#ifdef CONFIG_PM -static struct device *ish_resume_device; +static struct device __maybe_unused *ish_resume_device;/* 50ms to get resume response */ #define WAIT_FOR_RESUME_ACK_MS 50
@@ -219,7 +218,7 @@ static struct device *ish_resume_device;* in that case a simple resume message is enough, others we need * a reset sequence. */ -static void ish_resume_handler (struct work_struct *work) +static void __maybe_unused ish_resume_handler (struct work_struct *work) {struct pci_dev *pdev =to_pci_dev (ish_resume_device);struct ishtp_device *dev =pci_get_drvdata (pdev);
@@ -261,7 +260,7 @@ static void ish_resume_handler(struct work_struct *work)* * Return: 0 to the pm core */ -static int ish_suspend (struct device *device) +static int __maybe_unused ish_suspend (struct device *device) {struct pci_dev *pdev =to_pci_dev (device);struct ishtp_device *dev =pci_get_drvdata (pdev);
@@ -287,7 +286,7 @@ static int ish_suspend(struct device *device)return 0 ; } -static DECLARE_WORK(resume_work, ish_resume_handler); +static __maybe_unused DECLARE_WORK(resume_work, ish_resume_handler);/** * ish_resume() - ISH resume callback * @device: device pointer
@@ -296,7 +295,7 @@ static DECLARE_WORK(resume_work, ish_resume_handler);* * Return: 0 to the pm core */ -static int ish_resume (struct device *device) +static int __maybe_unused ish_resume (struct device *device) {struct pci_dev *pdev =to_pci_dev (device);struct ishtp_device *dev =pci_get_drvdata (pdev);
@@ -310,21 +309,14 @@ static int ish_resume(struct device *device)return 0 ; } -static const struct dev_pm_ops ish_pm_ops = { - .suspend = ish_suspend, - .resume = ish_resume, -}; -#define ISHTP_ISH_PM_OPS (&ish_pm_ops) -#else -#define ISHTP_ISH_PM_OPS NULL -#endif /* CONFIG_PM */ +static SIMPLE_DEV_PM_OPS(ish_pm_ops, ish_suspend, ish_resume);static struct pci_driver ish_driver = { .name =KBUILD_MODNAME , .id_table = ish_pci_tbl, .probe = ish_probe, .remove = ish_remove, - .driver.pm =ISHTP_ISH_PM_OPS , + .driver.pm = &ish_pm_ops, };module_pci_driver (ish_driver);
drivers/hid/wacom_sys.c +8 -0
@@ -284,6 +284,14 @@ static void wacom_usage_mapping(struct hid_device *hdev, } } +/* 2nd-generation Intuos Pro Large has incorrect Y maximum */ +if (hdev->vendor ==USB_VENDOR_ID_WACOM && + hdev->product ==0x0358 && +WACOM_PEN_FIELD (field) && +wacom_equivalent_usage (usage->hid) ==HID_GD_Y ) { + field->logical_maximum =43200 ; + } +switch (usage->hid) {case HID_GD_X : features->x_max = field->logical_maximum;
drivers/net/bonding/bond_options.c +1 -0
@@ -1142,6 +1142,7 @@ static int bond_option_primary_set(struct bonding *bond, slave->dev->name);rcu_assign_pointer (bond->primary_slave, slave);strcpy (bond->params.primary, slave->dev->name); + bond->force_primary = true;bond_select_active_slave (bond); goto out; }
drivers/net/hyperv/netvsc_drv.c +3 -1
@@ -123,8 +123,10 @@ static int netvsc_open(struct net_device *net) } rdev = nvdev->extension; -if (!rdev->link_state) +if (!rdev->link_state) {netif_carrier_on (net); +netif_tx_wake_all_queues (net); + }if (vf_netdev) {/* Setting synthetic device up transparently sets
drivers/net/tap.c +4 -1
@@ -777,13 +777,16 @@ static ssize_t tap_put_user(struct tap_queue *q,int total;if (q->flags &IFF_VNET_HDR ) { +int vlan_hlen =skb_vlan_tag_present (skb) ?VLAN_HLEN :0 ;struct virtio_net_hdr vnet_hdr; + vnet_hdr_len =READ_ONCE (q->vnet_hdr_sz);if (iov_iter_count (iter) < vnet_hdr_len)return -EINVAL ;if (virtio_net_hdr_from_skb (skb, &vnet_hdr, -tap_is_little_endian (q), true)) +tap_is_little_endian (q), true, + vlan_hlen))BUG (); if (copy_to_iter(&vnet_hdr, sizeof(vnet_hdr), iter) !=
drivers/net/tun.c +2 -1
@@ -1648,7 +1648,8 @@ static ssize_t tun_put_user(struct tun_struct *tun,return -EINVAL ;if (virtio_net_hdr_from_skb (skb, &gso, -tun_is_little_endian (tun), true)) { +tun_is_little_endian (tun), true, + vlan_hlen)) {struct skb_shared_info *sinfo =skb_shinfo (skb); pr_err("unexpected GSO type: " "0x%x, gso_size %d, hdr_len %d\n",
drivers/net/usb/cdc_ncm.c +2 -2
@@ -1124,7 +1124,7 @@ cdc_ncm_fill_tx_frame(struct usbnet *dev, struct sk_buff *skb, __le32 sign)* accordingly. Otherwise, we should check here. */ if (ctx->drvflags &CDC_NCM_FLAG_NDP_TO_END ) - delayed_ndp_size = ctx->max_ndp_size; + delayed_ndp_size =ALIGN (ctx->max_ndp_size, ctx->tx_ndp_modulus);else delayed_ndp_size =0 ;
@@ -1285,7 +1285,7 @@ cdc_ncm_fill_tx_frame(struct usbnet *dev, struct sk_buff *skb, __le32 sign)/* If requested, put NDP at end of frame. */ if (ctx->drvflags &CDC_NCM_FLAG_NDP_TO_END ) { nth16 = (struct usb_cdc_ncm_nth16 *)skb_out->data; -cdc_ncm_align_tail (skb_out, ctx->tx_ndp_modulus,0 , ctx->tx_curr_size); +cdc_ncm_align_tail (skb_out, ctx->tx_ndp_modulus,0 , ctx->tx_curr_size - ctx->max_ndp_size); nth16->wNdpIndex =cpu_to_le16 (skb_out->len);skb_put_data (skb_out, ctx->delayed_ndp16, ctx->max_ndp_size);
drivers/net/virtio_net.c +2 -1
@@ -1237,7 +1237,8 @@ static int xmit_skb(struct send_queue *sq, struct sk_buff *skb) hdr =skb_vnet_hdr (skb);if (virtio_net_hdr_from_skb (skb, &hdr->hdr, -virtio_is_little_endian (vi->vdev), false)) +virtio_is_little_endian (vi->vdev), false, +0 ))BUG ();if (vi->mergeable_rx_bufs)
drivers/net/wireless/intel/iwlwifi/fw/paging.c +41 -8
108 lines not on this page · raw message
drivers/vhost/vhost.c +3 -0
@@ -2382,6 +2382,9 @@ struct vhost_msg_node *vhost_new_msg(struct vhost_virtqueue *vq, int type)struct vhost_msg_node *node =kmalloc (sizeof *node,GFP_KERNEL );if (!node)return NULL ; + +/* Make sure all padding within the structure is initialized. */ +memset (&node->msg,0 ,sizeof node->msg); node->vq = vq; node->msg.type = type;return node;
drivers/w1/masters/mxc_w1.c +13 -7
@@ -112,6 +112,10 @@ static int mxc_w1_probe(struct platform_device *pdev)if (IS_ERR (mdev->clk))return PTR_ERR (mdev->clk); + err =clk_prepare_enable (mdev->clk); +if (err) +return err; + clkrate =clk_get_rate (mdev->clk);if (clkrate <10000000 ) dev_warn(&pdev->dev,
@@ -125,12 +129,10 @@ static int mxc_w1_probe(struct platform_device *pdev) res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); mdev->regs =devm_ioremap_resource (&pdev->dev, res); -if (IS_ERR (mdev->regs)) -return PTR_ERR (mdev->regs); - - err =clk_prepare_enable (mdev->clk); -if (err) -return err; +if (IS_ERR (mdev->regs)) { + err =PTR_ERR (mdev->regs); + goto out_disable_clk; + }/* Software reset 1-Wire module */ writeb (MXC_W1_RESET_RST , mdev->regs +MXC_W1_RESET );
@@ -146,8 +148,12 @@ static int mxc_w1_probe(struct platform_device *pdev) err =w1_add_master_device (&mdev->bus_master);if (err) -clk_disable_unprepare (mdev->clk); + goto out_disable_clk; +return 0 ; + +out_disable_clk: +clk_disable_unprepare (mdev->clk);return err; }
fs/binfmt_misc.c +9 -3
@@ -387,8 +387,13 @@ static Node *create_entry(const char __user *buffer, size_t count) s =strchr (p, del);if (!s) goto einval; - *s++ ='\0' ; - e->offset =simple_strtoul (p, &p,10 ); + *s ='\0' ; +if (p != s) { +int r =kstrtoint (p,10 , &e->offset); +if (r !=0 || e->offset <0 ) + goto einval; + } + p = s;if (*p++) goto einval;pr_debug ("register: offset: %#x\n" , e->offset);
@@ -428,7 +433,8 @@ static Node *create_entry(const char __user *buffer, size_t count)if (e->mask &&string_unescape_inplace (e->mask,UNESCAPE_HEX ) != e->size) goto einval; -if (e->size + e->offset >BINPRM_BUF_SIZE ) +if (e->size >BINPRM_BUF_SIZE || +BINPRM_BUF_SIZE - e->size < e->offset) goto einval;pr_debug ("register: magic/mask length: %i\n" , e->size);if (USE_DEBUG ) {
fs/btrfs/inode.c +3 -1
@@ -1027,8 +1027,10 @@ static noinline int cow_file_range(struct inode *inode, ram_size,/* ram_bytes */ BTRFS_COMPRESS_NONE ,/* compress_type */ BTRFS_ORDERED_REGULAR /* type */); -if (IS_ERR (em)) +if (IS_ERR (em)) { + ret =PTR_ERR (em); goto out_reserve; + }free_extent_map (em); ret = btrfs_add_ordered_extent(inode, start, ins.objectid,
fs/btrfs/ioctl.c +11 -7
@@ -2682,8 +2682,10 @@ static long btrfs_ioctl_rm_dev_v2(struct file *file, void __user *arg) }/* Check for compatibility reject unknown flags */ -if (vol_args->flags & ~BTRFS_VOL_ARG_V2_FLAGS_SUPPORTED ) -return -EOPNOTSUPP ; +if (vol_args->flags & ~BTRFS_VOL_ARG_V2_FLAGS_SUPPORTED ) { + ret = -EOPNOTSUPP ; + goto out; + }if (test_and_set_bit (BTRFS_FS_EXCL_OP , &fs_info->flags)) { ret =BTRFS_ERROR_DEV_EXCL_RUN_IN_PROGRESS ;
@@ -3861,11 +3863,6 @@ static noinline int btrfs_clone_files(struct file *file, struct file *file_src, src->i_sb != inode->i_sb)return -EXDEV ; -/* don't make the dst file partly checksummed */ -if ((BTRFS_I (src)->flags &BTRFS_INODE_NODATASUM ) != - (BTRFS_I (inode)->flags &BTRFS_INODE_NODATASUM )) -return -EINVAL ; -if (S_ISDIR (src->i_mode) ||S_ISDIR (inode->i_mode))return -EISDIR ;
@@ -3875,6 +3872,13 @@ static noinline int btrfs_clone_files(struct file *file, struct file *file_src,inode_lock (src); } +/* don't make the dst file partly checksummed */ +if ((BTRFS_I (src)->flags &BTRFS_INODE_NODATASUM ) != + (BTRFS_I (inode)->flags &BTRFS_INODE_NODATASUM )) { + ret = -EINVAL ; + goto out_unlock; + } +/* determine range to clone */ ret = -EINVAL ;if (off + len > src->i_size || off + len < off)
fs/btrfs/scrub.c +1 -1
@@ -2775,7 +2775,7 @@ static int scrub_extent(struct scrub_ctx *sctx, u64 logical, u64 len, have_csum =scrub_find_csum (sctx, logical, csum);if (have_csum ==0 ) ++sctx->stat.no_csum; -if (sctx->is_dev_replace && !have_csum) { +if (0 && sctx->is_dev_replace && !have_csum) { ret =copy_nocow_pages (sctx, logical, l, mirror_num, physical_for_dev_replace);
fs/cifs/cifsacl.h +14 -0
@@ -98,4 +98,18 @@ struct cifs_ace {struct cifs_sid sid;/* ie UUID of user or group who gets these perms */ } __attribute__((packed)); +/* +* Minimum security identifier can be one for system defined Users +* and Groups such as NULL SID and World or Built-in accounts such +* as Administrator and Guest and consists of +* Revision + Num (Sub)Auths + Authority + Domain (one Subauthority) +*/ +#define MIN_SID_LEN (1 + 1 + 6 + 4)/* in bytes */ + +/* +* Minimum security descriptor can be one without any SACL and DACL and can +* consist of revision, type, and two sids of minimum size for owner and group +*/ +#define MIN_SEC_DESC_LEN (sizeof(struct cifs_ntsd) + (2 * MIN_SID_LEN)) +#endif /* _CIFSACL_H */
fs/cifs/smb2ops.c +47 -21
134 lines not on this page · raw message
fs/cifs/smb2pdu.c +2 -2
@@ -1182,6 +1182,7 @@ SMB2_sess_setup(const unsigned int xid, struct cifs_ses *ses, sess_data->ses = ses; sess_data->buf0_type =CIFS_NO_BUFFER ; sess_data->nls_cp = (struct nls_table *) nls_cp; + sess_data->previous_session = ses->Suid;while (sess_data->func) sess_data->func (sess_data);
@@ -2278,8 +2279,7 @@ SMB2_query_acl(const unsigned int xid, struct cifs_tcon *tcon,return query_info (xid, tcon, persistent_fid, volatile_fid,0 ,SMB2_O_INFO_SECURITY , additional_info, -SMB2_MAX_BUFFER_SIZE , -sizeof (struct smb2_file_all_info ), data, plen); +SMB2_MAX_BUFFER_SIZE ,MIN_SEC_DESC_LEN , data, plen); }int
fs/ext4/indirect.c +10 -4
@@ -561,10 +561,16 @@ int ext4_ind_map_blocks(handle_t *handle, struct inode *inode,unsigned epb = inode->i_sb->s_blocksize /sizeof (u32);int i; -/* Count number blocks in a subtree under 'partial' */ - count =1 ; -for (i =0 ; partial + i != chain + depth -1 ; i++) - count *= epb; +/* +* Count number blocks in a subtree under 'partial'. At each +* level we count number of complete empty subtrees beyond +* current offset and then descend into the subtree only +* partially beyond current offset. +*/ + count =0 ; +for (i = partial - chain +1 ; i < depth; i++) + count = count * epb + (epb - offsets[i] -1 ); + count++;/* Fill in size of a hole we found */ map->m_pblk =0 ; map->m_len = min_t(unsigned int, map->m_len, count);
fs/ext4/inline.c +6 -0
@@ -150,6 +150,12 @@ int ext4_find_inline_data_nolock(struct inode *inode) goto out;if (!is.s.not_found) { +if (is.s.here->e_value_inum) { +EXT4_ERROR_INODE (inode,"inline data xattr refers " +"to an external xattr inode" ); + error = -EFSCORRUPTED ; + goto out; + }EXT4_I (inode)->i_inline_off = (u16)((void *)is.s.here - (void *)ext4_raw_inode (&is.iloc)); EXT4_I(inode)->i_inline_size = EXT4_MIN_INLINE_DATA_SIZE +
fs/ext4/inode.c +25 -21
79 lines not on this page · raw message
fs/ext4/resize.c +1 -1
@@ -1905,7 +1905,7 @@ int ext4_resize_fs(struct super_block *sb, ext4_fsblk_t n_blocks_count)return 0 ; n_group =ext4_get_group_number (sb, n_blocks_count -1 ); -if (n_group > (0xFFFFFFFFUL /EXT4_INODES_PER_GROUP (sb))) { +if (n_group >= (0xFFFFFFFFUL /EXT4_INODES_PER_GROUP (sb))) {ext4_warning (sb,"resize would cause inodes_count overflow" );return -EINVAL ; }
fs/ext4/xattr.c +1 -1
@@ -1687,7 +1687,7 @@ static int ext4_xattr_set_entry(struct ext4_xattr_info *i,/* No failures allowed past this point. */ -if (!s->not_found && here->e_value_offs) { +if (!s->not_found && here->e_value_size && here->e_value_offs) {/* Remove the old value. */ void *first_val = s->base + min_offs;size_t offs =le16_to_cpu (here->e_value_offs);
fs/nfs/nfs4_fs.h +1 -1
@@ -465,7 +465,7 @@ extern void nfs_increment_open_seqid(int status, struct nfs_seqid *seqid);extern void nfs_increment_lock_seqid (int status,struct nfs_seqid *seqid);extern void nfs_release_seqid (struct nfs_seqid *seqid);extern void nfs_free_seqid (struct nfs_seqid *seqid); -extern int nfs4_setup_sequence (const struct nfs_client *client, +extern int nfs4_setup_sequence (struct nfs_client *client,struct nfs4_sequence_args *args,struct nfs4_sequence_res *res,struct rpc_task *task);
fs/nfs/nfs4proc.c +102 -46
265 lines not on this page · raw message
fs/orangefs/inode.c +7 -0
@@ -269,6 +269,13 @@ int orangefs_getattr(const struct path *path, struct kstat *stat,else stat->result_mask =STATX_BASIC_STATS & ~STATX_SIZE ; + + stat->attributes_mask =STATX_ATTR_IMMUTABLE | +STATX_ATTR_APPEND ; +if (inode->i_flags &S_IMMUTABLE ) + stat->attributes |=STATX_ATTR_IMMUTABLE ; +if (inode->i_flags &S_APPEND ) + stat->attributes |=STATX_ATTR_APPEND ; }return ret; }
fs/orangefs/namei.c +7 -0
@@ -314,6 +314,13 @@ static int orangefs_symlink(struct inode *dir, ret =PTR_ERR (inode); goto out; } +/* +* This is necessary because orangefs_inode_getattr will not +* re-read symlink size as it is impossible for it to change. +* Invalidating the cache does not help. orangefs_new_inode +* does not set the correct size (it does not know symname). +*/ + inode->i_size =strlen (symname); gossip_debug(GOSSIP_NAME_DEBUG, "Assigned symlink inode new number of %pU\n",
include/linux/virtio_net.h +4 -7
@@ -58,7 +58,8 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb,static inline int virtio_net_hdr_from_skb (const struct sk_buff *skb,struct virtio_net_hdr *hdr,bool little_endian, -bool has_data_valid) +bool has_data_valid, +int vlan_hlen) {memset (hdr,0 ,sizeof (*hdr));/* no info leak */
@@ -83,12 +84,8 @@ static inline int virtio_net_hdr_from_skb(const struct sk_buff *skb,if (skb->ip_summed ==CHECKSUM_PARTIAL ) { hdr->flags =VIRTIO_NET_HDR_F_NEEDS_CSUM ; -if (skb_vlan_tag_present (skb)) - hdr->csum_start =__cpu_to_virtio16 (little_endian, -skb_checksum_start_offset (skb) +VLAN_HLEN ); -else - hdr->csum_start =__cpu_to_virtio16 (little_endian, -skb_checksum_start_offset (skb)); + hdr->csum_start =__cpu_to_virtio16 (little_endian, +skb_checksum_start_offset (skb) + vlan_hlen); hdr->csum_offset =__cpu_to_virtio16 (little_endian, skb->csum_offset); } else if (has_data_valid &&
include/net/transp_v6.h +9 -2
@@ -45,8 +45,15 @@ int ip6_datagram_send_ctl(struct net *net, struct sock *sk, struct msghdr *msg, struct flowi6 *fl6, struct ipcm6_cookie *ipc6, struct sockcm_cookie *sockc); -void ip6_dgram_sock_seq_show (struct seq_file *seq,struct sock *sp, -__u16 srcp,__u16 destp,int bucket); +void __ip6_dgram_sock_seq_show (struct seq_file *seq,struct sock *sp, +__u16 srcp,__u16 destp,int rqueue,int bucket); +static inline void +ip6_dgram_sock_seq_show (struct seq_file *seq,struct sock *sp,__u16 srcp, +__u16 destp,int bucket) +{ +__ip6_dgram_sock_seq_show (seq, sp, srcp, destp,sk_rmem_alloc_get (sp), + bucket); +}#define LOOPBACK4_IPV6 cpu_to_be32(0x7f000006)
include/net/udp.h +5 -0
@@ -244,6 +244,11 @@ static inline __be16 udp_flow_src_port(struct net *net, struct sk_buff *skb,return htons ((((u64 ) hash * (max - min)) >>32 ) + min); } +static inline int udp_rqueue_get (struct sock *sk) +{ +return sk_rmem_alloc_get (sk) -READ_ONCE (udp_sk (sk)->forward_deficit); +} +/* net/ipv4/udp.c */ void udp_destruct_sock (struct sock *sk);void skb_consume_udp (struct sock *sk,struct sk_buff *skb,int len);
mm/backing-dev.c +17 -1
@@ -409,6 +409,7 @@ static void wb_exit(struct bdi_writeback *wb)* protected. */ static DEFINE_SPINLOCK (cgwb_lock); +static struct workqueue_struct *cgwb_release_wq;/** * wb_congested_get_create - get or create a wb_congested
@@ -519,7 +520,7 @@ static void cgwb_release(struct percpu_ref *refcnt) { struct bdi_writeback *wb = container_of(refcnt, struct bdi_writeback, refcnt); -schedule_work (&wb->release_work); +queue_work (cgwb_release_wq, &wb->release_work); }static void cgwb_kill (struct bdi_writeback *wb)
@@ -783,6 +784,21 @@ static void cgwb_bdi_register(struct backing_dev_info *bdi) spin_unlock_irq(&cgwb_lock); } +static int __init cgwb_init (void ) +{ +/* +* There can be many concurrent release work items overwhelming +* system_wq. Put them in a separate wq and limit concurrency. +* There's no point in executing many of these in parallel. +*/ + cgwb_release_wq =alloc_workqueue ("cgwb_release" ,0 ,1 ); +if (!cgwb_release_wq) +return -ENOMEM ; + +return 0 ; +} +subsys_initcall (cgwb_init); +#else /* CONFIG_CGROUP_WRITEBACK */ static int cgwb_bdi_init (struct backing_dev_info *bdi)
mm/page_alloc.c +0 -1
@@ -3981,7 +3981,6 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,* orientated. */ if (!(alloc_flags &ALLOC_CPUSET ) || reserve_flags) { - ac->zonelist =node_zonelist (numa_node_id (), gfp_mask); ac->preferred_zoneref =first_zones_zonelist (ac->zonelist, ac->high_zoneidx, ac->nodemask); }
net/dsa/tag_trailer.c +2 -1
@@ -79,7 +79,8 @@ static struct sk_buff *trailer_rcv(struct sk_buff *skb, struct net_device *dev,if (unlikely (ds->cpu_port_mask &BIT (source_port)))return NULL ; -pskb_trim_rcsum (skb, skb->len -4 ); +if (pskb_trim_rcsum (skb, skb->len -4 )) +return NULL ; skb->dev = ds->ports[source_port].netdev;
net/ipv4/tcp_ipv4.c +4 -0
@@ -1675,6 +1675,10 @@ int tcp_v4_rcv(struct sk_buff *skb)reqsk_put (req); goto discard_it; } +if (tcp_checksum_complete (skb)) { +reqsk_put (req); + goto csum_error; + }if (unlikely (sk->sk_state !=TCP_LISTEN )) {inet_csk_reqsk_queue_drop_and_put (sk, req); goto lookup;
net/ipv4/udp.c +1 -1
@@ -2720,7 +2720,7 @@ static void udp4_format_sock(struct sock *sp, struct seq_file *f," %02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d %pK %d" , bucket, src, srcp, dest, destp, sp->sk_state,sk_wmem_alloc_get (sp), -sk_rmem_alloc_get (sp), +udp_rqueue_get (sp),0 ,0L ,0 ,from_kuid_munged (seq_user_ns (f),sock_i_uid (sp)), 0, sock_i_ino(sp),
net/ipv4/udp_diag.c +1 -1
@@ -163,7 +163,7 @@ static int udp_diag_dump_one(struct sk_buff *in_skb, const struct nlmsghdr *nlh,static void udp_diag_get_info (struct sock *sk,struct inet_diag_msg *r,void *info) { - r->idiag_rqueue =sk_rmem_alloc_get (sk); + r->idiag_rqueue =udp_rqueue_get (sk); r->idiag_wqueue =sk_wmem_alloc_get (sk); }
net/ipv6/datagram.c +3 -3
@@ -1026,8 +1026,8 @@ int ip6_datagram_send_ctl(struct net *net, struct sock *sk, }EXPORT_SYMBOL_GPL (ip6_datagram_send_ctl); -void ip6_dgram_sock_seq_show (struct seq_file *seq,struct sock *sp, -__u16 srcp,__u16 destp,int bucket) +void __ip6_dgram_sock_seq_show (struct seq_file *seq,struct sock *sp, +__u16 srcp,__u16 destp,int rqueue,int bucket) {const struct in6_addr *dest, *src;
@@ -1043,7 +1043,7 @@ void ip6_dgram_sock_seq_show(struct seq_file *seq, struct sock *sp, dest->s6_addr32[2 ], dest->s6_addr32[3 ], destp, sp->sk_state,sk_wmem_alloc_get (sp), -sk_rmem_alloc_get (sp), + rqueue,0 ,0L ,0 ,from_kuid_munged (seq_user_ns (seq),sock_i_uid (sp)), 0,
net/ipv6/route.c +0 -3
@@ -1476,9 +1476,6 @@ static void __ip6_rt_update_pmtu(struct dst_entry *dst, const struct sock *sk,const struct in6_addr *daddr, *saddr;struct rt6_info *rt6 = (struct rt6_info *)dst; -if (rt6->rt6i_flags &RTF_LOCAL ) -return ; -if (dst_metric_locked (dst,RTAX_MTU ))return ;
net/ipv6/tcp_ipv6.c +4 -0
@@ -1453,6 +1453,10 @@ static int tcp_v6_rcv(struct sk_buff *skb)reqsk_put (req); goto discard_it; } +if (tcp_checksum_complete (skb)) { +reqsk_put (req); + goto csum_error; + }if (unlikely (sk->sk_state !=TCP_LISTEN )) {inet_csk_reqsk_queue_drop_and_put (sk, req); goto lookup;
net/ipv6/udp.c +2 -1
@@ -1503,7 +1503,8 @@ int udp6_seq_show(struct seq_file *seq, void *v)struct inet_sock *inet =inet_sk (v);__u16 srcp =ntohs (inet->inet_sport);__u16 destp =ntohs (inet->inet_dport); -ip6_dgram_sock_seq_show (seq, v, srcp, destp, bucket); +__ip6_dgram_sock_seq_show (seq, v, srcp, destp, +udp_rqueue_get (v), bucket); }return 0 ; }
net/packet/af_packet.c +2 -2
@@ -2046,7 +2046,7 @@ static int packet_rcv_vnet(struct msghdr *msg, const struct sk_buff *skb,return -EINVAL ; *len -=sizeof (vnet_hdr); -if (virtio_net_hdr_from_skb (skb, &vnet_hdr,vio_le (), true)) +if (virtio_net_hdr_from_skb (skb, &vnet_hdr,vio_le (), true,0 ))return -EINVAL ;return memcpy_to_msg (msg, (void *)&vnet_hdr,sizeof (vnet_hdr));
@@ -2313,7 +2313,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev,if (do_vnet) {if (virtio_net_hdr_from_skb (skb, h.raw + macoff -sizeof (struct virtio_net_hdr ), -vio_le (), true)) { +vio_le (), true,0 )) {spin_lock (&sk->sk_receive_queue.lock); goto drop_n_account; }
net/sched/act_simple.c +6 -9
@@ -53,22 +53,22 @@ static void tcf_simp_release(struct tc_action *a, int bind)kfree (d->tcfd_defdata); } -static int alloc_defdata (struct tcf_defact *d,char *defdata) +static int alloc_defdata (struct tcf_defact *d,const struct nlattr *defdata) { d->tcfd_defdata =kzalloc (SIMP_MAX_DATA ,GFP_KERNEL );if (unlikely (!d->tcfd_defdata))return -ENOMEM ; -strlcpy (d->tcfd_defdata, defdata,SIMP_MAX_DATA ); +nla_strlcpy (d->tcfd_defdata, defdata,SIMP_MAX_DATA );return 0 ; } -static void reset_policy (struct tcf_defact *d,char *defdata, +static void reset_policy (struct tcf_defact *d,const struct nlattr *defdata,struct tc_defact *p) {spin_lock_bh (&d->tcf_lock); d->tcf_action = p->action;memset (d->tcfd_defdata,0 ,SIMP_MAX_DATA ); -strlcpy (d->tcfd_defdata, defdata,SIMP_MAX_DATA ); +nla_strlcpy (d->tcfd_defdata, defdata,SIMP_MAX_DATA );spin_unlock_bh (&d->tcf_lock); }
@@ -87,7 +87,6 @@ static int tcf_simp_init(struct net *net, struct nlattr *nla,struct tcf_defact *d;bool exists = false;int ret =0 , err; -char *defdata;if (nla ==NULL )return -EINVAL ;
@@ -110,8 +109,6 @@ static int tcf_simp_init(struct net *net, struct nlattr *nla,return -EINVAL ; } - defdata =nla_data (tb[TCA_DEF_DATA ]); -if (!exists) { ret =tcf_idr_create (tn, parm->index, est, a, &act_simp_ops, bind, false);
@@ -119,7 +116,7 @@ static int tcf_simp_init(struct net *net, struct nlattr *nla,return ret; d =to_defact (*a); - ret =alloc_defdata (d, defdata); + ret =alloc_defdata (d, tb[TCA_DEF_DATA ]);if (ret <0 ) {tcf_idr_release (*a, bind);return ret;
@@ -133,7 +130,7 @@ static int tcf_simp_init(struct net *net, struct nlattr *nla,if (!ovr)return -EEXIST ; -reset_policy (d, defdata, parm); +reset_policy (d, tb[TCA_DEF_DATA ], parm); }if (ret ==ACT_P_CREATED )
net/socket.c +15 -3
@@ -538,7 +538,10 @@ static int sockfs_setattr(struct dentry *dentry, struct iattr *iattr)if (!err && (iattr->ia_valid &ATTR_UID )) {struct socket *sock =SOCKET_I (d_inode (dentry)); - sock->sk->sk_uid = iattr->ia_uid; +if (sock->sk) + sock->sk->sk_uid = iattr->ia_uid; +else + err = -ENOENT ; }return err;
@@ -588,12 +591,16 @@ EXPORT_SYMBOL(sock_alloc);* an inode not a file. */ -void sock_release (struct socket *sock) +static void __sock_release (struct socket *sock,struct inode *inode) {if (sock->ops) {struct module *owner = sock->ops->owner; +if (inode) +inode_lock (inode); sock->ops->release (sock); +if (inode) +inode_unlock (inode); sock->ops =NULL ;module_put (owner); }
@@ -608,6 +615,11 @@ void sock_release(struct socket *sock) } sock->file =NULL ; } + +void sock_release (struct socket *sock) +{ +__sock_release (sock,NULL ); +}EXPORT_SYMBOL (sock_release);void __sock_tx_timestamp (__u16 tsflags,__u8 *tx_flags)
@@ -1122,7 +1134,7 @@ static int sock_mmap(struct file *file, struct vm_area_struct *vma)static int sock_close (struct inode *inode,struct file *filp) { -sock_release (SOCKET_I (inode)); +__sock_release (SOCKET_I (inode), inode);return 0 ; }
net/tls/tls_sw.c +13 -13
@@ -211,18 +211,12 @@ static void tls_free_both_sg(struct sock *sk) }static int tls_do_encryption (struct tls_context *tls_ctx, -struct tls_sw_context *ctx,size_t data_len, -gfp_t flags) +struct tls_sw_context *ctx, +struct aead_request *aead_req, +size_t data_len) { -unsigned int req_size =sizeof (struct aead_request ) + -crypto_aead_reqsize (ctx->aead_send); -struct aead_request *aead_req;int rc; - aead_req =kzalloc (req_size, flags); -if (!aead_req) -return -ENOMEM ; - ctx->sg_encrypted_data[0 ].offset += tls_ctx->prepend_size; ctx->sg_encrypted_data[0 ].length -= tls_ctx->prepend_size;
@@ -235,7 +229,6 @@ static int tls_do_encryption(struct tls_context *tls_ctx, ctx->sg_encrypted_data[0 ].offset -= tls_ctx->prepend_size; ctx->sg_encrypted_data[0 ].length += tls_ctx->prepend_size; -kfree (aead_req);return rc; }
@@ -244,8 +237,14 @@ static int tls_push_record(struct sock *sk, int flags, {struct tls_context *tls_ctx =tls_get_ctx (sk);struct tls_sw_context *ctx =tls_sw_ctx (tls_ctx); +struct aead_request *req;int rc; + req =kzalloc (sizeof (struct aead_request ) + +crypto_aead_reqsize (ctx->aead_send), sk->sk_allocation); +if (!req) +return -ENOMEM ; +sg_mark_end (ctx->sg_plaintext_data + ctx->sg_plaintext_num_elem -1 );sg_mark_end (ctx->sg_encrypted_data + ctx->sg_encrypted_num_elem -1 );
@@ -261,15 +260,14 @@ static int tls_push_record(struct sock *sk, int flags, tls_ctx->pending_open_record_frags =0 ;set_bit (TLS_PENDING_CLOSED_RECORD , &tls_ctx->flags); - rc =tls_do_encryption (tls_ctx, ctx, ctx->sg_plaintext_size, - sk->sk_allocation); + rc =tls_do_encryption (tls_ctx, ctx, req, ctx->sg_plaintext_size);if (rc <0 ) {/* If we are called from write_space and * we fail, we need to set this SOCK_NOSPACE * to trigger another write_space in the future. */ set_bit (SOCK_NOSPACE , &sk->sk_socket->flags); -return rc; + goto out_req; } free_sg(sk, ctx->sg_plaintext_data, &ctx->sg_plaintext_num_elem,
@@ -284,6 +282,8 @@ static int tls_push_record(struct sock *sk, int flags,tls_err_abort (sk);tls_advance_record_sn (sk, tls_ctx); +out_req: +kfree (req);return rc; }
sound/pci/hda/hda_controller.c +3 -1
@@ -748,8 +748,10 @@ int snd_hda_attach_pcm_stream(struct hda_bus *_bus, struct hda_codec *codec,return err;strlcpy (pcm->name, cpcm->name,sizeof (pcm->name)); apcm =kzalloc (sizeof (*apcm),GFP_KERNEL ); -if (apcm ==NULL ) +if (apcm ==NULL ) { +snd_device_free (chip->card, pcm);return -ENOMEM ; + } apcm->chip = chip; apcm->pcm = pcm; apcm->codec = codec;
sound/pci/hda/patch_conexant.c +3 -0
@@ -959,12 +959,15 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {SND_PCI_QUIRK (0x103c ,0x8079 ,"HP EliteBook 840 G3" ,CXT_FIXUP_HP_DOCK ),SND_PCI_QUIRK (0x103c ,0x807C ,"HP EliteBook 820 G3" ,CXT_FIXUP_HP_DOCK ),SND_PCI_QUIRK (0x103c ,0x80FD ,"HP ProBook 640 G2" ,CXT_FIXUP_HP_DOCK ), +SND_PCI_QUIRK (0x103c ,0x83b3 ,"HP EliteBook 830 G5" ,CXT_FIXUP_HP_DOCK ), +SND_PCI_QUIRK (0x103c ,0x83d3 ,"HP ProBook 640 G4" ,CXT_FIXUP_HP_DOCK ),SND_PCI_QUIRK (0x103c ,0x8174 ,"HP Spectre x360" ,CXT_FIXUP_HP_SPECTRE ),SND_PCI_QUIRK (0x103c ,0x8115 ,"HP Z1 Gen3" ,CXT_FIXUP_HP_GATE_MIC ),SND_PCI_QUIRK (0x103c ,0x814f ,"HP ZBook 15u G3" ,CXT_FIXUP_MUTE_LED_GPIO ),SND_PCI_QUIRK (0x103c ,0x822e ,"HP ProBook 440 G4" ,CXT_FIXUP_MUTE_LED_GPIO ),SND_PCI_QUIRK (0x103c ,0x8299 ,"HP 800 G3 SFF" ,CXT_FIXUP_HP_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x103c ,0x829a ,"HP 800 G3 DM" ,CXT_FIXUP_HP_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x103c ,0x8455 ,"HP Z2 G4" ,CXT_FIXUP_HP_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1043 ,0x138d ,"Asus" ,CXT_FIXUP_HEADPHONE_MIC_PIN ),SND_PCI_QUIRK (0x152d ,0x0833 ,"OLPC XO-1.5" ,CXT_FIXUP_OLPC_XO ), SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410),
sound/pci/hda/patch_realtek.c +5 -1
@@ -6439,7 +6439,6 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x17aa ,0x312f ,"ThinkCentre Station" ,ALC294_FIXUP_LENOVO_MIC_LOCATION ),SND_PCI_QUIRK (0x17aa ,0x3138 ,"ThinkCentre Station" ,ALC294_FIXUP_LENOVO_MIC_LOCATION ),SND_PCI_QUIRK (0x17aa ,0x313c ,"ThinkCentre Station" ,ALC294_FIXUP_LENOVO_MIC_LOCATION ), -SND_PCI_QUIRK (0x17aa ,0x3112 ,"ThinkCentre AIO" ,ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY ),SND_PCI_QUIRK (0x17aa ,0x3902 ,"Lenovo E50-80" ,ALC269_FIXUP_DMIC_THINKPAD_ACPI ),SND_PCI_QUIRK (0x17aa ,0x3977 ,"IdeaPad S210" ,ALC283_FIXUP_INT_MIC ), SND_PCI_QUIRK(0x17aa, 0x3978, "IdeaPad Y410P", ALC269_FIXUP_NO_SHUTUP),
@@ -6610,6 +6609,11 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { {0x12, 0x90a60140}, {0x14, 0x90170110}, {0x21, 0x02211020}), + SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY, + {0x12, 0x90a60140}, + {0x14, 0x90170110}, + {0x19, 0x02a11030}, + {0x21, 0x02211020}), SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, {0x12, 0x90a60140}, {0x14, 0x90170150},