24 Feb, 2020

1 commit

  • [ Upstream commit bbd20c939c8aa3f27fa30e86691af250bf92973a ]

    In fore200e_send and fore200e_close, the pointers from the arguments
    are dereferenced in the variable declaration block and then checked
    for NULL. The patch fixes these issues by avoiding NULL pointer
    dereferences.

    Signed-off-by: Aditya Pakki
    Signed-off-by: David S. Miller
    Signed-off-by: Sasha Levin

    Aditya Pakki
     

01 Feb, 2020

1 commit

  • [ Upstream commit 30780d086a83332adcd9362281201cee7c3d9d19 ]

    With -O3, gcc has found an actual unintialized variable stored
    into an mmio register in two instances:

    drivers/atm/eni.c: In function 'discard':
    drivers/atm/eni.c:465:13: error: 'dma[1]' is used uninitialized in this function [-Werror=uninitialized]
    writel(dma[i*2+1],eni_dev->rx_dma+dma_wr*8+4);
    ^
    drivers/atm/eni.c:465:13: error: 'dma[3]' is used uninitialized in this function [-Werror=uninitialized]

    Change the code to always write zeroes instead.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: David S. Miller
    Signed-off-by: Sasha Levin

    Arnd Bergmann
     

29 Jan, 2020

1 commit

  • [ Upstream commit fa865ba183d61c1ec8cbcab8573159c3b72b89a4 ]

    In fs_open(), 'vcc' is allocated through kmalloc() and assigned to
    'atm_vcc->dev_data.' In the following execution, if an error occurs, e.g.,
    there is no more free channel, an error code EBUSY or ENOMEM will be
    returned. However, 'vcc' is not deallocated, leading to memory leaks. Note
    that, in normal cases where fs_open() returns 0, 'vcc' will be deallocated
    in fs_close(). But, if fs_open() fails, there is no guarantee that
    fs_close() will be invoked.

    To fix this issue, deallocate 'vcc' before the error code is returned.

    Signed-off-by: Wenwen Wang
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Wenwen Wang
     

25 Sep, 2019

1 commit


28 Aug, 2019

1 commit


20 Aug, 2019

1 commit


07 Aug, 2019

1 commit


03 Aug, 2019

1 commit

  • board is controlled by user-space, hence leading to a potential
    exploitation of the Spectre variant 1 vulnerability.

    This issue was detected with the help of Smatch:

    drivers/atm/iphase.c:2765 ia_ioctl() warn: potential spectre issue 'ia_dev' [r] (local cap)
    drivers/atm/iphase.c:2774 ia_ioctl() warn: possible spectre second half. 'iadev'
    drivers/atm/iphase.c:2782 ia_ioctl() warn: possible spectre second half. 'iadev'
    drivers/atm/iphase.c:2816 ia_ioctl() warn: possible spectre second half. 'iadev'
    drivers/atm/iphase.c:2823 ia_ioctl() warn: possible spectre second half. 'iadev'
    drivers/atm/iphase.c:2830 ia_ioctl() warn: potential spectre issue '_ia_dev' [r] (local cap)
    drivers/atm/iphase.c:2845 ia_ioctl() warn: possible spectre second half. 'iadev'
    drivers/atm/iphase.c:2856 ia_ioctl() warn: possible spectre second half. 'iadev'

    Fix this by sanitizing board before using it to index ia_dev and _ia_dev

    Notice that given that speculation windows are large, the policy is
    to kill the speculation on the first load and not worry if it can be
    completed with a dependent load/store [1].

    [1] https://lore.kernel.org/lkml/20180423164740.GY17484@dhcp22.suse.cz/

    Signed-off-by: Gustavo A. R. Silva
    Signed-off-by: David S. Miller

    Gustavo A. R. Silva
     

31 Jul, 2019

1 commit


25 Jul, 2019

1 commit


24 Jul, 2019

1 commit


16 Jul, 2019

1 commit


31 May, 2019

3 commits

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation this program is
    distributed in the hope that it will be useful but without any
    warranty without even the implied warranty of merchantability or
    fitness for a particular purpose see the gnu general public license
    for more details

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 655 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Kate Stewart
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070034.575739538@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details you
    should have received a copy of the gnu general public license along
    with this program if not write to the free software foundation inc
    59 temple place suite 330 boston ma 02111 1307 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 1334 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 3029 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

24 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details you
    should have received a copy of the gnu general public license along
    with this program if not write to the free software foundation inc
    59 temple place suite 330 boston ma 02111 1307 usa the gnu gpl is
    contained in usr doc copyright gpl on a debian system and in the
    file copying in the linux kernel source

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 6 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Kate Stewart
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190520170857.643862682@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

22 May, 2019

