OSDN Git Service

Merge 4.4.191 into android-4.4
authorGreg Kroah-Hartman <gregkh@google.com>
Fri, 6 Sep 2019 10:33:41 +0000 (12:33 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 6 Sep 2019 10:33:41 +0000 (12:33 +0200)
Changes in 4.4.191
HID: Add 044f:b320 ThrustMaster, Inc. 2 in 1 DT
MIPS: kernel: only use i8253 clocksource with periodic clockevent
netfilter: ebtables: fix a memory leak bug in compat
bonding: Force slave speed check after link state recovery for 802.3ad
can: dev: call netif_carrier_off() in register_candev()
st21nfca_connectivity_event_received: null check the allocation
st_nci_hci_connectivity_event_received: null check the allocation
ASoC: ti: davinci-mcasp: Correct slot_width posed constraint
net: usb: qmi_wwan: Add the BroadMobi BM818 card
isdn: mISDN: hfcsusb: Fix possible null-pointer dereferences in start_isoc_chain()
isdn: hfcsusb: Fix mISDN driver crash caused by transfer buffer on the stack
perf bench numa: Fix cpu0 binding
can: sja1000: force the string buffer NULL-terminated
can: peak_usb: force the string buffer NULL-terminated
NFSv4: Fix a potential sleep while atomic in nfs4_do_reclaim()
net: cxgb3_main: Fix a resource leak in a error path in 'init_one()'
net: hisilicon: make hip04_tx_reclaim non-reentrant
net: hisilicon: fix hip04-xmit never return TX_BUSY
net: hisilicon: Fix dma_map_single failed on arm64
libata: add SG safety checks in SFF pio transfers
selftests: kvm: Adding config fragments
HID: wacom: correct misreported EKR ring values
Revert "dm bufio: fix deadlock with loop device"
userfaultfd_release: always remove uffd flags and clear vm_userfaultfd_ctx
x86/retpoline: Don't clobber RFLAGS during CALL_NOSPEC on i386
x86/apic: Handle missing global clockevent gracefully
x86/boot: Save fields explicitly, zero out everything else
x86/boot: Fix boot regression caused by bootparam sanitizing
dm btree: fix order of block initialization in btree_split_beneath
dm space map metadata: fix missing store of apply_bops() return value
dm table: fix invalid memory accesses with too high sector number
cgroup: Disable IRQs while holding css_set_lock
GFS2: don't set rgrp gl_object until it's inserted into rgrp tree
net: arc_emac: fix koops caused by sk_buff free
vhost-net: set packet weight of tx polling to 2 * vq size
vhost_net: use packet weight for rx handler, too
vhost_net: introduce vhost_exceeds_weight()
vhost: introduce vhost_exceeds_weight()
vhost_net: fix possible infinite loop
vhost: scsi: add weight support
siphash: add cryptographically secure PRF
siphash: implement HalfSipHash1-3 for hash tables
inet: switch IP ID generator to siphash
netfilter: ctnetlink: don't use conntrack/expect object addresses as id
netfilter: conntrack: Use consistent ct id hash calculation
Revert "perf test 6: Fix missing kvm module load for s390"
x86/pm: Introduce quirk framework to save/restore extra MSR registers around suspend/resume
x86/CPU/AMD: Clear RDRAND CPUID bit on AMD family 15h/16h
scsi: ufs: Fix NULL pointer dereference in ufshcd_config_vreg_hpm()
dmaengine: ste_dma40: fix unneeded variable warning
usb: gadget: composite: Clear "suspended" on reset/disconnect
usb: host: fotg2: restart hcd after port reset
tools: hv: fix KVP and VSS daemons exit code
watchdog: bcm2835_wdt: Fix module autoload
tcp: fix tcp_rtx_queue_tail in case of empty retransmit queue
ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term
ALSA: usb-audio: Fix an OOB bug in parse_audio_mixer_unit
tcp: make sure EPOLLOUT wont be missed
ALSA: seq: Fix potential concurrent access to the deleted pool
KVM: x86: Don't update RIP or do single-step on faulting emulation
x86/apic: Do not initialize LDR and DFR for bigsmp
x86/apic: Include the LDR when clearing out APIC registers
usb-storage: Add new JMS567 revision to unusual_devs
USB: cdc-wdm: fix race between write and disconnect due to flag abuse
usb: host: ohci: fix a race condition between shutdown and irq
USB: storage: ums-realtek: Update module parameter description for auto_delink_en
USB: storage: ums-realtek: Whitelist auto-delink support
ptrace,x86: Make user_64bit_mode() available to 32-bit builds
uprobes/x86: Fix detection of 32-bit user mode
mmc: sdhci-of-at91: add quirk for broken HS200
mmc: core: Fix init of SD cards reporting an invalid VDD range
stm class: Fix a double free of stm_source_device
VMCI: Release resource if the work is already queued
Revert "cfg80211: fix processing world regdomain when non modular"
mac80211: fix possible sta leak
x86/ptrace: fix up botched merge of spectrev1 fix
Linux 4.4.191

Change-Id: I9c9b3ec748ba2977b818fd569d1788ed5da295b2
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
18 files changed:
1  2 
Documentation/kernel-parameters.txt
MAINTAINERS
Makefile
arch/x86/include/asm/ptrace.h
drivers/md/dm-table.c
drivers/mmc/core/sd.c
drivers/nfc/st21nfca/se.c
drivers/scsi/ufs/ufshcd.c
drivers/usb/gadget/composite.c
drivers/vhost/net.c
drivers/vhost/scsi.c
drivers/vhost/vhost.c
drivers/vhost/vhost.h
fs/userfaultfd.c
include/net/tcp.h
lib/Kconfig.debug
lib/Makefile
net/ipv4/route.c

Simple merge
diff --cc MAINTAINERS
Simple merge
diff --cc Makefile
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -325,15 -325,10 +325,17 @@@ int st21nfca_connectivity_event_receive
                    skb->data[0] != NFC_EVT_TRANSACTION_AID_TAG)
                        return -EPROTO;
  
 +              /*
 +               * Buffer should have enough space for at least
 +               * two tag fields + two length fields + aid_len (skb->data[1])
 +               */
 +              if (skb->len < skb->data[1] + 4)
 +                      return -EPROTO;
 +
                transaction = (struct nfc_evt_transaction *)devm_kzalloc(dev,
                                                   skb->len - 2, GFP_KERNEL);
