Linux kernel for uConsole
  • C 97.1%
  • Assembly 1.8%
  • Shell 0.4%
  • Makefile 0.3%
  • Python 0.2%
Find a file
Wenwen Wang 9575ba61ba sound: fix a memory leak bug
commit c7cd7c748a upstream.

In sound_insert_unit(), the controlling structure 's' is allocated through
kmalloc(). Then it is added to the sound driver list by invoking
__sound_insert_unit(). Later on, if __register_chrdev() fails, 's' is
removed from the list through __sound_remove_unit(). If 'index' is not less
than 0, -EBUSY is returned to indicate the error. However, 's' is not
deallocated on this execution path, leading to a memory leak bug.

To fix the above issue, free 's' before -EBUSY is returned.

Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-16 10:12:39 +02:00
arch x86/speculation/swapgs: Exclude ATOMs from speculation through SWAPGS 2019-08-06 19:06:58 +02:00
block block, scsi: Change the preempt-only flag into a counter 2019-08-04 09:30:57 +02:00
certs
crypto
Documentation Documentation: Add swapgs description to the Spectre v1 documentation 2019-08-06 19:06:58 +02:00
drivers usb: iowarrior: fix deadlock on disconnect 2019-08-16 10:12:38 +02:00
firmware
fs compat_ioctl: pppoe: fix PPPOEIOCSFWD handling 2019-08-09 17:52:34 +02:00
include crypto: ccp - Add support for valid authsize values less than 16 2019-08-16 10:12:38 +02:00
init
ipc ipc/mqueue.c: only perform resource calculation if user valid 2019-08-06 19:06:52 +02:00
kernel cgroup: Fix css_task_iter_advance_css_set() cset skip condition 2019-08-09 17:52:35 +02:00
lib lib/test_string.c: avoid masking memset16/32/64 failures 2019-08-06 19:06:51 +02:00
LICENSES
mm mm: vmscan: check if mem cgroup is disabled or not before calling memcg slab shrinker 2019-08-06 19:06:54 +02:00
net compat_ioctl: pppoe: fix PPPOEIOCSFWD handling 2019-08-09 17:52:34 +02:00
samples
scripts kconfig: Clear "written" flag to avoid data loss 2019-08-06 19:06:53 +02:00
security selinux: fix memory leak in policydb_init() 2019-08-06 19:06:54 +02:00
sound sound: fix a memory leak bug 2019-08-16 10:12:39 +02:00
tools objtool: Support GCC 9 cold subfunction naming scheme 2019-08-06 19:06:57 +02:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile Linux 4.19.66 2019-08-09 17:52:35 +02:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.