No description
Find a file
Paul Moore ab44f7317c cipso,calipso: resolve a number of problems with the DOI refcounts
commit ad5d07f4a9 upstream.

The current CIPSO and CALIPSO refcounting scheme for the DOI
definitions is a bit flawed in that we:

1. Don't correctly match gets/puts in netlbl_cipsov4_list().
2. Decrement the refcount on each attempt to remove the DOI from the
   DOI list, only removing it from the list once the refcount drops
   to zero.

This patch fixes these problems by adding the missing "puts" to
netlbl_cipsov4_list() and introduces a more conventional, i.e.
not-buggy, refcounting mechanism to the DOI definitions.  Upon the
addition of a DOI to the DOI list, it is initialized with a refcount
of one, removing a DOI from the list removes it from the list and
drops the refcount by one; "gets" and "puts" behave as expected with
respect to refcounts, increasing and decreasing the DOI's refcount by
one.

Fixes: b1edeb1023 ("netlabel: Replace protocol/NetLabel linking with refrerence counts")
Fixes: d7cce01504 ("netlabel: Add support for removing a CALIPSO DOI.")
Reported-by: syzbot+9ec037722d2603a9f52e@syzkaller.appspotmail.com
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-17 16:34:29 +01:00
arch Xen/gnttab: handle p2m update errors on a per-slot basis 2021-03-07 11:27:45 +01:00
block blk-settings: align max_sectors on "logical_block_size" boundary 2021-03-03 18:22:50 +01:00
certs certs: Fix blacklist flag type confusion 2021-03-03 18:22:46 +01:00
crypto crypto: ecdh_helper - Ensure 'len >= secret.len' in decode_key() 2021-03-03 18:22:43 +01:00
Documentation sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs output 2021-03-07 11:27:45 +01:00
drivers net: usb: qmi_wwan: allow qmimux add/del with master up 2021-03-17 16:34:29 +01:00
firmware Fix built-in early-load Intel microcode alignment 2020-01-23 08:20:30 +01:00
fs cifs: return proper error code in statfs(2) 2021-03-17 16:34:28 +01:00
include can: skb: can_skb_set_owner(): fix ref counting if socket was closed before setting skb ownership 2021-03-17 16:34:28 +01:00
init printk: reduce LOG_BUF_SHIFT range for H8300 2020-11-05 11:06:55 +01:00
ipc ipc/util.c: sysvipc_find_ipc() incorrectly updates position index 2020-05-20 08:17:07 +02:00
kernel printk: fix deadlock when kernel panic 2021-03-03 18:22:55 +01:00
lib lib/string: Add strscpy_pad() function 2021-02-23 14:00:30 +01:00
mm Revert "mm, slub: consider rest of partial list if acquire_slab() fails" 2021-03-17 16:34:28 +01:00
net cipso,calipso: resolve a number of problems with the DOI refcounts 2021-03-17 16:34:29 +01:00
samples samples: bpf: Fix lwt_len_hist reusing previous BPF map 2020-12-29 13:46:56 +01:00
scripts scripts/recordmcount.{c,pl}: support -ffunction-sections .text.* section names 2021-03-17 16:34:28 +01:00
security smackfs: restrict bytes count in smackfs write functions 2021-03-07 11:27:43 +01:00
sound ALSA: ctxfi: cthw20k2: fix mask on conf to allow 4 bits 2021-03-11 13:51:04 +01:00
tools usbip: tools: fix build error for multiple definition 2021-03-11 13:51:04 +01:00
usr initramfs: restore default compression behavior 2020-04-13 10:34:19 +02:00
virt kvm: check tlbs_dirty directly 2021-02-23 14:00:34 +01:00
.cocciconfig
.get_maintainer.ignore
.gitattributes .gitattributes: set git diff driver for C source code files 2016-10-07 18:46:30 -07:00
.gitignore kbuild: rpm-pkg: keep spec file until make mrproper 2018-02-13 10:19:46 +01:00
.mailmap .mailmap: Add Maciej W. Rozycki's Imagination e-mail address 2017-11-10 12:16:15 -08:00
COPYING
CREDITS MAINTAINERS: update TPM driver infrastructure changes 2017-11-09 17:58:40 -08:00
Kbuild License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
MAINTAINERS MAINTAINERS: Update drm/i915 bug filing URL 2020-02-28 16:36:12 +01:00
Makefile Linux 4.14.225 2021-03-11 13:51:06 +01:00
README README: add a new README file, pointing to the Documentation/ 2016-10-24 08:12:35 -02:00

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

This file was moved to Documentation/admin-guide/README.rst

Please notice that there are several guides for kernel developers and users.
These guides can be rendered in a number of formats, like HTML and PDF.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.

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.