+++ /dev/null
-From 638f036a2ae802a8267b15e23733500fb5cfa14b Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 13 May 2020 10:20:26 -0300
-Subject: perf parse-events: Fix incorrect conversion of 'if () free()' to
- 'zfree()'
-
-From: Arnaldo Carvalho de Melo <acme@redhat.com>
-
-[ Upstream commit 7fcdccd4237724931d9773d1e3039bfe053a6f52 ]
-
-When applying a patch by Ian I incorrectly converted to zfree() an
-expression that involved testing some other struct member, not the one
-being freed, which lead to bugs reproduceable by:
-
- $ perf stat -e i/bs,tsc,L2/o sleep 1
- WARNING: multiple event parsing errors
- Segmentation fault (core dumped)
- $
-
-Fix it by restoring the test for pos->free_str before freeing
-pos->val.str, but continue using zfree(&pos->val.str) to set that member
-to NULL after freeing it.
-
-Reported-by: Ian Rogers <irogers@google.com>
-Fixes: e8dfb81838b1 ("perf parse-events: Fix memory leaks found on parse_events")
-Cc: Adrian Hunter <adrian.hunter@intel.com>
-Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
-Cc: Andi Kleen <ak@linux.intel.com>
-Cc: clang-built-linux@googlegroups.com
-Cc: Jiri Olsa <jolsa@kernel.org>
-Cc: Leo Yan <leo.yan@linaro.org>
-Cc: Mark Rutland <mark.rutland@arm.com>
-Cc: Namhyung Kim <namhyung@kernel.org>
-Cc: Peter Zijlstra <peterz@infradead.org>
-Cc: Stephane Eranian <eranian@google.com>
-Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/perf/util/parse-events.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
-index 2733cdfdf04c6..ba973bdfaa657 100644
---- a/tools/perf/util/parse-events.c
-+++ b/tools/perf/util/parse-events.c
-@@ -1258,7 +1258,8 @@ static int __parse_events_add_pmu(struct parse_events_state *parse_state,
-
- list_for_each_entry_safe(pos, tmp, &config_terms, list) {
- list_del_init(&pos->list);
-- zfree(&pos->val.str);
-+ if (pos->free_str)
-+ zfree(&pos->val.str);
- free(pos);
- }
- return -EINVAL;
---
-2.25.1
-
usb-dwc3-increase-timeout-for-cmdact-cleared-by-devi.patch
btrfs-don-t-force-read-only-after-error-in-drop-snap.patch
vfio-pci-fix-memory-leaks-of-eventfd-ctx.patch
-perf-parse-events-fix-incorrect-conversion-of-if-fre.patch
perf-util-fix-memory-leak-of-prefix_if_not_in.patch
perf-kcore_copy-fix-module-map-when-there-are-no-mod.patch
mtd-rawnand-omap_elm-fix-runtime-pm-imbalance-on-err.patch
+++ /dev/null
-From c9afe7992d1925265f5b454d09df79bfdf2b98b1 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 13 May 2020 10:20:26 -0300
-Subject: perf parse-events: Fix incorrect conversion of 'if () free()' to
- 'zfree()'
-
-From: Arnaldo Carvalho de Melo <acme@redhat.com>
-
-[ Upstream commit 7fcdccd4237724931d9773d1e3039bfe053a6f52 ]
-
-When applying a patch by Ian I incorrectly converted to zfree() an
-expression that involved testing some other struct member, not the one
-being freed, which lead to bugs reproduceable by:
-
- $ perf stat -e i/bs,tsc,L2/o sleep 1
- WARNING: multiple event parsing errors
- Segmentation fault (core dumped)
- $
-
-Fix it by restoring the test for pos->free_str before freeing
-pos->val.str, but continue using zfree(&pos->val.str) to set that member
-to NULL after freeing it.
-
-Reported-by: Ian Rogers <irogers@google.com>
-Fixes: e8dfb81838b1 ("perf parse-events: Fix memory leaks found on parse_events")
-Cc: Adrian Hunter <adrian.hunter@intel.com>
-Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
-Cc: Andi Kleen <ak@linux.intel.com>
-Cc: clang-built-linux@googlegroups.com
-Cc: Jiri Olsa <jolsa@kernel.org>
-Cc: Leo Yan <leo.yan@linaro.org>
-Cc: Mark Rutland <mark.rutland@arm.com>
-Cc: Namhyung Kim <namhyung@kernel.org>
-Cc: Peter Zijlstra <peterz@infradead.org>
-Cc: Stephane Eranian <eranian@google.com>
-Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/perf/util/parse-events.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
-index cce96b05d24c9..426f1984c143e 100644
---- a/tools/perf/util/parse-events.c
-+++ b/tools/perf/util/parse-events.c
-@@ -1287,7 +1287,8 @@ int parse_events_add_pmu(struct parse_events_state *parse_state,
-
- list_for_each_entry_safe(pos, tmp, &config_terms, list) {
- list_del_init(&pos->list);
-- zfree(&pos->val.str);
-+ if (pos->free_str)
-+ zfree(&pos->val.str);
- free(pos);
- }
- return -EINVAL;
---
-2.25.1
-
usb-dwc3-increase-timeout-for-cmdact-cleared-by-devi.patch
btrfs-don-t-force-read-only-after-error-in-drop-snap.patch
vfio-pci-fix-memory-leaks-of-eventfd-ctx.patch
-perf-parse-events-fix-incorrect-conversion-of-if-fre.patch
perf-evsel-fix-2-memory-leaks.patch
perf-trace-fix-the-selection-for-architectures-to-ge.patch
perf-stat-fix-duration_time-value-for-higher-interva.patch
+++ /dev/null
-From fa47da5df18e10b9a3aecee4ca9e3980e53c5ffa Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 9 Apr 2020 11:56:02 +0530
-Subject: serial: uartps: Wait for tx_empty in console setup
-
-From: Raviteja Narayanam <raviteja.narayanam@xilinx.com>
-
-[ Upstream commit 42e11948ddf68b9f799cad8c0ddeab0a39da33e8 ]
-
-On some platforms, the log is corrupted while console is being
-registered. It is observed that when set_termios is called, there
-are still some bytes in the FIFO to be transmitted.
-
-So, wait for tx_empty inside cdns_uart_console_setup before calling
-set_termios.
-
-Signed-off-by: Raviteja Narayanam <raviteja.narayanam@xilinx.com>
-Reviewed-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
-Link: https://lore.kernel.org/r/1586413563-29125-2-git-send-email-raviteja.narayanam@xilinx.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/tty/serial/xilinx_uartps.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
-index 06efcef1b4953..5b4469098888a 100644
---- a/drivers/tty/serial/xilinx_uartps.c
-+++ b/drivers/tty/serial/xilinx_uartps.c
-@@ -1152,6 +1152,7 @@ static int cdns_uart_console_setup(struct console *co, char *options)
- int bits = 8;
- int parity = 'n';
- int flow = 'n';
-+ unsigned long time_out;
-
- if (co->index < 0 || co->index >= CDNS_UART_NR_PORTS)
- return -EINVAL;
-@@ -1165,6 +1166,13 @@ static int cdns_uart_console_setup(struct console *co, char *options)
- if (options)
- uart_parse_options(options, &baud, &parity, &bits, &flow);
-
-+ /* Wait for tx_empty before setting up the console */
-+ time_out = jiffies + usecs_to_jiffies(TX_TIMEOUT);
-+
-+ while (time_before(jiffies, time_out) &&
-+ cdns_uart_tx_empty(port) != TIOCSER_TEMT)
-+ cpu_relax();
-+
- return uart_set_options(port, co, baud, parity, bits, flow);
- }
-
---
-2.25.1
-
alsa-usb-audio-fix-case-when-usb-midi-interface-has-.patch
mm-filemap.c-clear-page-error-before-actual-read.patch
mm-mmap.c-initialize-align_offset-explicitly-for-vm_.patch
-serial-uartps-wait-for-tx_empty-in-console-setup.patch
kvm-remove-create_irqchip-set_pit2-race.patch
bdev-reduce-time-holding-bd_mutex-in-sync-in-blkdev_.patch
drivers-char-tlclk.c-avoid-data-race-between-init-an.patch
+++ /dev/null
-From 8dbb125df1a9a3ef386611634ed3c850771f5e93 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 13 May 2020 10:20:26 -0300
-Subject: perf parse-events: Fix incorrect conversion of 'if () free()' to
- 'zfree()'
-
-From: Arnaldo Carvalho de Melo <acme@redhat.com>
-
-[ Upstream commit 7fcdccd4237724931d9773d1e3039bfe053a6f52 ]
-
-When applying a patch by Ian I incorrectly converted to zfree() an
-expression that involved testing some other struct member, not the one
-being freed, which lead to bugs reproduceable by:
-
- $ perf stat -e i/bs,tsc,L2/o sleep 1
- WARNING: multiple event parsing errors
- Segmentation fault (core dumped)
- $
-
-Fix it by restoring the test for pos->free_str before freeing
-pos->val.str, but continue using zfree(&pos->val.str) to set that member
-to NULL after freeing it.
-
-Reported-by: Ian Rogers <irogers@google.com>
-Fixes: e8dfb81838b1 ("perf parse-events: Fix memory leaks found on parse_events")
-Cc: Adrian Hunter <adrian.hunter@intel.com>
-Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
-Cc: Andi Kleen <ak@linux.intel.com>
-Cc: clang-built-linux@googlegroups.com
-Cc: Jiri Olsa <jolsa@kernel.org>
-Cc: Leo Yan <leo.yan@linaro.org>
-Cc: Mark Rutland <mark.rutland@arm.com>
-Cc: Namhyung Kim <namhyung@kernel.org>
-Cc: Peter Zijlstra <peterz@infradead.org>
-Cc: Stephane Eranian <eranian@google.com>
-Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- tools/perf/util/parse-events.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
-index f3b10b8449010..ca9006cd4bf18 100644
---- a/tools/perf/util/parse-events.c
-+++ b/tools/perf/util/parse-events.c
-@@ -1370,7 +1370,8 @@ int parse_events_add_pmu(struct parse_events_state *parse_state,
-
- list_for_each_entry_safe(pos, tmp, &config_terms, list) {
- list_del_init(&pos->list);
-- zfree(&pos->val.str);
-+ if (pos->free_str)
-+ zfree(&pos->val.str);
- free(pos);
- }
- return -EINVAL;
---
-2.25.1
-
gpio-rcar-fix-runtime-pm-imbalance-on-error.patch
vfio-pci-fix-memory-leaks-of-eventfd-ctx.patch
kvm-ppc-book3s-hv-close-race-with-page-faults-around.patch
-perf-parse-events-fix-incorrect-conversion-of-if-fre.patch
perf-evsel-fix-2-memory-leaks.patch
perf-trace-fix-the-selection-for-architectures-to-ge.patch
perf-stat-fix-duration_time-value-for-higher-interva.patch