]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/log
mirror_ubuntu-zesty-kernel.git
7 years agoUBUNTU: [debian] Fix regression with ABI subversions and backport
dann frazier [Fri, 15 Aug 2014 19:40:08 +0000 (13:40 -0600)]
UBUNTU: [debian] Fix regression with ABI subversions and backport

Tim pointed out that 443b5814ee77f8c9083079ce0e6a0806e087630f broke the parsing
of backport versions, such as 8.13~14.10+ppa.1. This should fix it. I used the
following script to validate the regular expressions:

dannf@fluid:~$ cat test.sh

set -e

splitver() {
    local ver="$1"
    local abinum="$(echo $ver | sed -r -e 's/([^\+~]*)\.[^\.]+(~.*)?(\+.*)?$/\1/')"
    local uploadnum="$(echo $ver | sed -r -e 's/[^\+~]*\.([^\.~]+)(~.*)?(\+.*)?$/\1/')"

    echo "$abinum $uploadnum"
}

do_test() {
    local ver="$1"
    local expected="$2"

    local actual="$(splitver $ver)"

    if [ "$actual" = "$expected" ]; then
echo "PASS: $ver"
return 0
    fi
    echo "FAIL: $ver split as $actual"
    return 1
}

do_test "33.58" "33 58"
do_test "33.59.58" "33.59 58"
do_test "8.13~14.10" "8 13"
do_test "8.13~14.10+ppa.1" "8 13"
do_test "8.13.99~14.10+ppa.3" "8.13 99"
dannf@fluid:~$ ./test.sh
PASS: 33.58
PASS: 33.59.58
PASS: 8.13~14.10
PASS: 8.13~14.10+ppa.1
PASS: 8.13.99~14.10+ppa.3

Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [debian] Allow for package revisions condusive for branching
dann frazier [Mon, 11 Aug 2014 19:50:02 +0000 (13:50 -0600)]
UBUNTU: [debian] Allow for package revisions condusive for branching

TLDR; This changes the way that version strings are parsed in the packaging to
make it easier for me to maintain topic branches/PPA builds. There should
be no changes to how things work today for standard Ubuntu kernels. But,
it allows for topic-branch maintainers to add an optional ".X" in the ABI
name, for reasons described below.

<Regression Testing>
------------------
Old Parsing:
  = abinum =
  $ echo "33.58" | sed -e 's/\..*//'
  33
  = uploadnum =
  $ echo "33.58" | sed -e 's/.*\.//'
  58
  = abi =
  $ echo "33.58" | gawk -F. '{print $1}'
  33

New Parsing:
  = abinum =
  $ echo "33.58" | sed -r -e 's/([^\+]*)\.[^\.]+(\+.*)?$/\1/'
  33
  = uploadnum =
  $ echo "33.58" | sed -r -e 's/[^\+]*\.([^\.]+(\+.*)?$$)/\1/'
  58
  = abi =
  $ echo "33.58" | sed -r -e 's/([^\+]*)\.[^\.]+(\+.*)?$/\1/'
  33
</Regression Testing>

When maintaining topic customizations that track Ubuntu kernel releases, it
is nice have the following features:

 1) Ability to decipher the base Ubuntu kernel revision used from the topic
    kernel's revision number
 2) Use a version that dpkg sorts > the base Ubuntu version
 3) Use a version that dpkg sorts < the next expected Ubuntu version
 4) Ability to retains the same ABI as the base Ubuntu version when the
    ABI has indeed not changed. This helps with e.g. d-i compatibility.
 5) Make use of ABI tracking facilities (vs. just disabling them)

This is difficult to do with the current version scheme, which encodes the
ABI number in the version string:

  <upstream-version>-<abi>.<rev>

