Linux 4.9.85
Greg KH
maintainerI'm announcing the release of the 4.9.85 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:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm64/kernel/traps.c | 2 arch/x86/entry/entry_64.S | 13 ++++ arch/x86/oprofile/nmi_int.c | 2 arch/xtensa/mm/init.c | 70 ++++++++++++++++++++--- crypto/asymmetric_keys/pkcs7_verify.c | 2 crypto/asymmetric_keys/public_key.c | 4 - crypto/asymmetric_keys/restrict.c | 7 +- drivers/android/binder.c | 4 - drivers/dax/dax.c | 12 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 58 ++++++++++++++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 drivers/gpu/drm/amd/amdgpu/si_dpm.c | 5 + drivers/gpu/drm/drm_edid.c | 3 drivers/hid/hid-core.c | 3 drivers/hid/hid-ids.h | 3 drivers/iio/imu/adis_trigger.c | 7 +- drivers/iio/industrialio-buffer.c | 2 drivers/infiniband/core/umem.c | 2 drivers/infiniband/core/uverbs_main.c | 27 ++++++-- drivers/irqchip/irq-gic-v3.c | 2 drivers/media/v4l2-core/videobuf-dma-sg.c | 5 - drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 10 --- drivers/nvdimm/bus.c | 11 +-- drivers/nvdimm/pfn_devs.c | 15 +++- drivers/pci/quirks.c | 39 +++++++----- drivers/scsi/ibmvscsi/ibmvfc.h | 2 drivers/usb/core/quirks.c | 3 drivers/usb/dwc3/gadget.c | 2 drivers/usb/gadget/function/f_fs.c | 6 - drivers/usb/host/ohci-hcd.c | 10 ++- drivers/usb/host/ohci-hub.c | 4 - drivers/usb/host/ohci-q.c | 17 +++-- drivers/usb/misc/ldusb.c | 6 + drivers/usb/musb/musb_host.c | 8 -- drivers/usb/renesas_usbhs/fifo.c | 5 + fs/dax.c | 1 include/linux/dax.h | 5 - include/linux/fs.h | 20 ++++++ include/linux/kernel.h | 1 include/linux/mm.h | 13 ++++ kernel/memremap.c | 13 ++-- mm/frame_vector.c | 12 +++ mm/gup.c | 64 +++++++++++++++++++++ mm/memory.c | 40 +++++++++---- net/ipv4/ip_sockglue.c | 7 -- net/ipv6/ipv6_sockglue.c | 10 --- net/mac80211/cfg.c | 2 48 files changed, 432 insertions(+), 131 deletions(-)
AMAN DEEP (1):
usb: ohci: Proper handling of ed_rm_list to handle race condition between usb_kill_urb() and finish_unlinks()
Alex Deucher (3):
drm/amdgpu: Add dpm quirk for Jet PRO (v2) drm/amdgpu: add atpx quirk handling (v2) drm/amdgpu: Avoid leaking PM domain on driver unbind (v2)
Arnd Bergmann (2):
cfg80211: fix cfg80211_beacon_dup x86/oprofile: Fix bogus GCC-8 warning in nmi_setup()
Bin Liu (1):
Revert "usb: musb: host: don't start next rx urb if current one failed"
Casey Leedom (1):
PCI/cxgb4: Extend T3 PCI quirk to T4+ devices
Dan Williams (8):
libnvdimm: fix integer overflow static analysis warning
device-dax: implement ->split() to catch invalid munmap attempts
mm: introduce get_user_pages_longterm
v4l2: disable filesystem-dax mapping support
IB/core: disable memory registration of filesystem-dax vmas
libnvdimm, dax: fix 1GB-aligned namespaces vs physical misalignment
mm: fail get_vaddr_frames() for filesystem-dax mappings
x86/entry/64: Clear extra registers beyond syscall arguments, to reduce speculation attack surface
Eric Biggers (4):
X.509: fix BUG_ON() when hash algorithm is unsupported PKCS#7: fix certificate chain verification
binder: add missing binder_unlock()
X.509: fix NULL dereference when restricting key with unsupported_sig
Greg Kroah-Hartman (1):
Linux 4.9.85
Jack Pham (1):
usb: gadget: f_fs: Process all descriptors during bind
Jack Stocker (1):
Add delay-init quirk for Corsair K70 RGB keyboards
Jan H. Schönherr (1):
mm: Fix devm_memremap_pages() collision handling
Jan Kara (1):
fs/dax.c: fix inefficiency in dax_writeback_mapping_range()
Kai-Heng Feng (2):
drm/edid: Add 6 bpc quirk for CPT panel in Asus UX303LA drm/amdgpu: add new device to use atpx quirk
Karsten Koop (1):
usb: ldusb: add PIDs for new CASSY devices supported by this driver
Lars-Peter Clausen (1):
iio: adis_lib: Initialize trigger before requesting interrupt
Leon Romanovsky (1):
RDMA/uverbs: Protect from command mask overflow
Max Filippov (1):
xtensa: fix high memory/reserved memory collision
Michael Weiser (1):
arm64: Disable unhandled signal log messages by default
Paolo Abeni (1):
netfilter: drop outermost socket lock in getsockopt()
Ross Zwisler (1):
mm: avoid spurious 'bad pmd' warning messages
Shanker Donthineni (1):
irqchip/gic-v3: Use wmb() instead of smb_wmb() in gic_raise_softirq()
Shigeru Yoshida (1):
ohci-hcd: Fix race condition caused by ohci_urb_enqueue() and io_watchdog_func()
Stefan Windfeldt-Prytz (1):
iio: buffer: check if a buffer has been set up when poll is called
Thinh Nguyen (1):
usb: dwc3: gadget: Set maxpacket size for ep0 IN
Tyrel Datwyler (1):
scsi: ibmvfc: fix misdefined reserved field in ibmvfc_fcp_rsp_info
Yoshihiro Shimoda (1):
usb: renesas_usbhs: missed the "running" flag in usb_dmac with rx path
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 84 +SUBLEVEL = 85 EXTRAVERSION = NAME = Roaring Lionus
arch/arm64/kernel/traps.c +1 -1
@@ -50,7 +50,7 @@ static const char *handler[]= { "Error" }; -int show_unhandled_signals =1 ; +int show_unhandled_signals =0 ;/* * Dump out the contents of some kernel memory nicely...
arch/x86/entry/entry_64.S +13 -0
@@ -176,13 +176,26 @@ GLOBAL(entry_SYSCALL_64_after_swapgs) pushq %r8 /* pt_regs->r8 */ pushq %r9 /* pt_regs->r9 */ pushq %r10 /* pt_regs->r10 */ + /* + * Clear extra registers that a speculation attack might + * otherwise want to exploit. Interleave XOR with PUSH + * for better uop scheduling: + */ + xorq %r10, %r10 /* nospec r10 */ pushq %r11 /* pt_regs->r11 */ + xorq %r11, %r11 /* nospec r11 */ pushq %rbx /* pt_regs->rbx */ + xorl %ebx, %ebx /* nospec rbx */ pushq %rbp /* pt_regs->rbp */ + xorl %ebp, %ebp /* nospec rbp */ pushq %r12 /* pt_regs->r12 */ + xorq %r12, %r12 /* nospec r12 */ pushq %r13 /* pt_regs->r13 */ + xorq %r13, %r13 /* nospec r13 */ pushq %r14 /* pt_regs->r14 */ + xorq %r14, %r14 /* nospec r14 */ pushq %r15 /* pt_regs->r15 */ + xorq %r15, %r15 /* nospec r15 */ /* IRQs are off. */ movq %rsp, %rdi
arch/x86/oprofile/nmi_int.c +1 -1
@@ -472,7 +472,7 @@ static int nmi_setup(void) goto fail;for_each_possible_cpu (cpu) { -if (!cpu) +if (!IS_ENABLED (CONFIG_SMP ) || !cpu)continue ; memcpy(per_cpu(cpu_msrs, cpu).counters,
arch/xtensa/mm/init.c +63 -7
82 lines not on this page · raw message
crypto/asymmetric_keys/pkcs7_verify.c +1 -1
@@ -261,7 +261,7 @@ static int pkcs7_verify_sig_chain(struct pkcs7_message *pkcs7, sinfo->index);return 0 ; } - ret =public_key_verify_signature (p->pub, p->sig); + ret =public_key_verify_signature (p->pub, x509->sig);if (ret <0 )return ret; x509->signer = p;
crypto/asymmetric_keys/public_key.c +3 -1
@@ -93,9 +93,11 @@ int public_key_verify_signature(const struct public_key *pkey,BUG_ON (!pkey);BUG_ON (!sig); -BUG_ON (!sig->digest);BUG_ON (!sig->s); +if (!sig->digest) +return -ENOPKG ; + alg_name = sig->pkey_algo;if (strcmp (sig->pkey_algo,"rsa" ) ==0 ) {/* The data wangled by the RSA algorithm is typically padded
crypto/asymmetric_keys/restrict.c +5 -2
@@ -66,8 +66,9 @@ __setup("ca_keys=", ca_keys_setup);* * Returns 0 if the new certificate was accepted, -ENOKEY if we couldn't find a * matching parent certificate in the trusted list, -EKEYREJECTED if the -* signature check fails or the key is blacklisted and some other error if -* there is a matching certificate but the signature check cannot be performed. +* signature check fails or the key is blacklisted, -ENOPKG if the signature +* uses unsupported crypto, or some other error if there is a matching +* certificate but the signature check cannot be performed. */ int restrict_link_by_signature(struct key *trust_keyring, const struct key_type *type,
@@ -86,6 +87,8 @@ int restrict_link_by_signature(struct key *trust_keyring,return -EOPNOTSUPP ; sig = payload->data[asym_auth]; +if (!sig) +return -ENOPKG ;if (!sig->auth_ids[0 ] && !sig->auth_ids[1 ])return -ENOKEY ;
drivers/android/binder.c +3 -1
@@ -2628,8 +2628,10 @@ static unsigned int binder_poll(struct file *filp,binder_lock (__func__); thread =binder_get_thread (proc); -if (!thread) +if (!thread) { +binder_unlock (__func__);return POLLERR ; + } wait_for_proc_work = thread->transaction_stack ==NULL &&list_empty (&thread->todo) && thread->return_error ==BR_OK ;
drivers/dax/dax.c +12 -0
@@ -453,9 +453,21 @@ static int dax_dev_pmd_fault(struct vm_area_struct *vma, unsigned long addr,return rc; } +static int dax_dev_split (struct vm_area_struct *vma,unsigned long addr) +{ +struct file *filp = vma->vm_file; +struct dax_dev *dax_dev = filp->private_data; +struct dax_region *dax_region = dax_dev->region; + +if (!IS_ALIGNED (addr, dax_region->align)) +return -EINVAL ; +return 0 ; +} +static const struct vm_operations_struct dax_dev_vm_ops = { .fault = dax_dev_fault, .pmd_fault = dax_dev_pmd_fault, + .split = dax_dev_split, };static int dax_mmap (struct file *filp,struct vm_area_struct *vma)
drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c +51 -7
94 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -2
@@ -1678,8 +1678,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,* ignore it */ vga_client_register (adev->pdev, adev,NULL , amdgpu_vga_set_decode); -if (amdgpu_runtime_pm ==1 ) - runtime = true;if (amdgpu_device_is_px (ddev)) runtime = true;vga_switcheroo_register_client (adev->pdev, &amdgpu_switcheroo_ops, runtime);
drivers/gpu/drm/amd/amdgpu/si_dpm.c +5 -0
@@ -3507,6 +3507,11 @@ static void si_apply_state_adjust_rules(struct amdgpu_device *adev, max_sclk =75000 ; max_mclk =80000 ; } +if ((adev->pdev->revision ==0xC3 ) || + (adev->pdev->device ==0x6665 )) { + max_sclk =60000 ; + max_mclk =80000 ; + } }else if (adev->asic_type ==CHIP_OLAND ) { if ((adev->pdev->revision == 0xC7) || (adev->pdev->revision == 0x80) ||
drivers/gpu/drm/drm_edid.c +3 -0
@@ -107,6 +107,9 @@ static const struct edid_quirk {/* AEO model 0 reports 8 bpc, but is a 6 bpc panel */ { "AEO", 0, EDID_QUIRK_FORCE_6BPC }, +/* CPT panel of Asus UX303LA reports 8 bpc, but is a 6 bpc panel */ + { "CPT", 0x17df, EDID_QUIRK_FORCE_6BPC }, +/* Belinea 10 15 55 */ { "MAX", 1516, EDID_QUIRK_PREFER_LARGE_60 }, { "MAX", 0x77e, EDID_QUIRK_PREFER_LARGE_60 },
drivers/hid/hid-core.c +3 -0
@@ -2443,6 +2443,9 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYTIME) }, { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYTEMPERATURE) }, { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYPH) }, + { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POWERANALYSERCASSY) }, + { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CONVERTERCONTROLLERCASSY) }, + { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MACHINETESTCASSY) }, { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_JWM) }, { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_DMMP) }, { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_UMIP) },
drivers/hid/hid-ids.h +3 -0
@@ -608,6 +608,9 @@#define USB_DEVICE_ID_LD_MICROCASSYTIME 0x1033#define USB_DEVICE_ID_LD_MICROCASSYTEMPERATURE 0x1035#define USB_DEVICE_ID_LD_MICROCASSYPH 0x1038 +#define USB_DEVICE_ID_LD_POWERANALYSERCASSY 0x1040 +#define USB_DEVICE_ID_LD_CONVERTERCONTROLLERCASSY 0x1042 +#define USB_DEVICE_ID_LD_MACHINETESTCASSY 0x1043#define USB_DEVICE_ID_LD_JWM 0x1080#define USB_DEVICE_ID_LD_DMMP 0x1081#define USB_DEVICE_ID_LD_UMIP 0x1090
drivers/iio/imu/adis_trigger.c +4 -3
@@ -47,6 +47,10 @@ int adis_probe_trigger(struct adis *adis, struct iio_dev *indio_dev)if (adis->trig ==NULL )return -ENOMEM ; + adis->trig->dev.parent = &adis->spi->dev; + adis->trig->ops = &adis_trigger_ops; +iio_trigger_set_drvdata (adis->trig, adis); + ret = request_irq(adis->spi->irq, &iio_trigger_generic_data_rdy_poll, IRQF_TRIGGER_RISING,
@@ -55,9 +59,6 @@ int adis_probe_trigger(struct adis *adis, struct iio_dev *indio_dev)if (ret) goto error_free_trig; - adis->trig->dev.parent = &adis->spi->dev; - adis->trig->ops = &adis_trigger_ops; -iio_trigger_set_drvdata (adis->trig, adis); ret =iio_trigger_register (adis->trig); indio_dev->trig =iio_trigger_get (adis->trig);
drivers/iio/industrialio-buffer.c +1 -1
@@ -174,7 +174,7 @@ unsigned int iio_buffer_poll(struct file *filp,struct iio_dev *indio_dev = filp->private_data;struct iio_buffer *rb = indio_dev->buffer; -if (!indio_dev->info) +if (!indio_dev->info || rb ==NULL )return 0 ;poll_wait (filp, &rb->pollq, wait);
drivers/infiniband/core/umem.c +1 -1
@@ -193,7 +193,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr, sg_list_start = umem->sg_head.sgl;while (npages) { - ret =get_user_pages (cur_base, + ret =get_user_pages_longterm (cur_base, min_t(unsigned long, npages,PAGE_SIZE /sizeof (struct page *)), gup_flags, page_list, vma_list);
drivers/infiniband/core/uverbs_main.c +20 -7
@@ -735,12 +735,21 @@ static int verify_command_mask(struct ib_device *ib_dev, __u32 command)return -1 ; } +static bool verify_command_idx (u32 command,bool extended) +{ +if (extended) +return command <ARRAY_SIZE (uverbs_ex_cmd_table); + +return command <ARRAY_SIZE (uverbs_cmd_table); +} +static ssize_t ib_uverbs_write (struct file *filp,const char __user *buf,size_t count,loff_t *pos) {struct ib_uverbs_file *file = filp->private_data;struct ib_device *ib_dev;struct ib_uverbs_cmd_hdr hdr; +bool extended_command;__u32 command;__u32 flags;int srcu_key;
@@ -770,6 +779,15 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf, } command = hdr.command &IB_USER_VERBS_CMD_COMMAND_MASK ; + flags = (hdr.command & +IB_USER_VERBS_CMD_FLAGS_MASK ) >>IB_USER_VERBS_CMD_FLAGS_SHIFT ; + + extended_command = flags &IB_USER_VERBS_CMD_FLAG_EXTENDED ; +if (!verify_command_idx (command, extended_command)) { + ret = -EINVAL ; + goto out; + } +if (verify_command_mask (ib_dev, command)) { ret = -EOPNOTSUPP ; goto out;
@@ -781,12 +799,8 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf, goto out; } - flags = (hdr.command & -IB_USER_VERBS_CMD_FLAGS_MASK ) >>IB_USER_VERBS_CMD_FLAGS_SHIFT ; -if (!flags) { -if (command >=ARRAY_SIZE (uverbs_cmd_table) || - !uverbs_cmd_table[command]) { +if (!uverbs_cmd_table[command]) { ret = -EINVAL ; goto out; }
@@ -807,8 +821,7 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf,struct ib_udata uhw;size_t written_count = count; -if (command >=ARRAY_SIZE (uverbs_ex_cmd_table) || - !uverbs_ex_cmd_table[command]) { +if (!uverbs_ex_cmd_table[command]) { ret = -ENOSYS ; goto out; }
drivers/irqchip/irq-gic-v3.c +1 -1
@@ -616,7 +616,7 @@ static void gic_raise_softirq(const struct cpumask *mask, unsigned int irq)* Ensure that stores to Normal memory are visible to the * other CPUs before issuing the IPI. */ -smp_wmb (); +wmb ();for_each_cpu (cpu, mask) {unsigned long cluster_id =cpu_logical_map (cpu) & ~0xffUL ;
drivers/media/v4l2-core/videobuf-dma-sg.c +3 -2
@@ -185,12 +185,13 @@ static int videobuf_dma_init_user_locked(struct videobuf_dmabuf *dma,dprintk (1 ,"init user [0x%lx+0x%lx => %d pages]\n" , data, size, dma->nr_pages); - err =get_user_pages (data &PAGE_MASK , dma->nr_pages, + err =get_user_pages_longterm (data &PAGE_MASK , dma->nr_pages, flags, dma->pages,NULL );if (err != dma->nr_pages) { dma->nr_pages = (err >=0 ) ? err :0 ; -dprintk (1 ,"get_user_pages: err=%d [%d]\n" , err, dma->nr_pages); +dprintk (1 ,"get_user_pages_longterm: err=%d [%d]\n" , err, + dma->nr_pages);return err <0 ? err : -EINVAL ; }return 0 ;
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +0 -10
@@ -2596,7 +2596,6 @@ void t4_get_regs(struct adapter *adap, void *buf, size_t buf_size) }#define EEPROM_STAT_ADDR 0x7bfc -#define VPD_SIZE 0x800#define VPD_BASE 0x400#define VPD_BASE_OLD 0#define VPD_LEN 1024
@@ -2634,15 +2633,6 @@ int t4_get_raw_vpd_params(struct adapter *adapter, struct vpd_params *p)if (!vpd)return -ENOMEM ; -/* We have two VPD data structures stored in the adapter VPD area. -* By default, Linux calculates the size of the VPD area by traversing -* the first VPD area at offset 0x0, so we need to tell the OS what -* our real VPD size is. -*/ - ret =pci_set_vpd_size (adapter->pdev,VPD_SIZE ); -if (ret <0 ) - goto out; -/* Card information normally starts at VPD_BASE but early cards had * it at 0. */
drivers/nvdimm/bus.c +6 -5
@@ -812,16 +812,17 @@ static int __nd_ioctl(struct nvdimm_bus *nvdimm_bus, struct nvdimm *nvdimm, int read_only, unsigned int ioctl_cmd, unsigned long arg) { struct nvdimm_bus_descriptor *nd_desc = nvdimm_bus->nd_desc; -size_t buf_len =0 , in_len =0 , out_len =0 ;static char out_env[ND_CMD_MAX_ENVELOPE ];static char in_env[ND_CMD_MAX_ENVELOPE ];const struct nd_cmd_desc *desc =NULL ;unsigned int cmd =_IOC_NR (ioctl_cmd);void __user *p = (void __user *) arg;struct device *dev = &nvdimm_bus->dev; -struct nd_cmd_pkg pkg;const char *cmd_name, *dimm_name; +u32 in_len =0 , out_len =0 ;unsigned long cmd_mask; +struct nd_cmd_pkg pkg; +u64 buf_len =0 ;void *buf;int rc, i;
@@ -882,7 +883,7 @@ static int __nd_ioctl(struct nvdimm_bus *nvdimm_bus, struct nvdimm *nvdimm, }if (cmd ==ND_CMD_CALL ) { -dev_dbg (dev,"%s:%s, idx: %llu, in: %zu, out: %zu, len %zu\n" , +dev_dbg (dev,"%s:%s, idx: %llu, in: %u, out: %u, len %llu\n" , __func__, dimm_name, pkg.nd_command, in_len, out_len, buf_len);
@@ -912,9 +913,9 @@ static int __nd_ioctl(struct nvdimm_bus *nvdimm_bus, struct nvdimm *nvdimm, out_len += out_size; } - buf_len = out_len + in_len; + buf_len = (u64 ) out_len + (u64 ) in_len;if (buf_len >ND_IOCTL_MAX_BUFLEN ) { -dev_dbg (dev,"%s:%s cmd: %s buf_len: %zu > %d\n" , __func__, +dev_dbg (dev,"%s:%s cmd: %s buf_len: %llu > %d\n" , __func__, dimm_name, cmd_name, buf_len,ND_IOCTL_MAX_BUFLEN );return -EINVAL ;
drivers/nvdimm/pfn_devs.c +12 -3
@@ -563,6 +563,12 @@ static struct vmem_altmap *__nvdimm_setup_pfn(struct nd_pfn *nd_pfn,return altmap; } +static u64 phys_pmem_align_down (struct nd_pfn *nd_pfn,u64 phys) +{ +return min_t (u64,PHYS_SECTION_ALIGN_DOWN (phys), +ALIGN_DOWN (phys, nd_pfn->align)); +} +static int nd_pfn_init (struct nd_pfn *nd_pfn) {u32 dax_label_reserve =is_nd_dax (&nd_pfn->dev) ?SZ_128K :0 ;
@@ -618,13 +624,16 @@ static int nd_pfn_init(struct nd_pfn *nd_pfn) start = nsio->res.start; size =PHYS_SECTION_ALIGN_UP (start + size) - start;if (region_intersects (start, size,IORESOURCE_SYSTEM_RAM , -IORES_DESC_NONE ) ==REGION_MIXED ) { +IORES_DESC_NONE ) ==REGION_MIXED + || !IS_ALIGNED (start +resource_size (&nsio->res), + nd_pfn->align)) { size =resource_size (&nsio->res); - end_trunc = start + size -PHYS_SECTION_ALIGN_DOWN (start + size); + end_trunc = start + size -phys_pmem_align_down (nd_pfn, + start + size); }if (start_pad + end_trunc) -dev_info (&nd_pfn->dev,"%s section collision, truncate %d bytes\n" , +dev_info (&nd_pfn->dev,"%s alignment collision, truncate %d bytes\n" ,dev_name (&ndns->dev), start_pad + end_trunc);/*
drivers/pci/quirks.c +23 -16
@@ -3369,22 +3369,29 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PORT_RIDGE,static void quirk_chelsio_extend_vpd (struct pci_dev *dev) { -pci_set_vpd_size (dev,8192 ); -} - -DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_CHELSIO ,0x20 , quirk_chelsio_extend_vpd); -DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_CHELSIO ,0x21 , quirk_chelsio_extend_vpd); -DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_CHELSIO ,0x22 , quirk_chelsio_extend_vpd); -DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_CHELSIO ,0x23 , quirk_chelsio_extend_vpd); -DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_CHELSIO ,0x24 , quirk_chelsio_extend_vpd); -DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_CHELSIO ,0x25 , quirk_chelsio_extend_vpd); -DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_CHELSIO ,0x26 , quirk_chelsio_extend_vpd); -DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_CHELSIO ,0x30 , quirk_chelsio_extend_vpd); -DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_CHELSIO ,0x31 , quirk_chelsio_extend_vpd); -DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_CHELSIO ,0x32 , quirk_chelsio_extend_vpd); -DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_CHELSIO ,0x35 , quirk_chelsio_extend_vpd); -DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_CHELSIO ,0x36 , quirk_chelsio_extend_vpd); -DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_CHELSIO ,0x37 , quirk_chelsio_extend_vpd); +int chip = (dev->device &0xf000 ) >>12 ; +int func = (dev->device &0x0f00 ) >>8 ; +int prod = (dev->device &0x00ff ) >>0 ; + +/* +* If this is a T3-based adapter, there's a 1KB VPD area at offset +* 0xc00 which contains the preferred VPD values. If this is a T4 or +* later based adapter, the special VPD is at offset 0x400 for the +* Physical Functions (the SR-IOV Virtual Functions have no VPD +* Capabilities). The PCI VPD Access core routines will normally +* compute the size of the VPD by parsing the VPD Data Structure at +* offset 0x000. This will result in silent failures when attempting +* to accesses these other VPD areas which are beyond those computed +* limits. +*/ +if (chip ==0x0 && prod >=0x20 ) +pci_set_vpd_size (dev,8192 ); +else if (chip >=0x4 && func <0x8 ) +pci_set_vpd_size (dev,2048 ); +} + +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_CHELSIO ,PCI_ANY_ID , + quirk_chelsio_extend_vpd);#ifdef CONFIG_ACPI /*
drivers/scsi/ibmvscsi/ibmvfc.h +1 -1
@@ -367,7 +367,7 @@ enum ibmvfc_fcp_rsp_info_codes { };struct ibmvfc_fcp_rsp_info { -__be16 reserved; +u8 reserved[3 ];u8 rsp_code;u8 reserved2[4 ]; }__attribute__((packed,aligned (2 )));
drivers/usb/core/quirks.c +3 -0
@@ -225,6 +225,9 @@ static const struct usb_device_id usb_quirk_list[] = { { USB_DEVICE(0x1a0a, 0x0200), .driver_info = USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL }, + /* Corsair K70 RGB */ + { USB_DEVICE(0x1b1c, 0x1b13), .driver_info = USB_QUIRK_DELAY_INIT }, + /* Corsair Strafe RGB */ { USB_DEVICE(0x1b1c, 0x1b20), .driver_info = USB_QUIRK_DELAY_INIT },
drivers/usb/dwc3/gadget.c +2 -0
@@ -2528,6 +2528,8 @@ static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc)break ; } + dwc->eps[1 ]->endpoint.maxpacket = dwc->gadget.ep0->maxpacket; +/* Enable USB2 LPM Capability */ if ((dwc->revision > DWC3_REVISION_194A) &&
drivers/usb/gadget/function/f_fs.c +2 -4
@@ -2956,10 +2956,8 @@ static int _ffs_func_bind(struct usb_configuration *c,struct ffs_data *ffs = func->ffs;const int full = !!func->ffs->fs_descs_count; -const int high =gadget_is_dualspeed (func->gadget) && - func->ffs->hs_descs_count; -const int super =gadget_is_superspeed (func->gadget) && - func->ffs->ss_descs_count; +const int high = !!func->ffs->hs_descs_count; +const int super = !!func->ffs->ss_descs_count;int fs_len, hs_len, ss_len, ret, i;struct ffs_ep *eps_ptr;
drivers/usb/host/ohci-hcd.c +7 -3
@@ -73,6 +73,7 @@ static const char hcd_name [] = "ohci_hcd";#define STATECHANGE_DELAY msecs_to_jiffies(300)#define IO_WATCHDOG_DELAY msecs_to_jiffies(275) +#define IO_WATCHDOG_OFF 0xffffff00#include "ohci.h" #include "pci-quirks.h"
@@ -230,7 +231,7 @@ static int ohci_urb_enqueue ( }/* Start up the I/O watchdog timer, if it's not running */ -if (!timer_pending (&ohci->io_watchdog) && +if (ohci->prev_frame_no ==IO_WATCHDOG_OFF &&list_empty (&ohci->eds_in_use) && !(ohci->flags &OHCI_QUIRK_QEMU )) { ohci->prev_frame_no =ohci_frame_no (ohci);
@@ -501,6 +502,7 @@ static int ohci_init (struct ohci_hcd *ohci)setup_timer (&ohci->io_watchdog, io_watchdog_func, (unsigned long ) ohci); + ohci->prev_frame_no =IO_WATCHDOG_OFF ; ohci->hcca =dma_alloc_coherent (hcd->self.controller,sizeof (*ohci->hcca), &ohci->hcca_dma,GFP_KERNEL );
@@ -730,7 +732,7 @@ static void io_watchdog_func(unsigned long _ohci)u32 head;struct ed *ed;struct td *td, *td_start, *td_next; -unsigned frame_no; +unsigned frame_no, prev_frame_no =IO_WATCHDOG_OFF ;unsigned long flags;spin_lock_irqsave (&ohci->lock, flags);
@@ -835,7 +837,7 @@ static void io_watchdog_func(unsigned long _ohci) } }if (!list_empty (&ohci->eds_in_use)) { - ohci->prev_frame_no = frame_no; + prev_frame_no = frame_no; ohci->prev_wdh_cnt = ohci->wdh_cnt; ohci->prev_donehead =ohci_readl (ohci, &ohci->regs->donehead);
@@ -845,6 +847,7 @@ static void io_watchdog_func(unsigned long _ohci) } done: + ohci->prev_frame_no = prev_frame_no;spin_unlock_irqrestore (&ohci->lock, flags); }
@@ -973,6 +976,7 @@ static void ohci_stop (struct usb_hcd *hcd)if (quirk_nec (ohci))flush_work (&ohci->nec_work);del_timer_sync (&ohci->io_watchdog); + ohci->prev_frame_no =IO_WATCHDOG_OFF ;ohci_writel (ohci,OHCI_INTR_MIE , &ohci->regs->intrdisable);ohci_usb_reset (ohci);
drivers/usb/host/ohci-hub.c +3 -1
@@ -310,8 +310,10 @@ static int ohci_bus_suspend (struct usb_hcd *hcd) rc =ohci_rh_suspend (ohci,0 );spin_unlock_irq (&ohci->lock); -if (rc ==0 ) +if (rc ==0 ) {del_timer_sync (&ohci->io_watchdog); + ohci->prev_frame_no =IO_WATCHDOG_OFF ; + }return rc; }
drivers/usb/host/ohci-q.c +10 -7
@@ -1018,6 +1018,8 @@ static void finish_unlinks(struct ohci_hcd *ohci)* have modified this list. normally it's just prepending * entries (which we'd ignore), but paranoia won't hurt. */ + *last = ed->ed_next; + ed->ed_next =NULL ; modified =0 ;/* unlink urbs as requested, but rescan the list after
@@ -1076,21 +1078,22 @@ static void finish_unlinks(struct ohci_hcd *ohci) goto rescan_this;/* -* If no TDs are queued, take ED off the ed_rm_list. +* If no TDs are queued, ED is now idle. * Otherwise, if the HC is running, reschedule. -* If not, leave it on the list for further dequeues. +* If the HC isn't running, add ED back to the +* start of the list for later processing. */ if (list_empty (&ed->td_list)) { - *last = ed->ed_next; - ed->ed_next =NULL ; ed->state =ED_IDLE ;list_del (&ed->in_use_list); }else if (ohci->rh_state ==OHCI_RH_RUNNING ) { - *last = ed->ed_next; - ed->ed_next =NULL ;ed_schedule (ohci, ed); }else { - last = &ed->ed_next; + ed->ed_next = ohci->ed_rm_list; + ohci->ed_rm_list = ed; +/* Don't loop on the same ED */ +if (last == &ohci->ed_rm_list) + last = &ed->ed_next; }if (modified)
drivers/usb/misc/ldusb.c +6 -0
@@ -46,6 +46,9 @@#define USB_DEVICE_ID_LD_MICROCASSYTIME 0x1033/* USB Product ID of Micro-CASSY Time (reserved) */ #define USB_DEVICE_ID_LD_MICROCASSYTEMPERATURE 0x1035/* USB Product ID of Micro-CASSY Temperature */ #define USB_DEVICE_ID_LD_MICROCASSYPH 0x1038/* USB Product ID of Micro-CASSY pH */ +#define USB_DEVICE_ID_LD_POWERANALYSERCASSY 0x1040/* USB Product ID of Power Analyser CASSY */ +#define USB_DEVICE_ID_LD_CONVERTERCONTROLLERCASSY 0x1042/* USB Product ID of Converter Controller CASSY */ +#define USB_DEVICE_ID_LD_MACHINETESTCASSY 0x1043/* USB Product ID of Machine Test CASSY */ #define USB_DEVICE_ID_LD_JWM 0x1080/* USB Product ID of Joule and Wattmeter */ #define USB_DEVICE_ID_LD_DMMP 0x1081/* USB Product ID of Digital Multimeter P (reserved) */ #define USB_DEVICE_ID_LD_UMIP 0x1090/* USB Product ID of UMI P */
@@ -88,6 +91,9 @@ static const struct usb_device_id ld_usb_table[] = { { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYTIME) }, { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYTEMPERATURE) }, { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYPH) }, + { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POWERANALYSERCASSY) }, + { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CONVERTERCONTROLLERCASSY) }, + { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MACHINETESTCASSY) }, { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_JWM) }, { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_DMMP) }, { USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_UMIP) },
drivers/usb/musb/musb_host.c +1 -7
@@ -418,13 +418,7 @@ static void musb_advance_schedule(struct musb *musb, struct urb *urb, } } -/* -* The pipe must be broken if current urb->status is set, so don't -* start next urb. -* TODO: to minimize the risk of regression, only check urb->status -* for RX, until we have a test case to understand the behavior of TX. -*/ -if ((!status || !is_in) && qh && qh->is_ready) { +if (qh !=NULL && qh->is_ready) {musb_dbg (musb,"... next ep%d %cX urb %p" , hw_ep->epnum, is_in ?'R' :'T' ,next_urb (qh));musb_start_urb (musb, is_in, qh);
drivers/usb/renesas_usbhs/fifo.c +5 -0
@@ -1001,6 +1001,10 @@ static int usbhsf_dma_prepare_pop_with_usb_dmac(struct usbhs_pkt *pkt,if ((uintptr_t )pkt->buf & (USBHS_USB_DMAC_XFER_SIZE -1 )) goto usbhsf_pio_prepare_pop; +/* return at this time if the pipe is running */ +if (usbhs_pipe_is_running (pipe)) +return 0 ; +usbhs_pipe_config_change_bfre (pipe,1 ); ret =usbhsf_fifo_select (pipe, fifo,0 );
@@ -1191,6 +1195,7 @@ static int usbhsf_dma_pop_done_with_usb_dmac(struct usbhs_pkt *pkt,usbhsf_fifo_clear (pipe, fifo); pkt->actual =usbhs_dma_calc_received_size (pkt, chan, rcv_len); +usbhs_pipe_running (pipe,0 );usbhsf_dma_stop (pipe, fifo);usbhsf_dma_unmap (pkt);usbhsf_fifo_unselect (pipe, pipe->fifo);
fs/dax.c +1 -0
@@ -785,6 +785,7 @@ int dax_writeback_mapping_range(struct address_space *mapping,if (ret <0 )return ret; } + start_index = indices[pvec.nr -1 ] +1 ; }return 0 ; }
include/linux/dax.h +0 -5
@@ -61,11 +61,6 @@ static inline int dax_pmd_fault(struct vm_area_struct *vma, unsigned long addr,int dax_pfn_mkwrite (struct vm_area_struct *,struct vm_fault *);#define dax_mkwrite (vma, vmf, gb) dax_fault(vma, vmf, gb) -static inline bool vma_is_dax (struct vm_area_struct *vma) -{ -return vma->vm_file &&IS_DAX (vma->vm_file->f_mapping->host); -} -static inline bool dax_mapping (struct address_space *mapping) {return mapping->host &&IS_DAX (mapping->host);
include/linux/fs.h +20 -0
@@ -18,6 +18,7 @@#include <linux/bug.h> #include <linux/mutex.h> #include <linux/rwsem.h> +#include <linux/mm_types.h> #include <linux/capability.h> #include <linux/semaphore.h> #include <linux/fiemap.h>
@@ -3033,6 +3034,25 @@ static inline bool io_is_direct(struct file *filp)return (filp->f_flags &O_DIRECT ) ||IS_DAX (filp->f_mapping->host); } +static inline bool vma_is_dax (struct vm_area_struct *vma) +{ +return vma->vm_file &&IS_DAX (vma->vm_file->f_mapping->host); +} + +static inline bool vma_is_fsdax (struct vm_area_struct *vma) +{ +struct inode *inode; + +if (!vma->vm_file) +return false; +if (!vma_is_dax (vma)) +return false; + inode =file_inode (vma->vm_file); +if (inode->i_mode ==S_IFCHR ) +return false;/* device-dax */ +return true; +} +static inline int iocb_flags (struct file *file) {int res =0 ;
include/linux/kernel.h +1 -0
@@ -46,6 +46,7 @@#define REPEAT_BYTE (x) ((~0ul / 0xff) * (x))#define ALIGN (x, a) __ALIGN_KERNEL((x), (a)) +#define ALIGN_DOWN (x, a) __ALIGN_KERNEL((x) - ((a) - 1), (a))#define __ALIGN_MASK (x, mask) __ALIGN_KERNEL_MASK((x), (mask))#define PTR_ALIGN (p, a) ((typeof(p))ALIGN((unsigned long)(p), (a)))#define IS_ALIGNED (x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
include/linux/mm.h +13 -0
@@ -1288,6 +1288,19 @@ long __get_user_pages_unlocked(struct task_struct *tsk, struct mm_struct *mm, struct page **pages, unsigned int gup_flags);long get_user_pages_unlocked (unsigned long start,unsigned long nr_pages,struct page **pages,unsigned int gup_flags); +#ifdef CONFIG_FS_DAX +long get_user_pages_longterm (unsigned long start,unsigned long nr_pages, +unsigned int gup_flags,struct page **pages, +struct vm_area_struct **vmas); +#else +static inline long get_user_pages_longterm (unsigned long start, +unsigned long nr_pages,unsigned int gup_flags, +struct page **pages,struct vm_area_struct **vmas) +{ +return get_user_pages (start, nr_pages, gup_flags, pages, vmas); +} +#endif /* CONFIG_FS_DAX */ +int get_user_pages_fast (unsigned long start,int nr_pages,int write,struct page **pages);
kernel/memremap.c +8 -5
@@ -194,7 +194,7 @@ void put_zone_device_page(struct page *page) }EXPORT_SYMBOL (put_zone_device_page); -static void pgmap_radix_release (struct resource *res) +static void pgmap_radix_release (struct resource *res,resource_size_t end_key) {resource_size_t key, align_start, align_size, align_end;
@@ -203,8 +203,11 @@ static void pgmap_radix_release(struct resource *res) align_end = align_start + align_size -1 ;mutex_lock (&pgmap_lock); -for (key = res->start; key <= res->end; key +=SECTION_SIZE ) +for (key = res->start; key <= res->end; key +=SECTION_SIZE ) { +if (key >= end_key) +break ;radix_tree_delete (&pgmap_radix, key >>PA_SECTION_SHIFT ); + }mutex_unlock (&pgmap_lock); }
@@ -255,7 +258,7 @@ static void devm_memremap_pages_release(struct device *dev, void *data)unlock_device_hotplug ();untrack_pfn (NULL ,PHYS_PFN (align_start), align_size); -pgmap_radix_release (res); +pgmap_radix_release (res,-1 );dev_WARN_ONCE (dev, pgmap->altmap && pgmap->altmap->alloc,"%s: failed to free all reserved pages\n" , __func__); }
@@ -289,7 +292,7 @@ struct dev_pagemap *find_dev_pagemap(resource_size_t phys)void *devm_memremap_pages (struct device *dev,struct resource *res,struct percpu_ref *ref,struct vmem_altmap *altmap) { -resource_size_t key, align_start, align_size, align_end; +resource_size_t key =0 , align_start, align_size, align_end;pgprot_t pgprot =PAGE_KERNEL ;struct dev_pagemap *pgmap;struct page_map *page_map;
@@ -392,7 +395,7 @@ void *devm_memremap_pages(struct device *dev, struct resource *res,untrack_pfn (NULL ,PHYS_PFN (align_start), align_size); err_pfn_remap: err_radix: -pgmap_radix_release (res); +pgmap_radix_release (res, key);devres_free (page_map);return ERR_PTR (error); }
mm/frame_vector.c +12 -0
@@ -52,6 +52,18 @@ int get_vaddr_frames(unsigned long start, unsigned int nr_frames, ret = -EFAULT ; goto out; } + +/* +* While get_vaddr_frames() could be used for transient (kernel +* controlled lifetime) pinning of memory pages all current +* users establish long term (userspace controlled lifetime) +* page pinning. Treat get_vaddr_frames() like +* get_user_pages_longterm() and disallow it for filesystem-dax +* mappings. +*/ +if (vma_is_fsdax (vma)) +return -EOPNOTSUPP ; +if (!(vma->vm_flags & (VM_IO |VM_PFNMAP ))) { vec->got_ref = true; vec->is_pfns = false;
mm/gup.c +64 -0
70 lines not on this page · raw message
mm/memory.c +30 -10
@@ -2848,6 +2848,17 @@ static int __do_fault(struct fault_env *fe, pgoff_t pgoff,return ret; } +/* +* The ordering of these checks is important for pmds with _PAGE_DEVMAP set. +* If we check pmd_trans_unstable() first we will trip the bad_pmd() check +* inside of pmd_none_or_trans_huge_or_clear_bad(). This will end up correctly +* returning 1 but not before it spams dmesg with the pmd_clear_bad() output. +*/ +static int pmd_devmap_trans_unstable (pmd_t *pmd) +{ +return pmd_devmap (*pmd) ||pmd_trans_unstable (pmd); +} +static int pte_alloc_one_map (struct fault_env *fe) {struct vm_area_struct *vma = fe->vma;
@@ -2871,18 +2882,27 @@ static int pte_alloc_one_map(struct fault_env *fe) map_pte:/* * If a huge pmd materialized under us just retry later. Use -* pmd_trans_unstable() instead of pmd_trans_huge() to ensure the pmd -* didn't become pmd_trans_huge under us and then back to pmd_none, as -* a result of MADV_DONTNEED running immediately after a huge pmd fault -* in a different thread of this mm, in turn leading to a misleading -* pmd_trans_huge() retval. All we have to ensure is that it is a -* regular pmd that we can walk with pte_offset_map() and we can do that -* through an atomic read in C, which is what pmd_trans_unstable() -* provides. +* pmd_trans_unstable() via pmd_devmap_trans_unstable() instead of +* pmd_trans_huge() to ensure the pmd didn't become pmd_trans_huge +* under us and then back to pmd_none, as a result of MADV_DONTNEED +* running immediately after a huge pmd fault in a different thread of +* this mm, in turn leading to a misleading pmd_trans_huge() retval. +* All we have to ensure is that it is a regular pmd that we can walk +* with pte_offset_map() and we can do that through an atomic read in +* C, which is what pmd_trans_unstable() provides. */ -if (pmd_trans_unstable (fe->pmd) ||pmd_devmap (*fe->pmd)) +if (pmd_devmap_trans_unstable (fe->pmd))return VM_FAULT_NOPAGE ; +/* +* At this point we know that our vmf->pmd points to a page of ptes +* and it cannot become pmd_none(), pmd_devmap() or pmd_trans_huge() +* for the duration of the fault. If a racing MADV_DONTNEED runs and +* we zap the ptes pointed to by our vmf->pmd, the vmf->ptl will still +* be valid and we will re-check to make sure the vmf->pte isn't +* pte_none() under vmf->ptl protection when we return to +* alloc_set_pte(). +*/ fe->pte =pte_offset_map_lock (vma->vm_mm, fe->pmd, fe->address, &fe->ptl);return 0 ;
@@ -3456,7 +3476,7 @@ static int handle_pte_fault(struct fault_env *fe) fe->pte =NULL ; }else {/* See comment in pte_alloc_one_map() */ -if (pmd_trans_unstable (fe->pmd) ||pmd_devmap (*fe->pmd)) +if (pmd_devmap_trans_unstable (fe->pmd))return 0 ;/* * A regular pmd is established and it can't morph into a huge
net/ipv4/ip_sockglue.c +1 -6
@@ -1552,10 +1552,7 @@ int ip_getsockopt(struct sock *sk, int level,if (get_user (len, optlen))return -EFAULT ; -lock_sock (sk); - err =nf_getsockopt (sk,PF_INET , optname, optval, - &len); -release_sock (sk); + err =nf_getsockopt (sk,PF_INET , optname, optval, &len);if (err >=0 ) err =put_user (len, optlen);return err;
@@ -1587,9 +1584,7 @@ int compat_ip_getsockopt(struct sock *sk, int level, int optname,if (get_user (len, optlen))return -EFAULT ; -lock_sock (sk); err =compat_nf_getsockopt (sk,PF_INET , optname, optval, &len); -release_sock (sk);if (err >=0 ) err =put_user (len, optlen);return err;
net/ipv6/ipv6_sockglue.c +2 -8
@@ -1343,10 +1343,7 @@ int ipv6_getsockopt(struct sock *sk, int level, int optname,if (get_user (len, optlen))return -EFAULT ; -lock_sock (sk); - err =nf_getsockopt (sk,PF_INET6 , optname, optval, - &len); -release_sock (sk); + err =nf_getsockopt (sk,PF_INET6 , optname, optval, &len);if (err >=0 ) err =put_user (len, optlen); }
@@ -1385,10 +1382,7 @@ int compat_ipv6_getsockopt(struct sock *sk, int level, int optname,if (get_user (len, optlen))return -EFAULT ; -lock_sock (sk); - err =compat_nf_getsockopt (sk,PF_INET6 , - optname, optval, &len); -release_sock (sk); + err =compat_nf_getsockopt (sk,PF_INET6 , optname, optval, &len);if (err >=0 ) err =put_user (len, optlen); }
net/mac80211/cfg.c +1 -1
@@ -2792,7 +2792,7 @@ cfg80211_beacon_dup(struct cfg80211_beacon_data *beacon) }if (beacon->probe_resp_len) { new_beacon->probe_resp_len = beacon->probe_resp_len; - beacon->probe_resp = pos; + new_beacon->probe_resp = pos;memcpy (pos, beacon->probe_resp, beacon->probe_resp_len); pos += beacon->probe_resp_len; }