+               if (!transaction)
+                       return -ENOMEM;
  
                transaction->aid_len = skb->data[1];
                memcpy(transaction->aid, &skb->data[2],
Simple merge
Simple merge
@@@ -642,8 -542,9 +645,9 @@@ static void handle_rx(struct vhost_net 
        struct socket *sock;
        struct iov_iter fixup;
        __virtio16 num_buffers;
+       int recv_pkts = 0;
  
 -      mutex_lock(&vq->mutex);
 +      mutex_lock_nested(&vq->mutex, 0);
        sock = vq->private_data;
        if (!sock)
                goto out;
                vq->log : NULL;
        mergeable = vhost_has_feature(vq, VIRTIO_NET_F_MRG_RXBUF);
  
-       while ((sock_len = vhost_net_rx_peek_head_len(net, sock->sk))) {
+       do {
 -              sock_len = peek_head_len(sock->sk);
++              sock_len = vhost_net_rx_peek_head_len(net, sock->sk);
+               if (!sock_len)
+                       break;
                sock_len += sock_hlen;
                vhost_len = sock_len + vhost_hlen;
                headcount = get_rx_bufs(vq, vq->heads, vhost_len,
                if (unlikely(vq_log))
                        vhost_log_write(vq, vq_log, log, vhost_len);
                total_len += vhost_len;
-               if (unlikely(total_len >= VHOST_NET_WEIGHT)) {
-                       vhost_poll_queue(&vq->poll);
-                       goto out;
-               }
-       }
+       } while (likely(!vhost_exceeds_weight(vq, ++recv_pkts, total_len)));
 +      vhost_net_enable_vq(net, vq);
++
  out:
        mutex_unlock(&vq->mutex);
  }
Simple merge
@@@ -404,17 -397,14 +420,18 @@@ void vhost_dev_init(struct vhost_dev *d
        mutex_init(&dev->mutex);
        dev->log_ctx = NULL;
        dev->log_file = NULL;
 -      dev->memory = NULL;
 +      dev->umem = NULL;
 +      dev->iotlb = NULL;
        dev->mm = NULL;
 -      spin_lock_init(&dev->work_lock);
 -      INIT_LIST_HEAD(&dev->work_list);
        dev->worker = NULL;
+       dev->weight = weight;
+       dev->byte_weight = byte_weight;
 +      init_llist_head(&dev->work_list);
 +      init_waitqueue_head(&dev->wait);
 +      INIT_LIST_HEAD(&dev->read_list);
 +      INIT_LIST_HEAD(&dev->pending_list);
 +      spin_lock_init(&dev->iotlb_lock);
  
        for (i = 0; i < dev->nvqs; ++i) {
                vq = dev->vqs[i];
                vq->log = NULL;
@@@ -156,17 -124,16 +156,21 @@@ struct vhost_dev 
        int nvqs;
        struct file *log_file;
        struct eventfd_ctx *log_ctx;
 -      spinlock_t work_lock;
 -      struct list_head work_list;
 +      struct llist_head work_list;
        struct task_struct *worker;
+       int weight;
+       int byte_weight;
 +      struct vhost_umem *umem;
 +      struct vhost_umem *iotlb;
 +      spinlock_t iotlb_lock;
 +      struct list_head read_list;
 +      struct list_head pending_list;
 +      wait_queue_head_t wait;
  };
  
- void vhost_dev_init(struct vhost_dev *, struct vhost_virtqueue **vqs, int nvqs);
+ bool vhost_exceeds_weight(struct vhost_virtqueue *vq, int pkts, int total_len);
+ void vhost_dev_init(struct vhost_dev *, struct vhost_virtqueue **vqs,
+                   int nvqs, int weight, int byte_weight);
  long vhost_dev_set_owner(struct vhost_dev *dev);
  bool vhost_dev_has_owner(struct vhost_dev *dev);
  long vhost_dev_check_owner(struct vhost_dev *);
@@@ -458,16 -458,17 +458,18 @@@ static int userfaultfd_release(struct i
                        continue;
                }
                new_flags = vma->vm_flags & ~(VM_UFFD_MISSING | VM_UFFD_WP);
-               prev = vma_merge(mm, prev, vma->vm_start, vma->vm_end,
-                                new_flags, vma->anon_vma,
-                                vma->vm_file, vma->vm_pgoff,
-                                vma_policy(vma),
-                                NULL_VM_UFFD_CTX,
-                                vma_get_anon_name(vma));
-               if (prev)
-                       vma = prev;
-               else
-                       prev = vma;
+               if (still_valid) {
+                       prev = vma_merge(mm, prev, vma->vm_start, vma->vm_end,
+                                        new_flags, vma->anon_vma,
+                                        vma->vm_file, vma->vm_pgoff,
+                                        vma_policy(vma),
 -                                       NULL_VM_UFFD_CTX);
++                                       NULL_VM_UFFD_CTX,
++                                       vma_get_anon_name(vma));
+                       if (prev)
+                               vma = prev;
+                       else
+                               prev = vma;
+               }
                vma->vm_flags = new_flags;
                vma->vm_userfaultfd_ctx = NULL_VM_UFFD_CTX;
        }
Simple merge
Simple merge
diff --cc lib/Makefile
Simple merge
Simple merge