I can tack a "+topic.<N>" to the end of rev, we can solve 1-3, but only as
long as as the ABI is the same. Once the ABI changes, I don't have a good way
to bump it. If I increment the ABI, we'll overlap with the next Ubuntu ABI
(breaking #4). If we jump to a huge ABI number (e.g. x100 to go from 32 to
3200), we'll have a package revision that will never again upgrade to an Ubuntu
version (breaking #3), and never get back to the Ubuntu ABI (again breaking #4).
I can of course use a linux-meta package to e.g. transition from a 3200 ABI back
to a 32 ABI at the packaging level, but the bootloader will still consider
3200 to be newer and therefore the default.

I've therefore started using the following scheme:

  <upstream-version>-<abi>(.topicabi)?.<rev>(+<topic>.<topicrev>)?

Where topicabi must always be >= <rev> (ugly, but necessary).

If I don't break the ABI, I can then branch and return like so:

3.16.0-8.6 -------------------------------------------------> 3.16.0-8.7
   \                                                             ^
    \                                                            |
     \--> 3.16.0-8.6+topic.1 -------> 3.16.0-8.6+topic.2 --------/

If I do need to break the ABI, I can branch and return like so:

3.16.0-8.6 -------------------------------------------------> 3.16.0-9.1
   \                                                             ^
    \       ABI break #1                   ABI break #2          |
     \--> 3.16.0-8.6.6+topic.1 -------> 3.16.0-8.7.6+topic.2 ----/

Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [Debian] Cloud tools
Tim Gardner [Thu, 24 Jul 2014 13:30:01 +0000 (07:30 -0600)]
UBUNTU: [Debian] Cloud tools

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [Debian] add debian/gbp.conf
Kamal Mostafa [Mon, 26 May 2014 10:20:05 +0000 (12:20 +0200)]
UBUNTU: [Debian] add debian/gbp.conf

Defines tag format for 'git buildpackage'.

Acked-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
7 years agoUBUNTU: [Debian] remove the kernel-image firmware list on clean
Andy Whitcroft [Wed, 21 May 2014 14:55:20 +0000 (15:55 +0100)]
UBUNTU: [Debian] remove the kernel-image firmware list on clean

Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: [debian] Dynamically generate the kernel-image udebs firmware list
Tim Gardner [Tue, 20 May 2014 20:47:14 +0000 (13:47 -0700)]
UBUNTU: [debian] Dynamically generate the kernel-image udebs firmware list

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [debian] Fix indep_hdrs_pkg_name
Tim Gardner [Thu, 28 Feb 2013 17:56:19 +0000 (10:56 -0700)]
UBUNTU: [debian] Fix indep_hdrs_pkg_name

BugLink: http://bugs.launchpad.net/bugs/1134441
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [Debian] Improve tools version message
Andy Whitcroft [Thu, 5 Dec 2013 18:14:04 +0000 (18:14 +0000)]
UBUNTU: [Debian] Improve tools version message

BugLink: http://bugs.launchpad.net/bugs/1257715
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [Debian] Re-sign modules after debug objcopy
Tim Gardner [Tue, 26 Nov 2013 17:35:47 +0000 (10:35 -0700)]
UBUNTU: [Debian] Re-sign modules after debug objcopy

BugLink: http://bugs.launchpad.net/bugs/1253155
Adding a GNU debug link to a module ELF destroys the
module signature, so re-sign the module file after the objcopy.

objcopy --add-gnu-debuglink=$(dbgpkgdir)/usr/lib/debug/$$module $(pkgdir)/$$module;
scripts/sign-file $(CONFIG_MODULE_SIG_HASH) $(MODSECKEY) $(MODPUBKEY) $(pkgdir)/$$module;

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [Debian] sort out linux-tools naming
Andy Whitcroft [Fri, 26 Jul 2013 10:48:03 +0000 (11:48 +0100)]
UBUNTU: [Debian] sort out linux-tools naming

BugLink: http://bugs.launchpad.net/bugs/1205284
Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: [Debian] linux-tools: switch to common generic version helper
Andy Whitcroft [Tue, 13 Aug 2013 13:19:05 +0000 (14:19 +0100)]
UBUNTU: [Debian] linux-tools: switch to common generic version helper

Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: [Debian] postinst -- fix unchanged link detection
Andy Whitcroft [Tue, 5 Nov 2013 12:21:19 +0000 (12:21 +0000)]
UBUNTU: [Debian] postinst -- fix unchanged link detection

http://bugs.launchpad.net/bugs/1248053
Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: [Debian] postinst -- improve relative symlink detection with missing files
Andy Whitcroft [Tue, 5 Nov 2013 11:12:07 +0000 (11:12 +0000)]
UBUNTU: [Debian] postinst -- improve relative symlink detection with missing files

When the symlinks are made we attempt to use relative links if that
would work.  However this relies on the file we are making the link to to
actually exist.  When it does not we fall back to absolute.  This impacts
the initrd links which are made before we make the initrd itself.

When the caller has asked us to use a specific handle file and that file
does not yet exist, see if there are any other files we can use in that
directory.  In the common case this will be a version specific file and
highly unique.

BugLink: http://bugs.launchpad.net/bugs/1248053
Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: [Debian] getabis: Commit new ABI directory, remove the old
Tim Gardner [Tue, 10 Sep 2013 14:30:04 +0000 (08:30 -0600)]
UBUNTU: [Debian] getabis: Commit new ABI directory, remove the old

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [Debian] Add hv_vss_daemon to tools package
Tim Gardner [Mon, 19 Aug 2013 18:29:47 +0000 (12:29 -0600)]
UBUNTU: [Debian] Add hv_vss_daemon to tools package

BugLink: http://bugs.launchpad.net/bugs/1213282
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [debian] tools: ship 'cpupower' in linux-tools
Kamal Mostafa [Fri, 9 Aug 2013 23:03:46 +0000 (16:03 -0700)]
UBUNTU: [debian] tools: ship 'cpupower' in linux-tools

BugLink: http://bugs.launchpad.net/bugs/1158668
New Build-depends: libpci-dev

Adds to binary package "linux-tools-$(abi_version)"
  /usr/bin/cpupower_$(abi_version)
  /usr/lib/libcpupower.so.$(abi_version)

Adds to binary package "linux-tools-common"
  /usr/bin/cpupower
  /usr/share/man/man1/cpupower-set.1.gz
  /usr/share/man/man1/cpupower-frequency-set.1.gz
  /usr/share/man/man1/cpupower-frequency-info.1.gz
  /usr/share/man/man1/cpupower-monitor.1.gz
  /usr/share/man/man1/cpupower-info.1.gz
  /usr/share/man/man1/cpupower-idle-info.1.gz
  /usr/share/man/man1/cpupower.1.gz

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [Debian] tools: enable x86 and hyper-v
Andy Whitcroft [Tue, 13 Aug 2013 12:18:47 +0000 (13:18 +0100)]
UBUNTU: [Debian] tools: enable x86 and hyper-v

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [Debian] autopkgtest: switch Depends: to build-essential
Andy Whitcroft [Sat, 22 Jun 2013 11:52:29 +0000 (12:52 +0100)]
UBUNTU: [Debian] autopkgtest: switch Depends: to build-essential

autopkgtest control Depends: as empty now seems to be an error, we want
to say 'install nothing' so switch it to depend on packages which by
definition are always installed.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: [Debian] supply perf with appropriate prefix to ensure use of local config
Andy Whitcroft [Wed, 31 Jul 2013 12:41:32 +0000 (13:41 +0100)]
UBUNTU: [Debian] supply perf with appropriate prefix to ensure use of local config

If we do not supply an installation prefix when we are building perf
it will assume it is designed to run relative to the builders HOME.
This means that as built on a buildd we will check for the system
configuration relative to the buildd users home rather than in /etc.
This implies a local user could use this to compromise other users _if_
there is a buildd user installed on the system and they have access to it.

CVE-2013-1060
BugLink: http://bugs.launchpad.net/bugs/1206200
Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: [Debian] Explicitly reference gawk in build rules awk in all and arch
Andy Whitcroft [Fri, 26 Jul 2013 16:55:44 +0000 (17:55 +0100)]
UBUNTU: [Debian] Explicitly reference gawk in build rules awk in all and arch

Explicitly reference gawk in all rules files. Fixes FTBS on the buildds.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [Debian] fix SRCPKGNAME-udebs-FLAVOUR handling for complex flavours
Andy Whitcroft [Thu, 25 Jul 2013 14:24:34 +0000 (15:24 +0100)]
UBUNTU: [Debian] fix SRCPKGNAME-udebs-FLAVOUR handling for complex flavours

Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: [Debian] Supply PKG_ABI in kmake
Tim Gardner [Wed, 24 Jul 2013 18:46:43 +0000 (12:46 -0600)]
UBUNTU: [Debian] Supply PKG_ABI in kmake

BugLink: http://bugs.launchpad.net/bugs/1193172
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [Debian] reduce udeb rules spew
Tim Gardner [Wed, 24 Jul 2013 15:50:34 +0000 (09:50 -0600)]
UBUNTU: [Debian] reduce udeb rules spew

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [Debian] Prepare to build using arch specific compiler
Tim Gardner [Wed, 10 Jul 2013 19:51:09 +0000 (13:51 -0600)]
UBUNTU: [Debian] Prepare to build using arch specific compiler

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [Debian] do_tools=false when cross compiling
Tim Gardner [Thu, 20 Jun 2013 16:13:57 +0000 (16:13 +0000)]
UBUNTU: [Debian] do_tools=false when cross compiling

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [Debian] generate a SRCPKGNAME-udebs-FLAVOUR-di depending on all built udebs
Andy Whitcroft [Thu, 18 Jul 2013 13:11:26 +0000 (14:11 +0100)]
UBUNTU: [Debian] generate a SRCPKGNAME-udebs-FLAVOUR-di depending on all built udebs

Build a nice little meta package for use in the seeds.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: [debian] Use dh_strip
Tim Gardner [Thu, 20 Jun 2013 14:06:04 +0000 (08:06 -0600)]
UBUNTU: [debian] Use dh_strip

BugLink: http://bugs.launchpad.net/bugs/1192759
Rely on dh_strip to strip any binaries for the
host arch instead of using install -s

Signed-off-by: Steve Langasek <steve.langasek@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: (debian) get-firmware: Be more selective about copies
Tim Gardner [Wed, 10 Apr 2013 19:19:02 +0000 (13:19 -0600)]
UBUNTU: (debian) get-firmware: Be more selective about copies

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: (debian) fix internal linkage for separated header packages
Andy Whitcroft [Wed, 10 Apr 2013 11:53:26 +0000 (12:53 +0100)]
UBUNTU: (debian) fix internal linkage for separated header packages

BugLink: http://bugs.launchpad.net/bugs/1165259
Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: (debian) Abort build on unresolved symbols
Stefan Bader [Tue, 9 Apr 2013 17:18:46 +0000 (19:18 +0200)]
UBUNTU: (debian) Abort build on unresolved symbols

When splitting the flavours of a module into the extras and base
package, we already run depmod. Unfortunately this only produces
warnings when modules in the base package have unresolved depen-
dencies.
This change will abort the build in that case, so we can fix things.

BugLink: http://bugs.launchpad.net/bugs/1166197
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
7 years agoUBUNTU: [debian] Specify python2.7 for perf tools build
Tim Gardner [Fri, 5 Apr 2013 15:06:41 +0000 (09:06 -0600)]
UBUNTU: [debian] Specify python2.7 for perf tools build

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [debian] do not use ../.$(series)-env file
Kamal Mostafa [Wed, 13 Mar 2013 22:20:04 +0000 (15:20 -0700)]
UBUNTU: [debian] do not use ../.$(series)-env file

Trying to use a file from ../ outside the tree seems like a bad idea, and
the series="oneiric" value here is stale by three releases now.  Kill this
apparently unused "feature".

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [debian] perf: NO_LIBPERL=1
Tim Gardner [Mon, 11 Feb 2013 17:54:27 +0000 (10:54 -0700)]
UBUNTU: [debian] perf: NO_LIBPERL=1

Disable building perl libraries until such time as they are
actually packaged.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [debian] perf: NO_LIBPYTHON=1
Tim Gardner [Mon, 11 Feb 2013 15:07:31 +0000 (08:07 -0700)]
UBUNTU: [debian] perf: NO_LIBPYTHON=1

Avoid a build dependency on python. Don't build python
support libraries since they aren't actually packaged.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [debian] Build extras package only for specific arches
Tim Gardner [Fri, 22 Mar 2013 12:53:48 +0000 (06:53 -0600)]
UBUNTU: [debian] Build extras package only for specific arches

An unwanted side effect of renaming arm omap4 to generic is that
the default rule is to create an extras package for flavours named 'generic'.
Furthermore, We stupidly tied the extras package logic to the flavour name 'generic'.

Defeat this side effect by specifying which architectures get an extras package
split, e.g., x86_64 and i386 in the arch specific make file.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [debian] Remove dangling symlink from headers package
Tim Gardner [Tue, 5 Feb 2013 15:42:23 +0000 (08:42 -0700)]
UBUNTU: [debian] Remove dangling symlink from headers package

BugLink: http://bugs.launchpad.net/bugs/1112442
Signed-off-by: Herton Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [debian] DTB: add support for multiple DTBs
Paolo Pisati [Wed, 9 Jan 2013 10:27:47 +0000 (10:27 +0000)]
UBUNTU: [debian] DTB: add support for multiple DTBs

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Acked-by: Andy Whitcroft <andy.whitcroft@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
7 years agoUBUNTU: [debian] Add macro to selectively disable building perf
Tim Gardner [Thu, 10 Jan 2013 19:41:32 +0000 (12:41 -0700)]
UBUNTU: [debian] Add macro to selectively disable building perf

Fixes FTBS until libaudit-dev is promoted to main.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [debian] insertchanges -- fix to work across major version changes
Andy Whitcroft [Thu, 3 Jan 2013 12:14:33 +0000 (12:14 +0000)]
UBUNTU: [debian] insertchanges -- fix to work across major version changes

Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: [debian] Moved scripts/fw-to-ihex.sh to debian/scripts/misc
Tim Gardner [Wed, 28 Nov 2012 15:17:41 +0000 (08:17 -0700)]
UBUNTU: [debian] Moved scripts/fw-to-ihex.sh to debian/scripts/misc

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [debian] find-obsolete-firmware: Use correct path
Tim Gardner [Mon, 3 Dec 2012 16:36:33 +0000 (09:36 -0700)]
UBUNTU: [debian] find-obsolete-firmware: Use correct path

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [debian] get-firmware: Filter new files through fwinfo
Tim Gardner [Wed, 28 Nov 2012 16:41:56 +0000 (09:41 -0700)]
UBUNTU: [debian] get-firmware: Filter new files through fwinfo

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [debian] hmake -j1
Tim Gardner [Tue, 27 Nov 2012 19:56:28 +0000 (12:56 -0700)]
UBUNTU: [debian] hmake -j1

The kernel makefile appears to have parallel dependency
problems for the install_headers target.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [debian] add an autopkgtest rebuild test
Andy Whitcroft [Wed, 21 Nov 2012 11:13:50 +0000 (11:13 +0000)]
UBUNTU: [debian] add an autopkgtest rebuild test

The plan here is for linux, gcc, binutils, and eglibc to all depends on
each other and to all have a rebuild test.  That way the entire set is
rebuild tested for any one in the set being uploaded.

BugLink: http://bugs.launchpad.net/bugs/1081500
Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: [debian] move build tests out of the way
Andy Whitcroft [Wed, 21 Nov 2012 11:01:09 +0000 (11:01 +0000)]
UBUNTU: [debian] move build tests out of the way

The new Debian autopkgtest system takes ownership of the debian/tests
directory, in such a way that is incompatible with our usage.  Move our
tests to debian/tests-build as they are build tests.

BugLink: http://bugs.launchpad.net/bugs/1081500
Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: [debian] add rebuild-test support for autopkgtest
Andy Whitcroft [Wed, 21 Nov 2012 10:00:25 +0000 (10:00 +0000)]
UBUNTU: [debian] add rebuild-test support for autopkgtest

Add support for the DEB_BUILD_OPTIONS rebuild-test which indicates this is
not a full build but a quick smoke test.  For us short circuit the build
and only make the first flavour on the assumption it is representative
of the others.

BugLink: http://bugs.launchpad.net/bugs/1081500
Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: [debian] script to detect obsolete firmware
Tim Gardner [Fri, 16 Nov 2012 16:24:10 +0000 (09:24 -0700)]
UBUNTU: [debian] script to detect obsolete firmware

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [debian] Use SRCPKGNAME as prefix for indep linux headers package
Ben Collins [Fri, 9 Nov 2012 19:17:12 +0000 (14:17 -0500)]
UBUNTU: [debian] Use SRCPKGNAME as prefix for indep linux headers package

[apw@canonical.com: forward ported to new cleaned up indep stack.]
Signed-off-by: Ben Collins <ben.c@servergy.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: [debian] Document binary-indep dependency chain
Tim Gardner [Fri, 9 Nov 2012 15:41:35 +0000 (08:41 -0700)]
UBUNTU: [debian] Document binary-indep dependency chain

Move some code around to directly reflect the dependency chain ordering.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [debian] Use dh_prep instead of 'dh_clean -k'
Tim Gardner [Fri, 9 Nov 2012 15:09:39 +0000 (08:09 -0700)]
UBUNTU: [debian] Use dh_prep instead of 'dh_clean -k'

dh_prep needs to be run only once at the root of the
binary-indep dependency chain, i.e., install-headers.

Similarly, dh_testdir and dh_testroot only need to be run once at
the root of the binary-indep dependency chain.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [debian] enforcer -- fix debugging output
Andy Whitcroft [Fri, 9 Nov 2012 15:55:10 +0000 (15:55 +0000)]
UBUNTU: [debian] enforcer -- fix debugging output

Fix up some confusingly wrong debugging output in the config checker.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: [debian] Add custom_override rule to allow for alternate kernel file/install
Ben Collins [Thu, 8 Nov 2012 20:01:31 +0000 (15:01 -0500)]
UBUNTU: [debian] Add custom_override rule to allow for alternate kernel file/install

On PowerPC, the flavours have different make targets and installable
images. For example, e500/e500mc use a target of uImage, since that is
the native format for U-Boot systems.

Signed-off-by: Ben Collins <ben.c@servergy.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [debian] Update armhf comments.
Tim Gardner [Fri, 9 Nov 2012 00:14:08 +0000 (19:14 -0500)]
UBUNTU: [debian] Update armhf comments.

https://lists.ubuntu.com/archives/ubuntu-devel/2012-November/036106.html

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [debian] drop manual headers copy
Andy Whitcroft [Thu, 1 Nov 2012 14:00:39 +0000 (14:00 +0000)]
UBUNTU: [debian] drop manual headers copy

Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: [debian] bootstrap: switch to the new DEB_BUILD_PROFILE
Andy Whitcroft [Thu, 1 Nov 2012 13:42:28 +0000 (13:42 +0000)]
UBUNTU: [debian] bootstrap: switch to the new DEB_BUILD_PROFILE

Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: [debian] do not fail secure copy on older kernels
Andy Whitcroft [Wed, 10 Oct 2012 16:58:24 +0000 (17:58 +0100)]
UBUNTU: [debian] do not fail secure copy on older kernels

Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: [debian] allow us to select which builds have uefi signed versions
Andy Whitcroft [Fri, 5 Oct 2012 08:43:00 +0000 (09:43 +0100)]
UBUNTU: [debian] allow us to select which builds have uefi signed versions

Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: [debian] we already have a valid src_pkg_name
Andy Whitcroft [Fri, 5 Oct 2012 08:51:51 +0000 (09:51 +0100)]
UBUNTU: [debian] we already have a valid src_pkg_name

Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: [debian] add custom upload for the kernel binary package
Andy Whitcroft [Thu, 20 Sep 2012 18:49:03 +0000 (19:49 +0100)]
UBUNTU: [debian] add custom upload for the kernel binary package

Pick out the kernel binaries and add them to a custom upload.  This upload
will trigger signing of the contained files which will later be pulled
into linux-*-signed packages.

Only include amd64 kernels as we only support EFI signed packages there.
Also ensure the kernel has a high enough interface version >= 0x020b
otherwise we may end up with an unsafe kernel loaded.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
7 years agoUBUNTU: [debian] note directory name changes
Tim Gardner [Thu, 18 Oct 2012 19:52:27 +0000 (20:52 +0100)]
UBUNTU: [debian] note directory name changes

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoUBUNTU: [debian] Initial debian and ubuntu directories
Leann Ogasawara [Sat, 13 Mar 2010 01:13:25 +0000 (17:13 -0800)]
UBUNTU: [debian] Initial debian and ubuntu directories

Ignore: yes
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
7 years agoLinux 4.10 v4.10
Linus Torvalds [Sun, 19 Feb 2017 22:34:00 +0000 (14:34 -0800)]
Linux 4.10

7 years agoFix missing sanity check in /dev/sg
Al Viro [Sun, 19 Feb 2017 07:15:27 +0000 (07:15 +0000)]
Fix missing sanity check in /dev/sg

What happens is that a write to /dev/sg is given a request with non-zero
->iovec_count combined with zero ->dxfer_len.  Or with ->dxferp pointing
to an array full of empty iovecs.

Having write permission to /dev/sg shouldn't be equivalent to the
ability to trigger BUG_ON() while holding spinlocks...

Found by Dmitry Vyukov and syzkaller.

[ The BUG_ON() got changed to a WARN_ON_ONCE(), but this fixes the
  underlying issue.  - Linus ]

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
7 years agoscsi: don't BUG_ON() empty DMA transfers
Johannes Thumshirn [Tue, 31 Jan 2017 09:16:00 +0000 (10:16 +0100)]
scsi: don't BUG_ON() empty DMA transfers

Don't crash the machine just because of an empty transfer. Use WARN_ON()
combined with returning an error.

Found by Dmitry Vyukov and syzkaller.

[ Changed to "WARN_ON_ONCE()". Al has a patch that should fix the root
  cause, but a BUG_ON() is not acceptable in any case, and a WARN_ON()
  might still be a cause of excessive log spamming.

  NOTE! If this warning ever triggers, we may end up leaking resources,
  since this doesn't bother to try to clean the command up. So this
  WARN_ON_ONCE() triggering does imply real problems. But BUG_ON() is
  much worse.

  People really need to stop using BUG_ON() for "this shouldn't ever
  happen". It makes pretty much any bug worse.     - Linus ]

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Cc: James Bottomley <jejb@linux.vnet.ibm.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
7 years agoipv6: release dst on error in ip6_dst_lookup_tail
Willem de Bruijn [Sun, 19 Feb 2017 00:00:45 +0000 (19:00 -0500)]
ipv6: release dst on error in ip6_dst_lookup_tail

If ip6_dst_lookup_tail has acquired a dst and fails the IPv4-mapped
check, release the dst before returning an error.

Fixes: ec5e3b0a1d41 ("ipv6: Inhibit IPv4-mapped src address on the wire.")
Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Sun, 19 Feb 2017 01:38:09 +0000 (17:38 -0800)]
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Arnd Bergmann:
 "Two more bugfixes that came in during this week:

   - a defconfig change to enable a vital driver used on some Qualcomm
     based phones. This was already queued for 4.11, but the maintainer
     asked to have it in 4.10 after all.

   - a regression fix for the reset controller framework, this got
     broken by a typo in the 4.10 merge window"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: multi_v7_defconfig: enable Qualcomm RPMCC
  reset: fix shared reset triggered_count decrement on error

7 years agoMerge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm
Linus Torvalds [Sun, 19 Feb 2017 01:36:15 +0000 (17:36 -0800)]
Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm

Pull ARM fixes from Russell King:
 "A couple of fixes from Kees concerning problems he spotted with our
  user access support"

* 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm:
  ARM: 8658/1: uaccess: fix zeroing of 64-bit get_user()
  ARM: 8657/1: uaccess: consistently check object sizes

7 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 19 Feb 2017 01:34:56 +0000 (17:34 -0800)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fix from Thomas Gleixner:
 "Make the build clean by working around yet another GCC stupidity"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/vm86: Fix unused variable warning if THP is disabled

7 years agoMerge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 19 Feb 2017 01:33:17 +0000 (17:33 -0800)]
Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull locking fix from Thomas Gleixner:
 "Move the futex init function to core initcall so user mode helper does
  not run into an uninitialized futex syscall"