1 commit

  • Pull SPDX update from Greg KH:
    "Here is a series of patches that add SPDX tags to different kernel
    files, based on two different things:

    - SPDX entries are added to a bunch of files that we missed a year
    ago that do not have any license information at all.

    These were either missed because the tool saw the MODULE_LICENSE()
    tag, or some EXPORT_SYMBOL tags, and got confused and thought the
    file had a real license, or the files have been added since the
    last big sweep, or they were Makefile/Kconfig files, which we
    didn't touch last time.

    - Add GPL-2.0-only or GPL-2.0-or-later tags to files where our scan
    tools can determine the license text in the file itself. Where this
    happens, the license text is removed, in order to cut down on the
    700+ different ways we have in the kernel today, in a quest to get
    rid of all of these.

    These patches have been out for review on the linux-spdx@vger mailing
    list, and while they were created by automatic tools, they were
    hand-verified by a bunch of different people, all whom names are on
    the patches are reviewers.

    The reason for these "large" patches is if we were to continue to
    progress at the current rate of change in the kernel, adding license
    tags to individual files in different subsystems, we would be finished
    in about 10 years at the earliest.

    There will be more series of these types of patches coming over the
    next few weeks as the tools and reviewers crunch through the more
    "odd" variants of how to say "GPLv2" that developers have come up with
    over the years, combined with other fun oddities (GPL + a BSD
    disclaimer?) that are being unearthed, with the goal for the whole
    kernel to be cleaned up.

    These diffstats are not small, 3840 files are touched, over 10k lines
    removed in just 24 patches"

    * tag 'spdx-5.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (24 commits)
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 25
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 24
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 23
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 22
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 21
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 19
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 18
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 17
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 15
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 14
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 12
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 11
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 10
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 9
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 7
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 5
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 4
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 3
    ...

    Linus Torvalds
     

21 May, 2019

1 commit

  • Add SPDX license identifiers to all files which:

    - Have no license information of any form

    - Have MODULE_LICENCE("GPL*") inside which was used in the initial
    scan/conversion to ignore the file

    These files fall under the project license, GPL v2 only. The resulting SPDX
    license identifier is:

    GPL-2.0-only

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

17 May, 2019

1 commit


26 Apr, 2019

1 commit


22 Apr, 2019

1 commit


19 Apr, 2019

1 commit


18 Jan, 2019

1 commit

  • Shifting the 1 by exp by an int can lead to sign-extension overlow when
    exp is 31 since 1 is an signed int and sign-extending this result to an
    unsigned long long will set the upper 32 bits. Fix this by shifting an
    unsigned long.

    Detected by cppcheck:
    (warning) Shifting signed 32-bit value by 31 bits is undefined behaviour

    Signed-off-by: Colin Ian King
    Signed-off-by: David S. Miller

    Colin Ian King
     

08 Jan, 2019

1 commit

  • We already need to zero out memory for dma_alloc_coherent(), as such
    using dma_zalloc_coherent() is superflous. Phase it out.

    This change was generated with the following Coccinelle SmPL patch:

    @ replace_dma_zalloc_coherent @
    expression dev, size, data, handle, flags;
    @@

    -dma_zalloc_coherent(dev, size, handle, flags)
    +dma_alloc_coherent(dev, size, handle, flags)

    Suggested-by: Christoph Hellwig
    Signed-off-by: Luis Chamberlain
    [hch: re-ran the script on the latest tree]
    Signed-off-by: Christoph Hellwig

    Luis Chamberlain
     

29 Nov, 2018

1 commit


28 Nov, 2018

1 commit


18 Nov, 2018

1 commit


19 Oct, 2018

2 commits

  • Clang warns:

    drivers/atm/zatm.c:513:7: error: while loop has empty body
    [-Werror,-Wempty-body]
    zwait;
    ^
    drivers/atm/zatm.c:513:7: note: put the semicolon on a separate line to
    silence this warning

    Get rid of this warning by using an empty do-while loop. While we're at
    it, add parentheses to make it clear that this is a function-like macro.

    Link: https://github.com/ClangBuiltLinux/linux/issues/42
    Suggested-by: Masahiro Yamada
    Signed-off-by: Nathan Chancellor
    Signed-off-by: David S. Miller

    Nathan Chancellor
     
  • Clang warns:

    drivers/atm/eni.c:244:48: error: for loop has empty body
    [-Werror,-Wempty-body]
    for (order = 0; (1 << order) < *size; order++);
    ^
    drivers/atm/eni.c:244:48: note: put the semicolon on a separate line to
    silence this warning

    In this case, that loop is expected to be empty so silence the warning
    in the way that Clang suggests.

    Link: https://github.com/ClangBuiltLinux/linux/issues/42
    Suggested-by: Masahiro Yamada
    Signed-off-by: Nathan Chancellor
    Signed-off-by: David S. Miller

    Nathan Chancellor
     

16 Oct, 2018

1 commit


13 Oct, 2018

1 commit


11 Oct, 2018

7 commits


06 Oct, 2018

1 commit


03 Jul, 2018

1 commit