integ/kernel/kernel-std/centos/patches/fix-CentOS-7.6-upgrade-compile-error.patch
Robin Lu 38c184f1b4 Update kernel-std patches for kernel upgrade to version 1062.1.2
This upgrade fixes the CVEs listed below. We refresh the patches
against the new kernel source.
The patch 15 is now included in new version, so I drop it
in the new patch.

CVE bug: CVE-2019-11810:kernel: a NULL pointer dereference in
drivers/scsi/megaraid/megaraid_sas_base.c leading to DoS
CVE bug: CVE-2019-11811: kernel: use-after-free in IPMI Edit
CVE bug: CVE-2019-14835: kernel: vhost-net: guest to host kernel
escape during migration

Closes-Bug: 1849206
Closes-Bug: 1849209
Closes-Bug: 1847817

Change-Id: I217cf8684e31dacea627c33462e5e4b6e089c38f
Depends-On: https://review.opendev.org/#/c/695355/
Signed-off-by: Robin Lu <bin1.lu@intel.com>
2020-01-02 06:27:12 +00:00

67 lines
2.5 KiB
Diff

From 84a6fef49cb58415d9790947e65c34b09d99d356 Mon Sep 17 00:00:00 2001
From: "Martin, Chen" <haochuan.z.chen@intel.com>
Date: Mon, 14 Jan 2019 19:58:07 +0000
Subject: [PATCH] fix CentOS 7.6 upgrade compile error
1, fix improper call of part_round_stats and part_inc_in_flight
in drbd_req.c, as CONFIG_BLK_DEV_DRBD=m defined in
kernel-3.10.0-x86_64.config.tis_extra
2, add explicit declaration for trace_bpf_int_jit_compile,
trace_bpf_jit_compile, trace_bpf_jit_free, if pmd_read_atomic not
defined
Signed-off-by: Martin, Chen <haochuan.z.chen@intel.com>
---
drivers/block/drbd/drbd_req.c | 8 ++++----
include/linux/filter.h | 3 +++
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index a6f13f7..cbd0a49 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -39,12 +39,12 @@ static void _drbd_start_io_acct(struct drbd_conf *mdev, struct drbd_request *req
const int rw = bio_data_dir(req->master_bio);
int cpu;
cpu = part_stat_lock();
- part_round_stats(cpu, &mdev->vdisk->part0);
+ part_round_stats(mdev->rq_queue, cpu, &mdev->vdisk->part0);
part_stat_inc(cpu, &mdev->vdisk->part0, ios[rw]);
part_stat_add(cpu, &mdev->vdisk->part0, sectors[rw], req->i.size >> 9);
(void) cpu; /* The macro invocations above want the cpu argument, I do not like
the compiler warning about cpu only assigned but never used... */
- part_inc_in_flight(&mdev->vdisk->part0, rw);
+ part_inc_in_flight(mdev->rq_queue, &mdev->vdisk->part0, rw);
part_stat_unlock();
}
@@ -56,8 +56,8 @@ static void _drbd_end_io_acct(struct drbd_conf *mdev, struct drbd_request *req)
int cpu;
cpu = part_stat_lock();
part_stat_add(cpu, &mdev->vdisk->part0, ticks[rw], duration);
- part_round_stats(cpu, &mdev->vdisk->part0);
- part_dec_in_flight(&mdev->vdisk->part0, rw);
+ part_round_stats(mdev->rq_queue, cpu, &mdev->vdisk->part0);
+ part_dec_in_flight(mdev->rq_queue, &mdev->vdisk->part0, rw);
part_stat_unlock();
}
diff --git a/include/linux/filter.h b/include/linux/filter.h
index cddbb31..15ce55f 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -763,6 +763,9 @@ void bpf_prog_kallsyms_add(struct bpf_prog *fp);
void bpf_prog_kallsyms_del(struct bpf_prog *fp);
#else /* CONFIG_BPF_JIT */
+struct bpf_prog * __weak trace_bpf_int_jit_compile(struct bpf_prog *prog);
+void __weak trace_bpf_jit_compile(struct bpf_prog *prog);
+void __weak trace_bpf_jit_free(struct bpf_prog *fp);
static inline bool bpf_prog_ebpf_jited(const struct bpf_prog *fp)
{
--
1.8.3.1