* 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  futex: Move futex_init() to core_initcall

7 years agoMerge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 19 Feb 2017 01:30:36 +0000 (17:30 -0800)]
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fixes from Thomas Gleixner:
 "Two small fixes::

   - Prevent deadlock on the tick broadcast lock. Found and fixed by
     Mike.

   - Stop using printk() in the timekeeping debug code to prevent a
     deadlock against the scheduler"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  timekeeping: Use deferred printk() in debug code
  tick/broadcast: Prevent deadlock on tick_broadcast_lock

7 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Sun, 19 Feb 2017 01:29:00 +0000 (17:29 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David Miller:

 1) Fix leak in dpaa_eth error paths, from Dan Carpenter.

 2) Use after free when using IPV6_RECVPKTINFO, from Andrey Konovalov.

 3) fanout_release() cannot be invoked from atomic contexts, from Anoob
    Soman.

 4) Fix bogus attempt at lockdep annotation in IRDA.

 5) dev_fill_metadata_dst() can OOP on a NULL dst cache pointer, from
    Paolo Abeni.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  irda: Fix lockdep annotations in hashbin_delete().
  vxlan: fix oops in dev_fill_metadata_dst
  dccp: fix freeing skb too early for IPV6_RECVPKTINFO
  dpaa_eth: small leak on error
  packet: Do not call fanout_release from atomic contexts

