Linux 4.9.272
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.9.272 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.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/arm64/kernel/traps.c | 8 --- arch/x86/kvm/svm.c | 8 +-- drivers/firmware/efi/cper.c | 4 - drivers/firmware/efi/memattr.c | 5 -- drivers/hid/i2c-hid/i2c-hid-core.c | 4 - drivers/hid/usbhid/hid-pidff.c | 1 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 drivers/net/usb/cdc_ncm.c | 12 +++++ drivers/vfio/pci/Kconfig | 1 drivers/vfio/pci/vfio_pci_config.c | 2 drivers/vfio/platform/vfio_platform_common.c | 2 drivers/xen/xen-pciback/vpci.c | 14 +++--- fs/btrfs/file-item.c | 10 ++-- fs/btrfs/tree-log.c | 13 +++--- fs/ext4/extents.c | 43 +++++++++++---------- fs/ocfs2/file.c | 55 ++++++++++++++++++++++++--- include/linux/usb/usbnet.h | 2 include/net/caif/caif_dev.h | 2 include/net/caif/cfcnfg.h | 2 include/net/caif/cfserl.h | 1 init/main.c | 2 net/bluetooth/hci_core.c | 7 ++- net/bluetooth/hci_sock.c | 4 - net/caif/caif_dev.c | 13 ++++-- net/caif/caif_usb.c | 14 ++++++ net/caif/cfcnfg.c | 16 +++++-- net/caif/cfserl.c | 5 ++ net/ieee802154/nl-mac.c | 4 + net/ieee802154/nl-phy.c | 4 + net/netfilter/ipvs/ip_vs_ctl.c | 2 net/netfilter/nfnetlink_cthelper.c | 8 ++- net/nfc/llcp_sock.c | 2 sound/core/timer.c | 3 - 34 files changed, 185 insertions(+), 91 deletions(-)
Arnd Bergmann (1):
HID: i2c-hid: fix format string mismatch
Grant Grundler (1):
net: usb: cdc_ncm: don't spew notifications
Greg Kroah-Hartman (1):
Linux 4.9.272
Heiner Kallweit (1):
efi: Allow EFI_MEMORY_XP and EFI_MEMORY_RO both to be cleared
Jan Beulich (1):
xen-pciback: redo VF placement in the virtual topology
Josef Bacik (2):
btrfs: fix error handling in btrfs_del_csums
btrfs: fixup error handling in fixup_inode_link_counts
Julian Anastasov (1):
ipvs: ignore IP_VS_SVC_F_HASHED flag when adding service
Junxiao Bi (1):
ocfs2: fix data corruption by fallocate
Krzysztof Kozlowski (1):
nfc: fix NULL ptr dereference in llcp_sock_getname() after failed connect
Lin Ma (2):
Bluetooth: fix the erroneous flush_work() order
Bluetooth: use correct lock to prevent UAF of hdev object
Mark Rutland (1):
pid: take a reference when initializing cad_pid
Max Gurtovoy (1):
vfio/platform: fix module_put call in error flow
Michael Chan (1):
bnxt_en: Remove the setting of dev_port.
Michael Weiser (1):
arm64: Remove unimplemented syscall log message
Pablo Neira Ayuso (1):
netfilter: nfnetlink_cthelper: hit EBUSY on updates if size mismatches
Pavel Skripkin (4):
net: caif: added cfserl_release function
net: caif: add proper error handling
net: caif: fix memory leak in caif_device_notify
net: caif: fix memory leak in cfusbl_device_notify
Randy Dunlap (1):
vfio/pci: zap_vma_ptes() needs MMU
Rasmus Villemoes (1):
efi: cper: fix snprintf() use in cper_dimm_err_location()
Sean Christopherson (1):
KVM: SVM: Truncate GPR value for DR and CR accesses in !64-bit mode
Takashi Iwai (1):
ALSA: timer: Fix master timer notification
Wei Yongjun (1):
ieee802154: fix error return code in ieee802154_llsec_getparams()
Ye Bin (1):
ext4: fix bug on in ext4_es_cache_extent as ext4_split_extent_at failed
Zhen Lei (3):
vfio/pci: Fix error return code in vfio_ecap_init()
HID: pidff: fix error return code in hid_pidff_init()
ieee802154: fix error return code in ieee802154_add_iface()
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 271 +SUBLEVEL = 272 EXTRAVERSION = NAME = Roaring Lionus
arch/arm64/kernel/traps.c +0 -8
@@ -543,14 +543,6 @@ asmlinkage long do_ni_syscall(struct pt_regs *regs) }#endif -if (show_unhandled_signals_ratelimited ()) { -pr_info ("%s[%d]: syscall %d\n" , current->comm, -task_pid_nr (current), (int )regs->syscallno); -dump_instr ("" , regs); -if (user_mode (regs)) -__show_regs (regs); - } -return sys_ni_syscall (); }
arch/x86/kvm/svm.c +4 -4
@@ -3412,7 +3412,7 @@ static int cr_interception(struct vcpu_svm *svm) err =0 ;if (cr >=16 ) {/* mov to cr */ cr -=16 ; - val =kvm_register_read (&svm->vcpu, reg); + val =kvm_register_readl (&svm->vcpu, reg);switch (cr) {case 0 :if (!check_selective_cr0_intercepted (svm, val))
@@ -3457,7 +3457,7 @@ static int cr_interception(struct vcpu_svm *svm)kvm_queue_exception (&svm->vcpu,UD_VECTOR );return 1 ; } -kvm_register_write (&svm->vcpu, reg, val); +kvm_register_writel (&svm->vcpu, reg, val); }kvm_complete_insn_gp (&svm->vcpu, err);
@@ -3489,13 +3489,13 @@ static int dr_interception(struct vcpu_svm *svm)if (dr >=16 ) {/* mov to DRn */ if (!kvm_require_dr (&svm->vcpu, dr -16 ))return 1 ; - val =kvm_register_read (&svm->vcpu, reg); + val =kvm_register_readl (&svm->vcpu, reg);kvm_set_dr (&svm->vcpu, dr -16 , val); }else {if (!kvm_require_dr (&svm->vcpu, dr))return 1 ;kvm_get_dr (&svm->vcpu, dr, &val); -kvm_register_write (&svm->vcpu, reg, val); +kvm_register_writel (&svm->vcpu, reg, val); }skip_emulated_instruction (&svm->vcpu);
drivers/firmware/efi/cper.c +1 -3
@@ -257,8 +257,7 @@ static int cper_dimm_err_location(struct cper_mem_err_compact *mem, char *msg)if (!msg || !(mem->validation_bits &CPER_MEM_VALID_MODULE_HANDLE ))return 0 ; - n =0 ; - len =CPER_REC_LEN -1 ; + len =CPER_REC_LEN ;dmi_memdev_name (mem->mem_dev_handle, &bank, &device);if (bank && device) n =snprintf (msg, len,"DIMM location: %s %s " , bank, device);
@@ -267,7 +266,6 @@ static int cper_dimm_err_location(struct cper_mem_err_compact *mem, char *msg)"DIMM location: not present. DMI handle: 0x%.4x " , mem->mem_dev_handle); - msg[n] ='\0' ;return n; }
drivers/firmware/efi/memattr.c +0 -5
@@ -68,11 +68,6 @@ static bool entry_is_valid(const efi_memory_desc_t *in, efi_memory_desc_t *out)return false; } -if (!(in->attribute & (EFI_MEMORY_RO |EFI_MEMORY_XP ))) { -pr_warn ("Entry attributes invalid: RO and XP bits both cleared\n" ); -return false; - } -if (PAGE_SIZE >EFI_PAGE_SIZE && (!PAGE_ALIGNED (in->phys_addr) || !PAGE_ALIGNED (in->num_pages <<EFI_PAGE_SHIFT ))) {
drivers/hid/i2c-hid/i2c-hid-core.c +2 -2
@@ -1157,8 +1157,8 @@ static int i2c_hid_probe(struct i2c_client *client, hid->vendor =le16_to_cpu (ihid->hdesc.wVendorID); hid->product =le16_to_cpu (ihid->hdesc.wProductID); -snprintf (hid->name,sizeof (hid->name),"%s %04hX:%04hX" , - client->name, hid->vendor, hid->product); +snprintf (hid->name,sizeof (hid->name),"%s %04X:%04X" , + client->name, (u16 )hid->vendor, (u16 )hid->product);strlcpy (hid->phys,dev_name (&client->dev),sizeof (hid->phys)); ihid->quirks =i2c_hid_lookup_quirk (hid->vendor, hid->product);
drivers/hid/usbhid/hid-pidff.c +1 -0
@@ -1304,6 +1304,7 @@ int hid_pidff_init(struct hid_device *hid)if (pidff->pool[PID_DEVICE_MANAGED_POOL ].value && pidff->pool[PID_DEVICE_MANAGED_POOL ].value[0 ] ==0 ) { + error = -EPERM ;hid_notice (hid,"device does not support device managed pool\n" ); goto fail;
drivers/net/ethernet/broadcom/bnxt/bnxt.c +0 -1
@@ -4262,7 +4262,6 @@ int bnxt_hwrm_func_qcaps(struct bnxt *bp) pf->fw_fid =le16_to_cpu (resp->fid); pf->port_id =le16_to_cpu (resp->port_id); - bp->dev->dev_port = pf->port_id;memcpy (pf->mac_addr, resp->mac_address,ETH_ALEN );memcpy (bp->dev->dev_addr, pf->mac_addr,ETH_ALEN ); pf->max_rsscos_ctxs =le16_to_cpu (resp->max_rsscos_ctx);
drivers/net/usb/cdc_ncm.c +11 -1
@@ -1563,6 +1563,15 @@ cdc_ncm_speed_change(struct usbnet *dev,uint32_t rx_speed =le32_to_cpu (data->DLBitRRate);uint32_t tx_speed =le32_to_cpu (data->ULBitRate); +/* if the speed hasn't changed, don't report it. +* RTL8156 shipped before 2021 sends notification about every 32ms. +*/ +if (dev->rx_speed == rx_speed && dev->tx_speed == tx_speed) +return ; + + dev->rx_speed = rx_speed; + dev->tx_speed = tx_speed; +/* * Currently the USB-NET API does not support reporting the actual * device speed. Do print it instead.
@@ -1606,7 +1615,8 @@ static void cdc_ncm_status(struct usbnet *dev, struct urb *urb)* USB_CDC_NOTIFY_NETWORK_CONNECTION notification shall be * sent by device after USB_CDC_NOTIFY_SPEED_CHANGE. */ -usbnet_link_change (dev, !!event->wValue,0 ); +if (netif_carrier_ok (dev->net) != !!event->wValue) +usbnet_link_change (dev, !!event->wValue,0 );break ;case USB_CDC_NOTIFY_SPEED_CHANGE :
drivers/vfio/pci/Kconfig +1 -0
@@ -1,6 +1,7 @@ config VFIO_PCI tristate "VFIO support for PCI devices" depends on VFIO && PCI && EVENTFD + depends on MMU select VFIO_VIRQFD select IRQ_BYPASS_MANAGER help
drivers/vfio/pci/vfio_pci_config.c +1 -1
@@ -1576,7 +1576,7 @@ static int vfio_ecap_init(struct vfio_pci_device *vdev)if (len ==0xFF ) { len =vfio_ext_cap_len (vdev, ecap, epos);if (len <0 ) -return ret; +return len; } }
drivers/vfio/platform/vfio_platform_common.c +1 -1
@@ -288,7 +288,7 @@ static int vfio_platform_open(void *device_data)vfio_platform_regions_cleanup (vdev); err_reg:mutex_unlock (&driver_lock); -module_put (THIS_MODULE ); +module_put (vdev->parent_module);return ret; }
drivers/xen/xen-pciback/vpci.c +8 -6
@@ -68,7 +68,7 @@ static int __xen_pcibk_add_pci_dev(struct xen_pcibk_device *pdev, struct pci_dev *dev, int devid, publish_pci_dev_cb publish_cb) { - int err = 0, slot, func = -1; + int err = 0, slot, func = PCI_FUNC(dev->devfn);struct pci_dev_entry *t, *dev_entry;struct vpci_dev_data *vpci_dev = pdev->pci_dev_data;
@@ -93,23 +93,26 @@ static int __xen_pcibk_add_pci_dev(struct xen_pcibk_device *pdev,/* * Keep multi-function devices together on the virtual PCI bus, except -* virtual functions. +* that we want to keep virtual functions at func 0 on their own. They +* aren't multi-function devices and hence their presence at func 0 +* may cause guests to not scan the other functions. */ -if (!dev->is_virtfn) { +if (!dev->is_virtfn || func) {for (slot =0 ; slot <PCI_SLOT_MAX ; slot++) {if (list_empty (&vpci_dev->dev_list[slot]))continue ; t =list_entry (list_first (&vpci_dev->dev_list[slot]), struct pci_dev_entry, list); +if (t->dev->is_virtfn && !PCI_FUNC (t->dev->devfn)) +continue ;if (match_slot (dev, t->dev)) {pr_info ("vpci: %s: assign to virtual slot %d func %d\n" ,pci_name (dev), slot, -PCI_FUNC (dev->devfn)); + func);list_add_tail (&dev_entry->list, &vpci_dev->dev_list[slot]); - func =PCI_FUNC (dev->devfn); goto unlock; } }
@@ -122,7 +125,6 @@ static int __xen_pcibk_add_pci_dev(struct xen_pcibk_device *pdev, pci_name(dev), slot);list_add_tail (&dev_entry->list, &vpci_dev->dev_list[slot]); - func = dev->is_virtfn ?0 :PCI_FUNC (dev->devfn); goto unlock; } }
fs/btrfs/file-item.c +5 -5
@@ -608,7 +608,7 @@ int btrfs_del_csums(struct btrfs_trans_handle *trans,u64 end_byte = bytenr + len;u64 csum_end;struct extent_buffer *leaf; -int ret; +int ret =0 ;u16 csum_size =btrfs_super_csum_size (root->fs_info->super_copy);int blocksize_bits = root->fs_info->sb->s_blocksize_bits;
@@ -626,6 +626,7 @@ int btrfs_del_csums(struct btrfs_trans_handle *trans, path->leave_spinning =1 ; ret =btrfs_search_slot (trans, root, &key, path,-1 ,1 );if (ret >0 ) { + ret =0 ;if (path->slots[0 ] ==0 )break ; path->slots[0 ]--;
@@ -656,7 +657,7 @@ int btrfs_del_csums(struct btrfs_trans_handle *trans,if (key.offset >= bytenr && csum_end <= end_byte) { ret =btrfs_del_item (trans, root, path);if (ret) - goto out; +break ;if (key.offset == bytenr)break ; }else if (key.offset < bytenr && csum_end > end_byte) {
@@ -700,8 +701,9 @@ int btrfs_del_csums(struct btrfs_trans_handle *trans, ret =btrfs_split_item (trans, root, path, &key, offset);if (ret && ret != -EAGAIN ) {btrfs_abort_transaction (trans, ret); - goto out; +break ; } + ret =0 ; key.offset = end_byte -1 ; }else {
@@ -711,8 +713,6 @@ int btrfs_del_csums(struct btrfs_trans_handle *trans, }btrfs_release_path (path); } - ret =0 ; -out:btrfs_free_path (path);return ret; }
fs/btrfs/tree-log.c +7 -6
@@ -1529,6 +1529,7 @@ static noinline int fixup_inode_link_counts(struct btrfs_trans_handle *trans,break ;if (ret ==1 ) { + ret =0 ;if (path->slots[0 ] ==0 )break ; path->slots[0 ]--;
@@ -1541,17 +1542,19 @@ static noinline int fixup_inode_link_counts(struct btrfs_trans_handle *trans, ret =btrfs_del_item (trans, root, path);if (ret) - goto out; +break ;btrfs_release_path (path); inode =read_one_inode (root, key.offset); -if (!inode) -return -EIO ; +if (!inode) { + ret = -EIO ; +break ; + } ret =fixup_inode_link_count (trans, root, inode);iput (inode);if (ret) - goto out; +break ;/* * fixup on a directory may create new entries,
@@ -1560,8 +1563,6 @@ static noinline int fixup_inode_link_counts(struct btrfs_trans_handle *trans,*/ key.offset = (u64)-1 ; } - ret =0 ; -out:btrfs_release_path (path);return ret; }
fs/ext4/extents.c +23 -20
60 lines not on this page · raw message
fs/ocfs2/file.c +50 -5
91 lines not on this page · raw message
include/linux/usb/usbnet.h +2 -0
@@ -80,6 +80,8 @@ struct usbnet {# define EVENT_LINK_CHANGE 11# define EVENT_SET_RX_MODE 12# define EVENT_NO_IP_ALIGN 13 +u32 rx_speed;/* in bps - NOT Mbps */ +u32 tx_speed;/* in bps - NOT Mbps */ };static inline struct usb_driver *driver_of (struct usb_interface *intf)
include/net/caif/caif_dev.h +1 -1
@@ -119,7 +119,7 @@ void caif_free_client(struct cflayer *adap_layer);* The link_support layer is used to add any Link Layer specific * framing. */ -void caif_enroll_dev(struct net_device *dev, struct caif_dev_common *caifdev, +int caif_enroll_dev(struct net_device *dev, struct caif_dev_common *caifdev, struct cflayer *link_support, int head_room, struct cflayer **layer, int (**rcv_func)( struct sk_buff *, struct net_device *,
include/net/caif/cfcnfg.h +1 -1
@@ -62,7 +62,7 @@ void cfcnfg_remove(struct cfcnfg *cfg);* @fcs: Specify if checksum is used in CAIF Framing Layer. * @head_room: Head space needed by link specific protocol. */ -void +int cfcnfg_add_phy_layer(struct cfcnfg *cnfg, struct net_device *dev, struct cflayer *phy_layer, enum cfcnfg_phy_preference pref,
include/net/caif/cfserl.h +1 -0
@@ -9,4 +9,5 @@#include <net/caif/caif_layer.h> struct cflayer *cfserl_create (int instance,bool use_stx); +void cfserl_release (struct cflayer *layer);#endif
init/main.c +1 -1
@@ -1005,7 +1005,7 @@ static noinline void __init kernel_init_freeable(void)*/ set_cpus_allowed_ptr (current, cpu_all_mask); - cad_pid =task_pid (current); + cad_pid =get_pid (task_pid (current));smp_prepare_cpus (setup_max_cpus);
net/bluetooth/hci_core.c +6 -1
@@ -1422,8 +1422,13 @@ static int hci_dev_do_open(struct hci_dev *hdev) }else {/* Init failed, cleanup */ flush_work (&hdev->tx_work); -flush_work (&hdev->cmd_work); + +/* Since hci_rx_work() is possible to awake new cmd_work +* it should be flushed first to avoid unexpected call of +* hci_cmd_work() +*/ flush_work (&hdev->rx_work); +flush_work (&hdev->cmd_work);skb_queue_purge (&hdev->cmd_q);skb_queue_purge (&hdev->rx_q);
net/bluetooth/hci_sock.c +2 -2
@@ -750,7 +750,7 @@ void hci_sock_dev_event(struct hci_dev *hdev, int event)/* Detach sockets from device */ read_lock (&hci_sk_list.lock);sk_for_each (sk, &hci_sk_list.head) { -bh_lock_sock_nested (sk); +lock_sock (sk);if (hci_pi (sk)->hdev == hdev) {hci_pi (sk)->hdev =NULL ; sk->sk_err =EPIPE ;
@@ -759,7 +759,7 @@ void hci_sock_dev_event(struct hci_dev *hdev, int event)hci_dev_put (hdev); } -bh_unlock_sock (sk); +release_sock (sk); }read_unlock (&hci_sk_list.lock); }
net/caif/caif_dev.c +9 -4
@@ -303,7 +303,7 @@ static void dev_flowctrl(struct net_device *dev, int on)caifd_put (caifd); } -void caif_enroll_dev(struct net_device *dev, struct caif_dev_common *caifdev, +int caif_enroll_dev(struct net_device *dev, struct caif_dev_common *caifdev, struct cflayer *link_support, int head_room, struct cflayer **layer, int (**rcv_func)(struct sk_buff *, struct net_device *,
@@ -314,11 +314,12 @@ void caif_enroll_dev(struct net_device *dev, struct caif_dev_common *caifdev,enum cfcnfg_phy_preference pref;struct cfcnfg *cfg =get_cfcnfg (dev_net (dev));struct caif_device_entry_list *caifdevs; +int res; caifdevs =caif_device_list (dev_net (dev)); caifd =caif_device_alloc (dev);if (!caifd) -return ; +return -ENOMEM ; *layer = &caifd->layer;spin_lock_init (&caifd->flow_lock);
@@ -340,7 +341,7 @@ void caif_enroll_dev(struct net_device *dev, struct caif_dev_common *caifdev, sizeof(caifd->layer.name) - 1); caifd->layer.name[sizeof (caifd->layer.name) -1 ] =0 ; caifd->layer.transmit = transmit; - cfcnfg_add_phy_layer(cfg, + res = cfcnfg_add_phy_layer(cfg, dev, &caifd->layer, pref,
@@ -350,6 +351,7 @@ void caif_enroll_dev(struct net_device *dev, struct caif_dev_common *caifdev,mutex_unlock (&caifdevs->lock);if (rcv_func) *rcv_func = receive; +return res; }EXPORT_SYMBOL (caif_enroll_dev);
@@ -364,6 +366,7 @@ static int caif_device_notify(struct notifier_block *me, unsigned long what,struct cflayer *layer, *link_support;int head_room =0 ;struct caif_device_entry_list *caifdevs; +int res; cfg =get_cfcnfg (dev_net (dev)); caifdevs =caif_device_list (dev_net (dev));
@@ -389,8 +392,10 @@ static int caif_device_notify(struct notifier_block *me, unsigned long what,break ; } } -caif_enroll_dev (dev, caifdev, link_support, head_room, + res =caif_enroll_dev (dev, caifdev, link_support, head_room, &layer,NULL ); +if (res) +cfserl_release (link_support); caifdev->flowctrl = dev_flowctrl;break ;
net/caif/caif_usb.c +13 -1
@@ -116,6 +116,11 @@ static struct cflayer *cfusbl_create(int phyid, u8 ethaddr[ETH_ALEN],return (struct cflayer *) this; } +static void cfusbl_release (struct cflayer *layer) +{ +kfree (layer); +} +static struct packet_type caif_usb_type__read_mostly = { .type =cpu_to_be16 (ETH_P_802_EX1 ), };
@@ -128,6 +133,7 @@ static int cfusbl_device_notify(struct notifier_block *me, unsigned long what,struct cflayer *layer, *link_support;struct usbnet *usbnet;struct usb_device *usbdev; +int res;/* Check whether we have a NCM device, and find its VID/PID. */ if (!(dev->dev.parent && dev->dev.parent->driver &&
@@ -170,8 +176,11 @@ static int cfusbl_device_notify(struct notifier_block *me, unsigned long what,if (dev->num_tx_queues >1 )pr_warn ("USB device uses more than one tx queue\n" ); -caif_enroll_dev (dev, &common, link_support,CFUSB_MAX_HEADLEN , + res =caif_enroll_dev (dev, &common, link_support,CFUSB_MAX_HEADLEN , &layer, &caif_usb_type.func); +if (res) + goto err; +if (!pack_added)dev_add_pack (&caif_usb_type); pack_added = true;
@@ -181,6 +190,9 @@ static int cfusbl_device_notify(struct notifier_block *me, unsigned long what, layer->name[sizeof (layer->name) -1 ] =0 ;return 0 ; +err: +cfusbl_release (link_support); +return res; }static struct notifier_block caif_device_notifier = {
net/caif/cfcnfg.c +11 -5
@@ -455,7 +455,7 @@ cfcnfg_linkup_rsp(struct cflayer *layer, u8 channel_id, enum cfctrl_srv serv,rcu_read_unlock (); } -void +int cfcnfg_add_phy_layer(struct cfcnfg *cnfg, struct net_device *dev, struct cflayer *phy_layer, enum cfcnfg_phy_preference pref,
@@ -464,7 +464,7 @@ cfcnfg_add_phy_layer(struct cfcnfg *cnfg, {struct cflayer *frml;struct cfcnfg_phyinfo *phyinfo =NULL ; -int i; +int i, res =0 ;u8 phyid;mutex_lock (&cnfg->lock);
@@ -478,12 +478,15 @@ cfcnfg_add_phy_layer(struct cfcnfg *cnfg, goto got_phyid; }pr_warn ("Too many CAIF Link Layers (max 6)\n" ); + res = -EEXIST ; goto out; got_phyid: phyinfo =kzalloc (sizeof (struct cfcnfg_phyinfo ),GFP_ATOMIC ); -if (!phyinfo) +if (!phyinfo) { + res = -ENOMEM ; goto out_err; + } phy_layer->id = phyid; phyinfo->pref = pref;
@@ -497,8 +500,10 @@ cfcnfg_add_phy_layer(struct cfcnfg *cnfg, frml =cffrml_create (phyid, fcs); -if (!frml) +if (!frml) { + res = -ENOMEM ; goto out_err; + } phyinfo->frm_layer = frml;layer_set_up (frml, cnfg->mux);
@@ -516,11 +521,12 @@ cfcnfg_add_phy_layer(struct cfcnfg *cnfg,list_add_rcu (&phyinfo->node, &cnfg->phys); out:mutex_unlock (&cnfg->lock); -return ; +return res; out_err:kfree (phyinfo);mutex_unlock (&cnfg->lock); +return res; }EXPORT_SYMBOL (cfcnfg_add_phy_layer);
net/caif/cfserl.c +5 -0
@@ -31,6 +31,11 @@ static int cfserl_transmit(struct cflayer *layr, struct cfpkt *pkt);static void cfserl_ctrlcmd (struct cflayer *layr,enum caif_ctrlcmd ctrl,int phyid); +void cfserl_release (struct cflayer *layer) +{ +kfree (layer); +} +struct cflayer *cfserl_create (int instance,bool use_stx) {struct cfserl *this =kzalloc (sizeof (struct cfserl ),GFP_ATOMIC );
net/ieee802154/nl-mac.c +3 -1
@@ -688,8 +688,10 @@ int ieee802154_llsec_getparams(struct sk_buff *skb, struct genl_info *info)nla_put_u8 (msg,IEEE802154_ATTR_LLSEC_SECLEVEL , params.out_level) ||nla_put_u32 (msg,IEEE802154_ATTR_LLSEC_FRAME_COUNTER ,be32_to_cpu (params.frame_counter)) || - ieee802154_llsec_fill_key_id(msg, ¶ms.out_key)) + ieee802154_llsec_fill_key_id(msg, ¶ms.out_key)) { + rc = -ENOBUFS; goto out_free; + }dev_put (dev);
net/ieee802154/nl-phy.c +3 -1
@@ -249,8 +249,10 @@ int ieee802154_add_iface(struct sk_buff *skb, struct genl_info *info) }if (nla_put_string (msg,IEEE802154_ATTR_PHY_NAME ,wpan_phy_name (phy)) || -nla_put_string (msg,IEEE802154_ATTR_DEV_NAME , dev->name)) +nla_put_string (msg,IEEE802154_ATTR_DEV_NAME , dev->name)) { + rc = -EMSGSIZE ; goto nla_put_failure; + }dev_put (dev);wpan_phy_put (phy);
net/netfilter/ipvs/ip_vs_ctl.c +1 -1
@@ -1256,7 +1256,7 @@ ip_vs_add_service(struct netns_ipvs *ipvs, struct ip_vs_service_user_kern *u,ip_vs_addr_copy (svc->af, &svc->addr, &u->addr); svc->port = u->port; svc->fwmark = u->fwmark; - svc->flags = u->flags; + svc->flags = u->flags & ~IP_VS_SVC_F_HASHED ; svc->timeout = u->timeout *HZ ; svc->netmask = u->netmask; svc->ipvs = ipvs;
net/netfilter/nfnetlink_cthelper.c +6 -2
@@ -355,10 +355,14 @@ static int nfnl_cthelper_update(const struct nlattr * const tb[], struct nf_conntrack_helper *helper) { + u32 size;int ret; -if (tb[NFCTH_PRIV_DATA_LEN ]) -return -EBUSY ; +if (tb[NFCTH_PRIV_DATA_LEN ]) { + size =ntohl (nla_get_be32 (tb[NFCTH_PRIV_DATA_LEN ])); +if (size != helper->data_len) +return -EBUSY ; + }if (tb[NFCTH_POLICY ]) { ret =nfnl_cthelper_update_policy (helper, tb[NFCTH_POLICY ]);
net/nfc/llcp_sock.c +2 -0
@@ -121,6 +121,7 @@ static int llcp_sock_bind(struct socket *sock, struct sockaddr *addr, int alen)if (!llcp_sock->service_name) {nfc_llcp_local_put (llcp_sock->local); llcp_sock->local =NULL ; + llcp_sock->dev =NULL ; ret = -ENOMEM ; goto put_dev; }
@@ -130,6 +131,7 @@ static int llcp_sock_bind(struct socket *sock, struct sockaddr *addr, int alen) llcp_sock->local =NULL ;kfree (llcp_sock->service_name); llcp_sock->service_name =NULL ; + llcp_sock->dev =NULL ; ret = -EADDRINUSE ; goto put_dev; }
sound/core/timer.c +2 -1
@@ -488,9 +488,10 @@ static void snd_timer_notify1(struct snd_timer_instance *ti, int event)return ;if (timer->hw.flags &SNDRV_TIMER_HW_SLAVE )return ; + event +=10 ;/* convert to SNDRV_TIMER_EVENT_MXXX */ list_for_each_entry (ts, &ti->slave_active_head, active_list)if (ts->ccallback) - ts->ccallback (ts, event +100 , &tstamp, resolution); + ts->ccallback (ts, event, &tstamp, resolution); }/* start/continue a master timer */