1. 06 8月, 2018 2 次提交
  2. 04 8月, 2018 3 次提交
  3. 02 8月, 2018 5 次提交
  4. 01 8月, 2018 4 次提交
  5. 30 7月, 2018 3 次提交
  6. 28 7月, 2018 2 次提交
  7. 27 7月, 2018 5 次提交
    • Z
      can: dev: enable multi-queue for SocketCAN devices · 03870907
      Zhu Yi 提交于
      The existing SocketCAN implementation provides alloc_candev() to
      allocate a CAN device using a single Tx and Rx queue. This can lead to
      priority inversion in case the single Tx queue is already full with low
      priority messages and a high priority message needs to be sent while the
      bus is fully loaded with medium priority messages.
      
      This problem can be solved by using the existing multi-queue support of
      the network subsytem. The commit makes it possible to use multi-queue in
      the CAN subsystem in the same way it is used in the Ethernet subsystem
      by adding an alloc_candev_mqs() call and accompanying macros. With this
      support a CAN device can use multi-queue qdisc (e.g. mqprio) to avoid
      the aforementioned priority inversion.
      
      The exisiting functionality of alloc_candev() is the same as before.
      
      CAN devices need to have prioritized multiple hardware queues or are
      able to abort waiting for arbitration to make sensible use of
      multi-queues.
      Signed-off-by: NZhu Yi <yi.zhu5@cn.bosch.com>
      Signed-off-by: NMark Jonas <mark.jonas@de.bosch.com>
      Reviewed-by: NHeiko Schocher <hs@denx.de>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      03870907
    • A
      include/linux/eventfd.h: include linux/errno.h · fa3fc2ad
      Arnd Bergmann 提交于
      The new gasket staging driver ran into a randconfig build failure when
      CONFIG_EVENTFD is disabled:
      
        In file included from drivers/staging/gasket/gasket_interrupt.h:11,
                         from drivers/staging/gasket/gasket_interrupt.c:4:
        include/linux/eventfd.h: In function 'eventfd_ctx_fdget':
        include/linux/eventfd.h:51:9: error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration]
      
      I can't see anything wrong with including eventfd.h before err.h, so the
      easiest fix is to make it possible to do this by including the file
      where it is needed.
      
      Link: http://lkml.kernel.org/r/20180724110737.3985088-1-arnd@arndb.de
      Fixes: 9a69f508 ("drivers/staging: Gasket driver framework + Apex driver")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Eric Biggers <ebiggers@google.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fa3fc2ad
    • K
      mm: fix vma_is_anonymous() false-positives · bfd40eaf
      Kirill A. Shutemov 提交于
      vma_is_anonymous() relies on ->vm_ops being NULL to detect anonymous
      VMA.  This is unreliable as ->mmap may not set ->vm_ops.
      
      False-positive vma_is_anonymous() may lead to crashes:
      
      	next ffff8801ce5e7040 prev ffff8801d20eca50 mm ffff88019c1e13c0
      	prot 27 anon_vma ffff88019680cdd8 vm_ops 0000000000000000
      	pgoff 0 file ffff8801b2ec2d00 private_data 0000000000000000
      	flags: 0xff(read|write|exec|shared|mayread|maywrite|mayexec|mayshare)
      	------------[ cut here ]------------
      	kernel BUG at mm/memory.c:1422!
      	invalid opcode: 0000 [#1] SMP KASAN
      	CPU: 0 PID: 18486 Comm: syz-executor3 Not tainted 4.18.0-rc3+ #136
      	Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google
      	01/01/2011
      	RIP: 0010:zap_pmd_range mm/memory.c:1421 [inline]
      	RIP: 0010:zap_pud_range mm/memory.c:1466 [inline]
      	RIP: 0010:zap_p4d_range mm/memory.c:1487 [inline]
      	RIP: 0010:unmap_page_range+0x1c18/0x2220 mm/memory.c:1508
      	Call Trace:
      	 unmap_single_vma+0x1a0/0x310 mm/memory.c:1553
      	 zap_page_range_single+0x3cc/0x580 mm/memory.c:1644
      	 unmap_mapping_range_vma mm/memory.c:2792 [inline]
      	 unmap_mapping_range_tree mm/memory.c:2813 [inline]
      	 unmap_mapping_pages+0x3a7/0x5b0 mm/memory.c:2845
      	 unmap_mapping_range+0x48/0x60 mm/memory.c:2880
      	 truncate_pagecache+0x54/0x90 mm/truncate.c:800
      	 truncate_setsize+0x70/0xb0 mm/truncate.c:826
      	 simple_setattr+0xe9/0x110 fs/libfs.c:409
      	 notify_change+0xf13/0x10f0 fs/attr.c:335
      	 do_truncate+0x1ac/0x2b0 fs/open.c:63
      	 do_sys_ftruncate+0x492/0x560 fs/open.c:205
      	 __do_sys_ftruncate fs/open.c:215 [inline]
      	 __se_sys_ftruncate fs/open.c:213 [inline]
      	 __x64_sys_ftruncate+0x59/0x80 fs/open.c:213
      	 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
      	 entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      Reproducer:
      
      	#include <stdio.h>
      	#include <stddef.h>
      	#include <stdint.h>
      	#include <stdlib.h>
      	#include <string.h>
      	#include <sys/types.h>
      	#include <sys/stat.h>
      	#include <sys/ioctl.h>
      	#include <sys/mman.h>
      	#include <unistd.h>
      	#include <fcntl.h>
      
      	#define KCOV_INIT_TRACE			_IOR('c', 1, unsigned long)
      	#define KCOV_ENABLE			_IO('c', 100)
      	#define KCOV_DISABLE			_IO('c', 101)
      	#define COVER_SIZE			(1024<<10)
      
      	#define KCOV_TRACE_PC  0
      	#define KCOV_TRACE_CMP 1
      
      	int main(int argc, char **argv)
      	{
      		int fd;
      		unsigned long *cover;
      
      		system("mount -t debugfs none /sys/kernel/debug");
      		fd = open("/sys/kernel/debug/kcov", O_RDWR);
      		ioctl(fd, KCOV_INIT_TRACE, COVER_SIZE);
      		cover = mmap(NULL, COVER_SIZE * sizeof(unsigned long),
      				PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
      		munmap(cover, COVER_SIZE * sizeof(unsigned long));
      		cover = mmap(NULL, COVER_SIZE * sizeof(unsigned long),
      				PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
      		memset(cover, 0, COVER_SIZE * sizeof(unsigned long));
      		ftruncate(fd, 3UL << 20);
      		return 0;
      	}
      
      This can be fixed by assigning anonymous VMAs own vm_ops and not relying
      on it being NULL.
      
      If ->mmap() failed to set ->vm_ops, mmap_region() will set it to
      dummy_vm_ops.  This way we will have non-NULL ->vm_ops for all VMAs.
      
      Link: http://lkml.kernel.org/r/20180724121139.62570-4-kirill.shutemov@linux.intel.comSigned-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Reported-by: syzbot+3f84280d52be9b7083cc@syzkaller.appspotmail.com
      Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Reviewed-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bfd40eaf
    • K
      mm: introduce vma_init() · 027232da
      Kirill A. Shutemov 提交于
      Not all VMAs allocated with vm_area_alloc().  Some of them allocated on
      stack or in data segment.
      
      The new helper can be use to initialize VMA properly regardless where it
      was allocated.
      
      Link: http://lkml.kernel.org/r/20180724121139.62570-2-kirill.shutemov@linux.intel.comSigned-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Reviewed-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      027232da
    • T
      delayacct: fix crash in delayacct_blkio_end() after delayacct init failure · b512719f
      Tejun Heo 提交于
      While forking, if delayacct init fails due to memory shortage, it
      continues expecting all delayacct users to check task->delays pointer
      against NULL before dereferencing it, which all of them used to do.
      
      Commit c96f5471 ("delayacct: Account blkio completion on the correct
      task"), while updating delayacct_blkio_end() to take the target task
      instead of always using %current, made the function test NULL on
      %current->delays and then continue to operated on @p->delays.  If
      %current succeeded init while @p didn't, it leads to the following
      crash.
      
       BUG: unable to handle kernel NULL pointer dereference at 0000000000000004
       IP: __delayacct_blkio_end+0xc/0x40
       PGD 8000001fd07e1067 P4D 8000001fd07e1067 PUD 1fcffbb067 PMD 0
       Oops: 0000 [#1] SMP PTI
       CPU: 4 PID: 25774 Comm: QIOThread0 Not tainted 4.16.0-9_fbk1_rc2_1180_g6b593215b4d7 #9
       RIP: 0010:__delayacct_blkio_end+0xc/0x40
       Call Trace:
        try_to_wake_up+0x2c0/0x600
        autoremove_wake_function+0xe/0x30
        __wake_up_common+0x74/0x120
        wake_up_page_bit+0x9c/0xe0
        mpage_end_io+0x27/0x70
        blk_update_request+0x78/0x2c0
        scsi_end_request+0x2c/0x1e0
        scsi_io_completion+0x20b/0x5f0
        blk_mq_complete_request+0xa2/0x100
        ata_scsi_qc_complete+0x79/0x400
        ata_qc_complete_multiple+0x86/0xd0
        ahci_handle_port_interrupt+0xc9/0x5c0
        ahci_handle_port_intr+0x54/0xb0
        ahci_single_level_irq_intr+0x3b/0x60
        __handle_irq_event_percpu+0x43/0x190
        handle_irq_event_percpu+0x20/0x50
        handle_irq_event+0x2a/0x50
        handle_edge_irq+0x80/0x1c0
        handle_irq+0xaf/0x120
        do_IRQ+0x41/0xc0
        common_interrupt+0xf/0xf
      
      Fix it by updating delayacct_blkio_end() check @p->delays instead.
      
      Link: http://lkml.kernel.org/r/20180724175542.GP1934745@devbig577.frc2.facebook.com
      Fixes: c96f5471 ("delayacct: Account blkio completion on the correct task")
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NDave Jones <dsj@fb.com>
      Debugged-by: NDave Jones <dsj@fb.com>
      Reviewed-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: Josh Snyder <joshs@netflix.com>
      Cc: <stable@vger.kernel.org>	[4.15+]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b512719f
  8. 26 7月, 2018 1 次提交
  9. 25 7月, 2018 5 次提交
  10. 24 7月, 2018 2 次提交
    • F
      net/mlx5: FW tracer, events handling · c71ad41c
      Feras Daoud 提交于
      The tracer has one event, event 0x26, with two subtypes:
      - Subtype 0: Ownership change
      - Subtype 1: Traces available
      
      An ownership change occurs in the following cases:
      1- Owner releases his ownership, in this case, an event will be
      sent to inform others to reattempt acquire ownership.
      2- Ownership was taken by a higher priority tool, in this case
      the owner should understand that it lost ownership, and go through
      tear down flow.
      
      The second subtype indicates that there are traces in the trace buffer,
      in this case, the driver polls the tracer buffer for new traces, parse
      them and prepares the messages for printing.
      
      The HW starts tracing from the first address in the tracer buffer.
      Driver receives an event notifying that new trace block exists.
      HW posts a timestamp event at the last 8B of every 256B block.
      Comparing the timestamp to the last handled timestamp would indicate
      that this is a new trace block. Once the new timestamp is detected,
      the entire block is considered valid.
      
      Block validation and parsing, should be done after copying the current
      block to a different location, in order to avoid block overwritten
      during processing.
      Signed-off-by: NFeras Daoud <ferasda@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      c71ad41c
    • F
      net/mlx5: FW tracer, implement tracer logic · f53aaa31
      Feras Daoud 提交于
      Implement FW tracer logic and registers access, initialization and
      cleanup flows.
      
      Initializing the tracer will be part of load one flow, as multiple
      PFs will try to acquire ownership but only one will succeed and will
      be the tracer owner.
      Signed-off-by: NFeras Daoud <ferasda@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      f53aaa31
  11. 23 7月, 2018 1 次提交
  12. 22 7月, 2018 3 次提交
  13. 21 7月, 2018 3 次提交
  14. 20 7月, 2018 1 次提交
新手
引导
客服 返回
顶部