7 years agoprintk: use rcuidle console tracepoint
Sergey Senozhatsky [Sat, 18 Feb 2017 11:42:54 +0000 (03:42 -0800)]
printk: use rcuidle console tracepoint

Use rcuidle console tracepoint because, apparently, it may be issued
from an idle CPU:

  hw-breakpoint: Failed to enable monitor mode on CPU 0.
  hw-breakpoint: CPU 0 failed to disable vector catch

  ===============================
  [ ERR: suspicious RCU usage.  ]
  4.10.0-rc8-next-20170215+ #119 Not tainted
  -------------------------------
  ./include/trace/events/printk.h:32 suspicious rcu_dereference_check() usage!

  other info that might help us debug this:

  RCU used illegally from idle CPU!
  rcu_scheduler_active = 2, debug_locks = 0
  RCU used illegally from extended quiescent state!
  2 locks held by swapper/0/0:
   #0:  (cpu_pm_notifier_lock){......}, at: [<c0237e2c>] cpu_pm_exit+0x10/0x54
   #1:  (console_lock){+.+.+.}, at: [<c01ab350>] vprintk_emit+0x264/0x474

  stack backtrace:
  CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.10.0-rc8-next-20170215+ #119
  Hardware name: Generic OMAP4 (Flattened Device Tree)
    console_unlock
    vprintk_emit
    vprintk_default
    printk
    reset_ctrl_regs
    dbg_cpu_pm_notify
    notifier_call_chain
    cpu_pm_exit
    omap_enter_idle_coupled
    cpuidle_enter_state
    cpuidle_enter_state_coupled
    do_idle
    cpu_startup_entry
    start_kernel

