blkparse: skip check_cpu_map with pipe input
authorJeff Mahoney <jeffm@suse.com>
Thu, 21 Oct 2021 14:16:19 +0000 (10:16 -0400)
committerJens Axboe <axboe@kernel.dk>
Thu, 21 Oct 2021 14:45:16 +0000 (08:45 -0600)
commitac416ab67cd7add0089c3bc668427e6b909eb59e
treef38e155dbf743ebab22dfbac4ddeb037789b3480
parent3a1b1366d30375cdb0f5b299df4edda0c8ba3bcc
blkparse: skip check_cpu_map with pipe input

When we're using pipe input, we don't track online CPUs and don't have a
cpu_map.  When we start to show entries, check_sequence will be invoked.
If the first entry isn't sequence 1 (perhaps it's been dropped?), we'll
proceed to check_cpu_map.  Since we haven't tracked online CPUs,
pdi->cpu_map_max will be 0 and we'll do a malloc(0).  Then we'll start
setting bits corresponding to CPU numbers in memory we don't own.  Since
there's nothing to check here, let's skip it on pipe input.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
blkparse.c