diff options
| author | Jan Beulich <jbeulich@suse.com> | 2011-10-21 09:45:24 +0200 |
|---|---|---|
| committer | Jan Beulich <jbeulich@suse.com> | 2011-10-21 09:45:24 +0200 |
| commit | 47e0eeb7abc98e04fffd7aaa2158a28106048c44 (patch) | |
| tree | 5a685e68a284fb535f2db731f86dfa6700bc899c /tools/blktap2/vhd/lib/vhd-util-snapshot.c | |
| parent | c567ffce5c30d41e46e6c93b6aacf11ed62989cc (diff) | |
| download | xen-47e0eeb7abc98e04fffd7aaa2158a28106048c44.tar.gz xen-47e0eeb7abc98e04fffd7aaa2158a28106048c44.tar.bz2 xen-47e0eeb7abc98e04fffd7aaa2158a28106048c44.zip | |
cpumask <=> xenctl_cpumap: allocate CPU masks and byte maps dynamically
Generally there was a NR_CPUS-bits wide array in these functions and
another (through a cpumask_t) on their callers' stacks, which may get
a little large for big NR_CPUS. As the functions can fail anyway, do
the allocation in there.
For the x86/MCA case this require a little code restructuring: By using
different CPU mask accessors it was possible to avoid allocating a mask
in the broadcast case. Also, this was the only user that failed to
check the return value of the conversion function (which could have led
to undefined behvior).
Also constify the input parameters of the two functions.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'tools/blktap2/vhd/lib/vhd-util-snapshot.c')
0 files changed, 0 insertions, 0 deletions