This RCU warning, however, is suppressed by lockdep_off() in printk().
lockdep_off() increments the ->lockdep_recursion counter and thus
disables RCU_LOCKDEP_WARN() and debug_lockdep_rcu_enabled(), which want
lockdep to be enabled "current->lockdep_recursion == 0".

Link: http://lkml.kernel.org/r/20170217015932.11898-1-sergey.senozhatsky@gmail.com
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Reported-by: Tony Lindgren <tony@atomide.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Russell King <rmk@armlinux.org.uk>
Cc: <stable@vger.kernel.org> [3.4+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
7 years agoARM: multi_v7_defconfig: enable Qualcomm RPMCC
Andy Gross [Mon, 2 Jan 2017 20:35:05 +0000 (14:35 -0600)]
ARM: multi_v7_defconfig: enable Qualcomm RPMCC

This patch enables the Qualcomm RPM based Clock Controller present on
A-family boards.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
7 years agoirda: Fix lockdep annotations in hashbin_delete().
David S. Miller [Fri, 17 Feb 2017 21:19:39 +0000 (16:19 -0500)]
irda: Fix lockdep annotations in hashbin_delete().

A nested lock depth was added to the hasbin_delete() code but it
doesn't actually work some well and results in tons of lockdep splats.

Fix the code instead to properly drop the lock around the operation
and just keep peeking the head of the hashbin queue.

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Tested-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-block
Linus Torvalds [Fri, 17 Feb 2017 21:01:58 +0000 (13:01 -0800)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block

Pull block layer fix from Jens Axboe:
 "A single fix for a lockdep splat reported by Thomas and Gabriel"

* 'for-linus' of git://git.kernel.dk/linux-block:
  cfq-iosched: don't call wbt_disable_default() with IRQs disabled

7 years agovxlan: fix oops in dev_fill_metadata_dst
Paolo Abeni [Fri, 17 Feb 2017 18:14:27 +0000 (19:14 +0100)]
vxlan: fix oops in dev_fill_metadata_dst

Since the commit 0c1d70af924b ("net: use dst_cache for vxlan device")
vxlan_fill_metadata_dst() calls vxlan_get_route() passing a NULL
dst_cache pointer, so the latter should explicitly check for
valid dst_cache ptr. Unfortunately the commit d71785ffc7e7 ("net: add
dst_cache to ovs vxlan lwtunnel") removed said check.

As a result is possible to trigger a null pointer access calling
vxlan_fill_metadata_dst(), e.g. with:

ovs-vsctl add-br ovs-br0
ovs-vsctl add-port ovs-br0 vxlan0 -- set interface vxlan0 \
type=vxlan options:remote_ip=192.168.1.1 \
options:key=1234 options:dst_port=4789 ofport_request=10
ip address add dev ovs-br0 172.16.1.2/24
ovs-vsctl set Bridge ovs-br0 ipfix=@i -- --id=@i create IPFIX \
targets=\"172.16.1.1:1234\" sampling=1
iperf -c 172.16.1.1 -u -l 1000 -b 10M -t 1 -p 1234

This commit addresses the issue passing to vxlan_get_route() the
dst_cache already available into the lwt info processed by
vxlan_fill_metadata_dst().

Fixes: d71785ffc7e7 ("net: add dst_cache to ovs vxlan lwtunnel")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agodccp: fix freeing skb too early for IPV6_RECVPKTINFO
Andrey Konovalov [Thu, 16 Feb 2017 16:22:46 +0000 (17:22 +0100)]
dccp: fix freeing skb too early for IPV6_RECVPKTINFO

In the current DCCP implementation an skb for a DCCP_PKT_REQUEST packet
is forcibly freed via __kfree_skb in dccp_rcv_state_process if
dccp_v6_conn_request successfully returns.

However, if IPV6_RECVPKTINFO is set on a socket, the address of the skb
is saved to ireq->pktopts and the ref count for skb is incremented in
dccp_v6_conn_request, so skb is still in use. Nevertheless, it gets freed
in dccp_rcv_state_process.

Fix by calling consume_skb instead of doing goto discard and therefore
calling __kfree_skb.

Similar fixes for TCP:

fb7e2399ec17f1004c0e0ccfd17439f8759ede01 [TCP]: skb is unexpectedly freed.
0aea76d35c9651d55bbaf746e7914e5f9ae5a25d tcp: SYN packets are now
simply consumed

Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agoMerge tag 'powerpc-4.10-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
Linus Torvalds [Fri, 17 Feb 2017 17:58:32 +0000 (09:58 -0800)]
Merge tag 'powerpc-4.10-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fix from Michael Ellerman:
 "One fix from Paul: we can not use the radix MMU under a hypervisor for
  now.

  Although the code checked if the processor supports radix, that is not
  sufficient"

* tag 'powerpc-4.10-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/64: Disable use of radix under a hypervisor

7 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Fri, 17 Feb 2017 17:56:34 +0000 (09:56 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input fix from Dmitry Torokhov:
 "Just a single change to Elan touchpad driver to recognize a new ACPI
  ID"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: elan_i2c - add ELAN0605 to the ACPI table

7 years agoMerge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Fri, 17 Feb 2017 17:53:59 +0000 (09:53 -0800)]
Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fix from Wolfram Sang:
 "I2C has a revert to fix a regression"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  Revert "i2c: designware: detect when dynamic tar update is possible"

7 years agoMerge tag 'mmc-v4.10-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
Linus Torvalds [Fri, 17 Feb 2017 17:52:33 +0000 (09:52 -0800)]
Merge tag 'mmc-v4.10-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC fix from Ulf Hansson:
 "Fix multi-bit bus width without high-speed mode for MMC"

* tag 'mmc-v4.10-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
  mmc: core: fix multi-bit bus width without high-speed mode

7 years agoMerge tag 'ntb-4.10-bugfixes' of git://github.com/jonmason/ntb
Linus Torvalds [Fri, 17 Feb 2017 17:51:05 +0000 (09:51 -0800)]
Merge tag 'ntb-4.10-bugfixes' of git://github.com/jonmason/ntb

Pull NTB bugfixes frfom Jon Mason:
 "NTB bug fixes to address a crash when unloading the ntb module, a DMA
  engine unmap leak, allowing the proper queue choice, and clearing the
  SKX irq bit"

* tag 'ntb-4.10-bugfixes' of git://github.com/jonmason/ntb:
  ntb: ntb_hw_intel: link_poll isn't clearing the pending status properly
  ntb_transport: Pick an unused queue
  ntb: ntb_perf missing dmaengine_unmap_put
  NTB: ntb_transport: fix debugfs_remove_recursive

7 years agodpaa_eth: small leak on error
Dan Carpenter [Thu, 16 Feb 2017 09:56:10 +0000 (12:56 +0300)]
dpaa_eth: small leak on error

This should be >= instead of > here.  It means that we don't increment
the free count enough so it becomes off by one.

Fixes: 9ad1a3749333 ("dpaa_eth: add support for DPAA Ethernet")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agoMerge tag 'reset-for-4.10-fixes' of https://git.pengutronix.de/git/pza/linux into...
Arnd Bergmann [Fri, 17 Feb 2017 16:25:15 +0000 (17:25 +0100)]
Merge tag 'reset-for-4.10-fixes' of https://git.pengutronix.de/git/pza/linux into fixes

Pull "Reset controller fixes for v4.10" from Philipp Zabel:

- Remove erroneous negation of the error check of the reset function
  to decrement trigger_count in the error case, not on success. This
  fixes shared resets to actually only trigger once, as intended.

* tag 'reset-for-4.10-fixes' of https://git.pengutronix.de/git/pza/linux:
  reset: fix shared reset triggered_count decrement on error

7 years agopacket: Do not call fanout_release from atomic contexts
Anoob Soman [Wed, 15 Feb 2017 20:25:39 +0000 (20:25 +0000)]
packet: Do not call fanout_release from atomic contexts

Commit 6664498280cf ("packet: call fanout_release, while UNREGISTERING a
netdev"), unfortunately, introduced the following issues.

1. calling mutex_lock(&fanout_mutex) (fanout_release()) from inside
rcu_read-side critical section. rcu_read_lock disables preemption, most often,
which prohibits calling sleeping functions.

[  ] include/linux/rcupdate.h:560 Illegal context switch in RCU read-side critical section!
[  ]
[  ] rcu_scheduler_active = 1, debug_locks = 0
[  ] 4 locks held by ovs-vswitchd/1969:
[  ]  #0:  (cb_lock){++++++}, at: [<ffffffff8158a6c9>] genl_rcv+0x19/0x40
[  ]  #1:  (ovs_mutex){+.+.+.}, at: [<ffffffffa04878ca>] ovs_vport_cmd_del+0x4a/0x100 [openvswitch]
[  ]  #2:  (rtnl_mutex){+.+.+.}, at: [<ffffffff81564157>] rtnl_lock+0x17/0x20
[  ]  #3:  (rcu_read_lock){......}, at: [<ffffffff81614165>] packet_notifier+0x5/0x3f0
[  ]
[  ] Call Trace:
[  ]  [<ffffffff813770c1>] dump_stack+0x85/0xc4
[  ]  [<ffffffff810c9077>] lockdep_rcu_suspicious+0x107/0x110
[  ]  [<ffffffff810a2da7>] ___might_sleep+0x57/0x210
[  ]  [<ffffffff810a2fd0>] __might_sleep+0x70/0x90
[  ]  [<ffffffff8162e80c>] mutex_lock_nested+0x3c/0x3a0
[  ]  [<ffffffff810de93f>] ? vprintk_default+0x1f/0x30
[  ]  [<ffffffff81186e88>] ? printk+0x4d/0x4f
[  ]  [<ffffffff816106dd>] fanout_release+0x1d/0xe0
[  ]  [<ffffffff81614459>] packet_notifier+0x2f9/0x3f0

2. calling mutex_lock(&fanout_mutex) inside spin_lock(&po->bind_lock).
"sleeping function called from invalid context"

[  ] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:620
[  ] in_atomic(): 1, irqs_disabled(): 0, pid: 1969, name: ovs-vswitchd
[  ] INFO: lockdep is turned off.
[  ] Call Trace:
[  ]  [<ffffffff813770c1>] dump_stack+0x85/0xc4
[  ]  [<ffffffff810a2f52>] ___might_sleep+0x202/0x210
[  ]  [<ffffffff810a2fd0>] __might_sleep+0x70/0x90
[  ]  [<ffffffff8162e80c>] mutex_lock_nested+0x3c/0x3a0
[  ]  [<ffffffff816106dd>] fanout_release+0x1d/0xe0
[  ]  [<ffffffff81614459>] packet_notifier+0x2f9/0x3f0

3. calling dev_remove_pack(&fanout->prot_hook), from inside
spin_lock(&po->bind_lock) or rcu_read-side critical-section. dev_remove_pack()
-> synchronize_net(), which might sleep.

[  ] BUG: scheduling while atomic: ovs-vswitchd/1969/0x00000002
[  ] INFO: lockdep is turned off.
[  ] Call Trace:
[  ]  [<ffffffff813770c1>] dump_stack+0x85/0xc4
[  ]  [<ffffffff81186274>] __schedule_bug+0x64/0x73
[  ]  [<ffffffff8162b8cb>] __schedule+0x6b/0xd10
[  ]  [<ffffffff8162c5db>] schedule+0x6b/0x80
[  ]  [<ffffffff81630b1d>] schedule_timeout+0x38d/0x410
[  ]  [<ffffffff810ea3fd>] synchronize_sched_expedited+0x53d/0x810
[  ]  [<ffffffff810ea6de>] synchronize_rcu_expedited+0xe/0x10
[  ]  [<ffffffff8154eab5>] synchronize_net+0x35/0x50
[  ]  [<ffffffff8154eae3>] dev_remove_pack+0x13/0x20
[  ]  [<ffffffff8161077e>] fanout_release+0xbe/0xe0
[  ]  [<ffffffff81614459>] packet_notifier+0x2f9/0x3f0

4. fanout_release() races with calls from different CPU.

To fix the above problems, remove the call to fanout_release() under
rcu_read_lock(). Instead, call __dev_remove_pack(&fanout->prot_hook) and
netdev_run_todo will be happy that &dev->ptype_specific list is empty. In order
to achieve this, I moved dev_{add,remove}_pack() out of fanout_{add,release} to
__fanout_{link,unlink}. So, call to {,__}unregister_prot_hook() will make sure
fanout->prot_hook is removed as well.

Fixes: 6664498280cf ("packet: call fanout_release, while UNREGISTERING a netdev")
Reported-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Anoob Soman <anoob.soman@citrix.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agoreset: fix shared reset triggered_count decrement on error
Jerome Brunet [Wed, 15 Feb 2017 18:15:51 +0000 (19:15 +0100)]
reset: fix shared reset triggered_count decrement on error

For a shared reset, when the reset is successful, the triggered_count is
incremented when trying to call the reset callback, so that another device
sharing the same reset line won't trigger it again. If the reset has not
been triggered successfully, the trigger_count should be decremented.

The code does the opposite, and decrements the trigger_count on success.
As a consequence, another device sharing the reset will be able to trigger
it again.

Fixed be removing negation in from of the error code of the reset function.

Fixes: 7da33a37b48f ("reset: allow using reset_control_reset with shared reset")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
7 years agontb: ntb_hw_intel: link_poll isn't clearing the pending status properly
Dave Jiang [Thu, 16 Feb 2017 23:22:36 +0000 (16:22 -0700)]
ntb: ntb_hw_intel: link_poll isn't clearing the pending status properly

On Skylake hardware, the link_poll isn't clearing the pending interrupt
bit.  Adding a new function for SKX that handles clearing of status bit the
right way.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Fixes: 783dfa6c ("ntb: Adding Skylake Xeon NTB support")
Signed-off-by: Jon Mason <jdmason@kudzu.us>
7 years agontb_transport: Pick an unused queue
Thomas VanSelus [Mon, 13 Feb 2017 22:46:26 +0000 (16:46 -0600)]
ntb_transport: Pick an unused queue

Fix typo causing ntb_transport_create_queue to select the first
queue every time, instead of using the next free queue.

Signed-off-by: Thomas VanSelus <tvanselus@xes-inc.com>
Signed-off-by: Aaron Sierra <asierra@xes-inc.com>
Acked-by: Allen Hubbe <Allen.Hubbe@dell.com>
Fixes: fce8a7bb5 ("PCI-Express Non-Transparent Bridge Support")
Signed-off-by: Jon Mason <jdmason@kudzu.us>
7 years agontb: ntb_perf missing dmaengine_unmap_put
Dave Jiang [Mon, 30 Jan 2017 21:21:17 +0000 (14:21 -0700)]
ntb: ntb_perf missing dmaengine_unmap_put

In the normal I/O execution path, ntb_perf is missing a call to
dmaengine_unmap_put() after submission. That causes us to leak
unmap objects.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Fixes: 8a7b6a77 ("ntb: ntb perf tool")
Signed-off-by: Jon Mason <jdmason@kudzu.us>
7 years agoNTB: ntb_transport: fix debugfs_remove_recursive
Allen Hubbe [Tue, 27 Dec 2016 22:57:04 +0000 (17:57 -0500)]
NTB: ntb_transport: fix debugfs_remove_recursive

The call to debugfs_remove_recursive(qp->debugfs_dir) of the sub-level
directory must not be later than
debugfs_remove_recursive(nt_debugfs_dir) of the top-level directory.
Otherwise, the sub-level directory will not exist, and it would be
invalid (panic) to attempt to remove it.  This removes the top-level
directory last, after sub-level directories have been cleaned up.

Signed-off-by: Allen Hubbe <Allen.Hubbe@dell.com>
Fixes: e26a5843f ("NTB: Split ntb_hw_intel and ntb_transport drivers")
Signed-off-by: Jon Mason <jdmason@kudzu.us>
7 years agoMerge tag 'drm-fixes-for-v4.10-final' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Fri, 17 Feb 2017 02:44:38 +0000 (18:44 -0800)]
Merge tag 'drm-fixes-for-v4.10-final' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Just two last minute fixes, one for DP MST oopses and one for a radeon
  regression"

* tag 'drm-fixes-for-v4.10-final' of git://people.freedesktop.org/~airlied/linux:
  drm/radeon: Use mode h/vdisplay fields to hide out of bounds HW cursor
  drm/dp/mst: fix kernel oops when turning off secondary monitor

7 years agoMerge branch 'drm-fixes-4.10' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Fri, 17 Feb 2017 01:13:17 +0000 (11:13 +1000)]
Merge branch 'drm-fixes-4.10' of git://people.freedesktop.org/~agd5f/linux into drm-fixes

One regression fix for interlaced modes on radeon

* 'drm-fixes-4.10' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon: Use mode h/vdisplay fields to hide out of bounds HW cursor

7 years agoRevert "nohz: Fix collision between tick and other hrtimers"
Linus Torvalds [Thu, 16 Feb 2017 20:19:18 +0000 (12:19 -0800)]
Revert "nohz: Fix collision between tick and other hrtimers"

This reverts commit 24b91e360ef521a2808771633d76ebc68bd5604b and commit
7bdb59f1ad47 ("tick/nohz: Fix possible missing clock reprog after tick
soft restart") that depends on it,

Pavel reports that it causes occasional boot hangs for him that seem to
depend on just how the machine was booted.  In particular, his machine
hangs at around the PCI fixups of the EHCI USB host controller, but only
hangs from cold boot, not from a warm boot.

Thomas Gleixner suspecs it's a CPU hotplug interaction, particularly
since Pavel also saw suspend/resume issues that seem to be related.
We're reverting for now while trying to figure out the root cause.

Reported-bisected-and-tested-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Wanpeng Li <wanpeng.li@hotmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org # reverted commits were marked for stable
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
7 years agoMerge tag 'media/v4.10-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Thu, 16 Feb 2017 18:22:41 +0000 (10:22 -0800)]
Merge tag 'media/v4.10-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media fix from Mauro Carvalho Chehab:
 "A regression fix that makes the Siano driver to work again after the
  CONFIG_VMAP_STACK change"

* tag 'media/v4.10-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] siano: make it work again with CONFIG_VMAP_STACK

7 years agovfs: fix uninitialized flags in splice_to_pipe()
Miklos Szeredi [Thu, 16 Feb 2017 16:49:02 +0000 (17:49 +0100)]
vfs: fix uninitialized flags in splice_to_pipe()

Flags (PIPE_BUF_FLAG_PACKET, PIPE_BUF_FLAG_GIFT) could remain on the
unused part of the pipe ring buffer.  Previously splice_to_pipe() left
the flags value alone, which could result in incorrect behavior.

Uninitialized flags appears to have been there from the introduction of
the splice syscall.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Cc: <stable@vger.kernel.org> # 2.6.17+
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
7 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi...
Linus Torvalds [Thu, 16 Feb 2017 17:05:34 +0000 (09:05 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse

Pull fuse fixes from Miklos Szeredi:
 "Fix a use after free bug introduced in 4.2 and using an uninitialized
  value introduced in 4.9"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
  fuse: fix uninitialized flags in pipe_buffer
  fuse: fix use after free issue in fuse_dev_do_read()

7 years agoMerge tag 'pci-v4.10-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
Linus Torvalds [Thu, 16 Feb 2017 17:03:37 +0000 (09:03 -0800)]
Merge tag 'pci-v4.10-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI fix from Bjorn Helgaas:
 "Add back pcie_pme_remove() so we free the IRQ when removing PCIe port
  devices; previously the leaked IRQ caused an MSI BUG_ON"

* tag 'pci-v4.10-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI/PME: Restore pcie_pme_driver.remove

7 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Thu, 16 Feb 2017 16:37:18 +0000 (08:37 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David Miller:

 1) In order to avoid problems in the future, make cgroup bpf overriding
    explicit using BPF_F_ALLOW_OVERRIDE. From Alexei Staovoitov.

 2) LLC sets skb->sk without proper skb->destructor and this explodes,
    fix from Eric Dumazet.

 3) Make sure when we have an ipv4 mapped source address, the
    destination is either also an ipv4 mapped address or
    ipv6_addr_any(). Fix from Jonathan T. Leighton.

 4) Avoid packet loss in fec driver by programming the multicast filter
    more intelligently. From Rui Sousa.

 5) Handle multiple threads invoking fanout_add(), fix from Eric
    Dumazet.

 6) Since we can invoke the TCP input path in process context, without
    BH being disabled, we have to accomodate that in the locking of the
    TCP probe. Also from Eric Dumazet.

 7) Fix erroneous emission of NETEVENT_DELAY_PROBE_TIME_UPDATE when we
    aren't even updating that sysctl value. From Marcus Huewe.

 8) Fix endian bugs in ibmvnic driver, from Thomas Falcon.

[ This is the second version of the pull that reverts the nested
  rhashtable changes that looked a bit too scary for this late in the
  release  - Linus ]

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (27 commits)
  rhashtable: Revert nested table changes.
  ibmvnic: Fix endian errors in error reporting output
  ibmvnic: Fix endian error when requesting device capabilities
  net: neigh: Fix netevent NETEVENT_DELAY_PROBE_TIME_UPDATE notification
  net: xilinx_emaclite: fix freezes due to unordered I/O
  net: xilinx_emaclite: fix receive buffer overflow
  bpf: kernel header files need to be copied into the tools directory
  tcp: tcp_probe: use spin_lock_bh()
  uapi: fix linux/if_pppol2tp.h userspace compilation errors
  packet: fix races in fanout_add()
  ibmvnic: Fix initial MTU settings
  net: ethernet: ti: cpsw: fix cpsw assignment in resume
  kcm: fix a null pointer dereference in kcm_sendmsg()
  net: fec: fix multicast filtering hardware setup
  ipv6: Handle IPv4-mapped src to in6addr_any dst.
  ipv6: Inhibit IPv4-mapped src address on the wire.
  net/mlx5e: Disable preemption when doing TC statistics upcall
  rhashtable: Add nested tables
  tipc: Fix tipc_sk_reinit race conditions
  gfs2: Use rhashtable walk interface in glock_hash_walk
  ...

7 years agodrm/radeon: Use mode h/vdisplay fields to hide out of bounds HW cursor
Michel Dänzer [Wed, 15 Feb 2017 02:28:45 +0000 (11:28 +0900)]
drm/radeon: Use mode h/vdisplay fields to hide out of bounds HW cursor

The crtc_h/vdisplay fields may not match the CRTC viewport dimensions
with special modes such as interlaced ones.

Fixes the HW cursor disappearing in the bottom half of the screen with
interlaced modes.

Fixes: 6b16cf7785a4 ("drm/radeon: Hide the HW cursor while it's out of bounds")
Cc: stable@vger.kernel.org
Reported-by: Ashutosh Kumar <ashutosh.kumar@amd.com>
Tested-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agoARM: 8658/1: uaccess: fix zeroing of 64-bit get_user()
Kees Cook [Thu, 16 Feb 2017 00:44:37 +0000 (01:44 +0100)]
ARM: 8658/1: uaccess: fix zeroing of 64-bit get_user()

The 64-bit get_user() wasn't clearing the high word due to a typo in the
error handler. The exception handler entry was already correct, though.
Noticed during recent usercopy test additions in lib/test_user_copy.c.

Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: stable@vger.kernel.org
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>