x86 fixes
Subsystems (10)
Linus,
Please pull the latest x86-fixes-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus
out-of-topic modifications in x86-fixes-for-linus:
--------------------------------------------------Makefile # 06b5dc6: Makefile: Unexport LC_ALL instead
# c051346: Makefile: set LC_CTYPE, LC_COLLAT include/linux/decompress/mm.h # c1e7c3a: bzip2/lzma/gzip: pre-boot malloc include/linux/mm.h # 3299625: x86: Fix checking of SRAT when no init/initramfs.c # 5429136: initramfs: add missing decompress lib/decompress_bunzip2.c # d452986: bzip2: Add missing checks for mal mm/page_alloc.c # 3299625: x86: Fix checking of SRAT when no
Thanks,
Ingo
------------------>
Andreas Herrmann (1):
x86, amd: Get multi-node CPU info from NodeId MSR instead of PCI config space
Borislav Petkov (1):
x86, msr: msrs_alloc/free for CONFIG_SMP=n
H. Peter Anvin (3):
x86, msr/cpuid: Register enough minors for the MSR and CPUID drivers
Makefile: set LC_CTYPE, LC_COLLATE, LC_NUMERIC to C
Makefile: Unexport LC_ALL instead of clearing it
Pallipadi, Venkatesh (1):
x86: Reenable TSC sync check at boot, even with NONSTOP_TSC
Phillip Lougher (3):
bzip2/lzma/gzip: pre-boot malloc doesn't return NULL on failure
bzip2: Add missing checks for malloc returning NULL
initramfs: add missing decompressor error check
Roland Dreier (1):
x86: Don't use POSIX character classes in gen-insn-attr-x86.awk
Sheng Yang (1):
x86: Add IA32_TSC_AUX MSR and use it
Suresh Siddha (2):
x86, cpuid: Add "volatile" to asm in native_cpuid()
x86, irq: Allow 0xff for /proc/irq/[n]/smp_affinity on an 8-cpu system
Yinghai Lu (2):
x86: Fix checking of SRAT when node 0 ram is not from 0
x86: Increase MAX_EARLY_RES; insufficient on 32-bit NUMA
[email protected] (1):
x86: Fix objdump version check in arch/x86/tools/chkobjdump.awk
Makefile | 7 + arch/x86/include/asm/cpufeature.h | 1 + arch/x86/include/asm/hw_irq.h | 3 +- arch/x86/include/asm/msr-index.h | 2 + arch/x86/include/asm/msr.h | 16 ++- arch/x86/include/asm/processor.h | 2 +- arch/x86/kernel/apic/apic_flat_64.c | 5 +- arch/x86/kernel/apic/bigsmp_32.c | 5 +- arch/x86/kernel/apic/io_apic.c | 32 ++--- arch/x86/kernel/apic/x2apic_cluster.c | 5 +- arch/x86/kernel/apic/x2apic_phys.c | 5 +- arch/x86/kernel/apic/x2apic_uv_x.c | 5 +- arch/x86/kernel/cpu/amd.c | 53 +++------ arch/x86/kernel/cpu/intel.c | 1 - arch/x86/kernel/cpuid.c | 5 +- arch/x86/kernel/e820.c | 2 +- arch/x86/kernel/msr.c | 4 +- arch/x86/kernel/tsc.c | 1 + arch/x86/kernel/uv_irq.c | 3 +- arch/x86/lib/Makefile | 4 +- arch/x86/lib/msr-smp.c | 204 +++++++++++++++++++++++++++++++ arch/x86/lib/msr.c | 213 --------------------------------- arch/x86/mm/srat_32.c | 2 + arch/x86/mm/srat_64.c | 4 +- arch/x86/tools/chkobjdump.awk | 2 +- arch/x86/tools/gen-insn-attr-x86.awk | 10 +- include/linux/decompress/mm.h | 4 +- include/linux/mm.h | 3 + init/initramfs.c | 10 +- lib/decompress_bunzip2.c | 10 ++- mm/page_alloc.c | 4 +- 31 files changed, 307 insertions(+), 320 deletions(-) create mode 100644 arch/x86/lib/msr-smp.c
Makefile +7 -0
@@ -16,6 +16,13 @@ NAME = Man-Eating Seals of Antiquity # o print "Entering directory ..."; MAKEFLAGS += -rR --no-print-directory +# Avoid funny character set dependencies +unexport LC_ALL +LC_CTYPE=C +LC_COLLATE=C +LC_NUMERIC=C +export LC_CTYPE LC_COLLATE LC_NUMERIC + # We are using a recursive build, so we need to do a little thinking # to get the ordering right. #
arch/x86/include/asm/cpufeature.h +1 -0
@@ -153,6 +153,7 @@#define X86_FEATURE_SSE5 (6*32+11)/* SSE-5 */ #define X86_FEATURE_SKINIT (6*32+12)/* SKINIT/STGI instructions */ #define X86_FEATURE_WDT (6*32+13)/* Watchdog timer */ +#define X86_FEATURE_NODEID_MSR (6*32+19)/* NodeId MSR */ /* * Auxiliary flags: Linux defined - For features scattered in various
arch/x86/include/asm/hw_irq.h +2 -1
@@ -103,7 +103,8 @@ extern int assign_irq_vector(int, struct irq_cfg *, const struct cpumask *);extern void send_cleanup_vector (struct irq_cfg *);struct irq_desc ; -extern unsigned int set_desc_affinity (struct irq_desc *,const struct cpumask *); +extern unsigned int set_desc_affinity (struct irq_desc *,const struct cpumask *, +unsigned int *dest_id);extern int IO_APIC_get_PCI_irq_vector (int bus,int devfn,int pin,struct io_apic_irq_attr *irq_attr);extern void setup_ioapic_dest (void );
arch/x86/include/asm/msr-index.h +2 -0
@@ -12,6 +12,7 @@#define MSR_FS_BASE 0xc0000100/* 64bit FS base */ #define MSR_GS_BASE 0xc0000101/* 64bit GS base */ #define MSR_KERNEL_GS_BASE 0xc0000102/* SwapGS GS shadow */ +#define MSR_TSC_AUX 0xc0000103/* Auxiliary TSC */ /* EFER bits: */ #define _EFER_SCE 0/* SYSCALL/SYSRET */
@@ -123,6 +124,7 @@#define FAM10H_MMIO_CONF_BUSRANGE_SHIFT 2#define FAM10H_MMIO_CONF_BASE_MASK 0xfffffff#define FAM10H_MMIO_CONF_BASE_SHIFT 20 +#define MSR_FAM10H_NODE_ID 0xc001100c/* K8 MSRs */ #define MSR_K8_TOP_MEM1 0xc001001a
arch/x86/include/asm/msr.h +14 -2
@@ -27,6 +27,18 @@ struct msr { }; }; +struct msr_info { +u32 msr_no; +struct msr reg; +struct msr *msrs; +int err; +}; + +struct msr_regs_info { +u32 *regs; +int err; +}; +static inline unsigned long long native_read_tscp (unsigned int *aux) {unsigned long low, high;
@@ -240,9 +252,9 @@ do { \#define checking_wrmsrl (msr, val) wrmsr_safe((msr), (u32)(val), \ (u32)((val) >> 32)) -#define write_tsc (val1, val2) wrmsr(0x10, (val1), (val2)) +#define write_tsc (val1, val2) wrmsr(MSR_IA32_TSC, (val1), (val2)) -#define write_rdtscp_aux (val) wrmsr(0xc0000103, (val), 0) +#define write_rdtscp_aux (val) wrmsr(MSR_TSC_AUX, (val), 0)struct msr *msrs_alloc (void );void msrs_free (struct msr *msrs);
arch/x86/include/asm/processor.h +1 -1
@@ -181,7 +181,7 @@ static inline void native_cpuid(unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx) { /* ecx is often an input as well as an output. */ - asm("cpuid" + asm volatile("cpuid" : "=a" (*eax), "=b" (*ebx), "=c" (*ecx),
arch/x86/kernel/apic/apic_flat_64.c +1 -4
@@ -306,10 +306,7 @@ physflat_cpu_mask_to_apicid_and(const struct cpumask *cpumask,if (cpumask_test_cpu (cpu, cpu_online_mask))break ; } -if (cpu < nr_cpu_ids) -return per_cpu (x86_cpu_to_apicid, cpu); - -return BAD_APICID ; +return per_cpu (x86_cpu_to_apicid, cpu); }struct apic apic_physflat = {
arch/x86/kernel/apic/bigsmp_32.c +1 -4
@@ -131,10 +131,7 @@ static unsigned int bigsmp_cpu_mask_to_apicid_and(const struct cpumask *cpumask,if (cpumask_test_cpu (cpu, cpu_online_mask))break ; } -if (cpu < nr_cpu_ids) -return bigsmp_cpu_to_logical_apicid (cpu); - -return BAD_APICID ; +return bigsmp_cpu_to_logical_apicid (cpu); }static int bigsmp_phys_pkg_id (int cpuid_apic,int index_msb)
arch/x86/kernel/apic/io_apic.c +14 -18
@@ -2276,26 +2276,28 @@ static void __target_IO_APIC_irq(unsigned int irq, unsigned int dest, struct irq/* * Either sets desc->affinity to a valid value, and returns -* ->cpu_mask_to_apicid of that, or returns BAD_APICID and +* ->cpu_mask_to_apicid of that in dest_id, or returns -1 and * leaves desc->affinity untouched. */ unsigned int -set_desc_affinity (struct irq_desc *desc,const struct cpumask *mask) +set_desc_affinity (struct irq_desc *desc,const struct cpumask *mask, +unsigned int *dest_id) {struct irq_cfg *cfg;unsigned int irq;if (!cpumask_intersects (mask, cpu_online_mask)) -return BAD_APICID ; +return -1 ; irq = desc->irq; cfg = desc->chip_data;if (assign_irq_vector (irq, cfg, mask)) -return BAD_APICID ; +return -1 ;cpumask_copy (desc->affinity, mask); -return apic->cpu_mask_to_apicid_and (desc->affinity, cfg->domain); + *dest_id = apic->cpu_mask_to_apicid_and (desc->affinity, cfg->domain); +return 0 ; } static int
@@ -2311,12 +2313,11 @@ set_ioapic_affinity_irq_desc(struct irq_desc *desc, const struct cpumask *mask) cfg = desc->chip_data;spin_lock_irqsave (&ioapic_lock, flags); - dest =set_desc_affinity (desc, mask); -if (dest !=BAD_APICID ) { + ret =set_desc_affinity (desc, mask, &dest); +if (!ret) {/* Only the high 8 bits are valid. */ dest =SET_APIC_LOGICAL_ID (dest);__target_IO_APIC_irq (irq, dest, cfg); - ret =0 ; }spin_unlock_irqrestore (&ioapic_lock, flags);
@@ -3351,8 +3352,7 @@ static int set_msi_irq_affinity(unsigned int irq, const struct cpumask *mask)struct msi_msg msg;unsigned int dest; - dest =set_desc_affinity (desc, mask); -if (dest ==BAD_APICID ) +if (set_desc_affinity (desc, mask, &dest))return -1 ; cfg = desc->chip_data;
@@ -3384,8 +3384,7 @@ ir_set_msi_irq_affinity(unsigned int irq, const struct cpumask *mask)if (get_irte (irq, &irte))return -1 ; - dest =set_desc_affinity (desc, mask); -if (dest ==BAD_APICID ) +if (set_desc_affinity (desc, mask, &dest))return -1 ; irte.vector = cfg->vector;
@@ -3567,8 +3566,7 @@ static int dmar_msi_set_affinity(unsigned int irq, const struct cpumask *mask)struct msi_msg msg;unsigned int dest; - dest =set_desc_affinity (desc, mask); -if (dest ==BAD_APICID ) +if (set_desc_affinity (desc, mask, &dest))return -1 ; cfg = desc->chip_data;
@@ -3623,8 +3621,7 @@ static int hpet_msi_set_affinity(unsigned int irq, const struct cpumask *mask)struct msi_msg msg;unsigned int dest; - dest =set_desc_affinity (desc, mask); -if (dest ==BAD_APICID ) +if (set_desc_affinity (desc, mask, &dest))return -1 ; cfg = desc->chip_data;
@@ -3730,8 +3727,7 @@ static int set_ht_irq_affinity(unsigned int irq, const struct cpumask *mask)struct irq_cfg *cfg;unsigned int dest; - dest =set_desc_affinity (desc, mask); -if (dest ==BAD_APICID ) +if (set_desc_affinity (desc, mask, &dest))return -1 ; cfg = desc->chip_data;
arch/x86/kernel/apic/x2apic_cluster.c +1 -4
@@ -148,10 +148,7 @@ x2apic_cpu_mask_to_apicid_and(const struct cpumask *cpumask,break ; } -if (cpu < nr_cpu_ids) -return per_cpu (x86_cpu_to_logical_apicid, cpu); - -return BAD_APICID ; +return per_cpu (x86_cpu_to_logical_apicid, cpu); }static unsigned int x2apic_cluster_phys_get_apic_id (unsigned long x)
arch/x86/kernel/apic/x2apic_phys.c +1 -4
@@ -146,10 +146,7 @@ x2apic_cpu_mask_to_apicid_and(const struct cpumask *cpumask,break ; } -if (cpu < nr_cpu_ids) -return per_cpu (x86_cpu_to_apicid, cpu); - -return BAD_APICID ; +return per_cpu (x86_cpu_to_apicid, cpu); }static unsigned int x2apic_phys_get_apic_id (unsigned long x)
arch/x86/kernel/apic/x2apic_uv_x.c +1 -4
@@ -225,10 +225,7 @@ uv_cpu_mask_to_apicid_and(const struct cpumask *cpumask,if (cpumask_test_cpu (cpu, cpu_online_mask))break ; } -if (cpu < nr_cpu_ids) -return per_cpu (x86_cpu_to_apicid, cpu); - -return BAD_APICID ; +return per_cpu (x86_cpu_to_apicid, cpu); }static unsigned int x2apic_get_apic_id (unsigned long x)
arch/x86/kernel/cpu/amd.c +15 -38
74 lines not on this page · raw message
arch/x86/kernel/cpu/intel.c +0 -1
@@ -70,7 +70,6 @@ static void __cpuinit early_init_intel(struct cpuinfo_x86 *c)if (c->x86_power & (1 <<8 )) {set_cpu_cap (c,X86_FEATURE_CONSTANT_TSC );set_cpu_cap (c,X86_FEATURE_NONSTOP_TSC ); -set_cpu_cap (c,X86_FEATURE_TSC_RELIABLE ); sched_clock_stable =1 ; }
arch/x86/kernel/cpuid.c +3 -2
@@ -187,7 +187,8 @@ static int __init cpuid_init(void)int i, err =0 ; i =0 ; -if (register_chrdev (CPUID_MAJOR ,"cpu/cpuid" , &cpuid_fops)) { +if (__register_chrdev (CPUID_MAJOR ,0 ,NR_CPUS , +"cpu/cpuid" , &cpuid_fops)) {printk (KERN_ERR "cpuid: unable to get major %d for cpuid\n" ,CPUID_MAJOR ); err = -EBUSY ;
@@ -216,7 +217,7 @@ out_class: }class_destroy (cpuid_class); out_chrdev: -unregister_chrdev (CPUID_MAJOR ,"cpu/cpuid" ); +__unregister_chrdev (CPUID_MAJOR ,0 ,NR_CPUS ,"cpu/cpuid" ); out:return err; }
arch/x86/kernel/e820.c +1 -1
@@ -724,7 +724,7 @@ core_initcall(e820_mark_nvs_memory);/* * Early reserved memory areas. */ -#define MAX_EARLY_RES 20 +#define MAX_EARLY_RES 32struct early_res {u64 start, end;
arch/x86/kernel/msr.c +2 -2
@@ -246,7 +246,7 @@ static int __init msr_init(void)int i, err =0 ; i =0 ; -if (register_chrdev (MSR_MAJOR ,"cpu/msr" , &msr_fops)) { +if (__register_chrdev (MSR_MAJOR ,0 ,NR_CPUS ,"cpu/msr" , &msr_fops)) {printk (KERN_ERR "msr: unable to get major %d for msr\n" ,MSR_MAJOR ); err = -EBUSY ;
@@ -274,7 +274,7 @@ out_class:msr_device_destroy (i);class_destroy (msr_class); out_chrdev: -unregister_chrdev (MSR_MAJOR ,"cpu/msr" ); +__unregister_chrdev (MSR_MAJOR ,0 ,NR_CPUS ,"cpu/msr" ); out:return err; }
arch/x86/kernel/tsc.c +1 -0
@@ -763,6 +763,7 @@ void mark_tsc_unstable(char *reason) {if (!tsc_unstable) { tsc_unstable =1 ; + sched_clock_stable =0 ;printk (KERN_INFO "Marking TSC unstable due to %s\n" , reason);/* Change only the rating, when not registered */ if (clocksource_tsc.mult)
arch/x86/kernel/uv_irq.c +1 -2
@@ -215,8 +215,7 @@ static int uv_set_irq_affinity(unsigned int irq, const struct cpumask *mask)unsigned long mmr_offset;unsigned mmr_pnode; - dest =set_desc_affinity (desc, mask); -if (dest ==BAD_APICID ) +if (set_desc_affinity (desc, mask, &dest))return -1 ; mmr_value =0 ;
arch/x86/lib/Makefile +2 -2
@@ -14,7 +14,7 @@ $(obj)/inat.o: $(obj)/inat-tables.c clean-files := inat-tables.c -obj-$(CONFIG_SMP) := msr.o +obj-$(CONFIG_SMP) += msr-smp.o lib-y := delay.o lib-y += thunk_$(BITS).o
@@ -22,7 +22,7 @@ lib-y += usercopy_$(BITS).o getuser.o putuser.o lib-y += memcpy_$(BITS).o lib-y += insn.o inat.o -obj-y += msr-reg.o msr-reg-export.o +obj-y += msr.o msr-reg.o msr-reg-export.o ifeq ($(CONFIG_X86_32),y) obj-y += atomic64_32.o
arch/x86/lib/msr-smp.c new file +204 -0
204 lines not on this page · raw message
arch/x86/lib/msr.c +0 -213
223 lines not on this page · raw message
arch/x86/mm/srat_32.c +2 -0
@@ -267,6 +267,8 @@ int __init get_memcfg_from_srat(void)e820_register_active_regions (chunk->nid, chunk->start_pfn,min (chunk->end_pfn, max_pfn)); } +/* for out of order entries in SRAT */ +sort_node_map ();for_each_online_node (nid) {unsigned long start = node_start_pfn[nid];
arch/x86/mm/srat_64.c +3 -1
@@ -317,7 +317,7 @@ static int __init nodes_cover_memory(const struct bootnode *nodes)unsigned long s = nodes[i].start >>PAGE_SHIFT ;unsigned long e = nodes[i].end >>PAGE_SHIFT ; pxmram += e - s; - pxmram -=absent_pages_in_range (s, e); + pxmram -=__absent_pages_in_range (i, s, e);if ((long )pxmram <0 ) pxmram =0 ; }
@@ -373,6 +373,8 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)for_each_node_mask (i, nodes_parsed)e820_register_active_regions (i, nodes[i].start >>PAGE_SHIFT , nodes[i].end >>PAGE_SHIFT ); +/* for out of order entries in SRAT */ +sort_node_map ();if (!nodes_cover_memory (nodes)) {bad_srat ();return -1 ;
arch/x86/tools/chkobjdump.awk +1 -1
@@ -9,7 +9,7 @@ BEGIN { } /^GNU/ { - split($4, ver, "."); + split($3, ver, "."); if (ver[1] > od_ver || (ver[1] == od_ver && ver[2] >= od_sver)) { exit 1;
arch/x86/tools/gen-insn-attr-x86.awk +4 -6
@@ -6,8 +6,6 @@ # Awk implementation sanity check function check_awk_implement() { - if (!match("abc", "[[:lower:]]+")) - return "Your awk doesn't support charactor-class." if (sprintf("%x", 0) != "0") return "Your awk has a printf-format problem." return ""
@@ -44,12 +42,12 @@ BEGIN { delete gtable delete atable - opnd_expr = "^[[:alpha:]/]" + opnd_expr = "^[A-Za-z/]" ext_expr = "^\\(" sep_expr = "^\\|$" - group_expr = "^Grp[[:alnum:]]+" + group_expr = "^Grp[0-9A-Za-z]+" - imm_expr = "^[IJAO][[:lower:]]" + imm_expr = "^[IJAO][a-z]" imm_flag["Ib"] = "INAT_MAKE_IMM(INAT_IMM_BYTE)" imm_flag["Jb"] = "INAT_MAKE_IMM(INAT_IMM_BYTE)" imm_flag["Iw"] = "INAT_MAKE_IMM(INAT_IMM_WORD)"
@@ -62,7 +60,7 @@ BEGIN { imm_flag["Ob"] = "INAT_MOFFSET" imm_flag["Ov"] = "INAT_MOFFSET" - modrm_expr = "^([CDEGMNPQRSUVW/][[:lower:]]+|NTA|T[012])" + modrm_expr = "^([CDEGMNPQRSUVW/][a-z]+|NTA|T[012])" force64_expr = "\\([df]64\\)" rex_expr = "^REX(\\.[XRWB]+)*" fpu_expr = "^ESC" # TODO
include/linux/decompress/mm.h +2 -2
@@ -25,7 +25,7 @@ static void *malloc(int size)void *p;if (size <0 ) -error ("Malloc error" ); +return NULL ;if (!malloc_ptr) malloc_ptr = free_mem_ptr;
@@ -35,7 +35,7 @@ static void *malloc(int size) malloc_ptr += size;if (free_mem_end_ptr && malloc_ptr >= free_mem_end_ptr) -error ("Out of memory" ); +return NULL ; malloc_count++;return p;
include/linux/mm.h +3 -0
@@ -1022,6 +1022,9 @@ extern void add_active_range(unsigned int nid, unsigned long start_pfn,extern void remove_active_range (unsigned int nid,unsigned long start_pfn,unsigned long end_pfn);extern void remove_all_active_ranges (void ); +void sort_node_map (void ); +unsigned long __absent_pages_in_range (int nid,unsigned long start_pfn, +unsigned long end_pfn);extern unsigned long absent_pages_in_range (unsigned long start_pfn,unsigned long end_pfn); extern void get_pfn_range_for_nid(unsigned int nid,
init/initramfs.c +6 -4
@@ -413,7 +413,7 @@ static unsigned my_inptr; /* index of next byte to be processed in inbuf */static char *__init unpack_to_rootfs (char *buf,unsigned len) { -int written; +int written, res;decompress_fn decompress;const char *compress_name;static __initdata char msg_buf[64 ];
@@ -445,10 +445,12 @@ static char * __init unpack_to_rootfs(char *buf, unsigned len) } this_header =0 ; decompress =decompress_method (buf, len, &compress_name); -if (decompress) -decompress (buf, len,NULL , flush_buffer,NULL , +if (decompress) { + res =decompress (buf, len,NULL , flush_buffer,NULL , &my_inptr, error); -else if (compress_name) { +if (res) +error ("decompressor failed" ); + }else if (compress_name) {if (!message) { snprintf(msg_buf, sizeof msg_buf, "compression method %s not configured",
lib/decompress_bunzip2.c +9 -1
@@ -637,6 +637,8 @@ static int INIT start_bunzip(struct bunzip_data **bdp, void *inbuf, int len,/* Allocate bunzip_data. Most fields initialize to zero. */ bd = *bdp =malloc (i); +if (!bd) +return RETVAL_OUT_OF_MEMORY ;memset (bd,0 ,sizeof (struct bunzip_data ));/* Setup input buffer */ bd->inbuf = inbuf;
@@ -664,6 +666,8 @@ static int INIT start_bunzip(struct bunzip_data **bdp, void *inbuf, int len, bd->dbufSize =100000 *(i-BZh0); bd->dbuf =large_malloc (bd->dbufSize *sizeof (int )); +if (!bd->dbuf) +return RETVAL_OUT_OF_MEMORY ;return RETVAL_OK ; }
@@ -686,7 +690,7 @@ STATIC int INIT bunzip2(unsigned char *buf, int len,if (!outbuf) {error ("Could not allocate output bufer" ); -return -1 ; +return RETVAL_OUT_OF_MEMORY ; }if (buf) inbuf = buf;
@@ -694,6 +698,7 @@ STATIC int INIT bunzip2(unsigned char *buf, int len, inbuf =malloc (BZIP2_IOBUF_SIZE );if (!inbuf) {error ("Could not allocate input bufer" ); + i =RETVAL_OUT_OF_MEMORY ; goto exit_0; } i =start_bunzip (&bd, inbuf, len, fill);
@@ -720,11 +725,14 @@ STATIC int INIT bunzip2(unsigned char *buf, int len, }else if (i ==RETVAL_UNEXPECTED_OUTPUT_EOF ) {error ("Compressed file ends unexpectedly" ); } +if (!bd) + goto exit_1;if (bd->dbuf)large_free (bd->dbuf);if (pos) *pos = bd->inbufPos;free (bd); +exit_1:if (!buf)free (inbuf); exit_0:
mm/page_alloc.c +2 -2
@@ -3573,7 +3573,7 @@ static unsigned long __meminit zone_spanned_pages_in_node(int nid,* Return the number of holes in a range on a node. If nid is MAX_NUMNODES, * then all holes in the requested range will be accounted for. */ -static unsigned long __meminit __absent_pages_in_range (int nid, +unsigned long __meminit __absent_pages_in_range (int nid,unsigned long range_start_pfn,unsigned long range_end_pfn) {
@@ -4102,7 +4102,7 @@ static int __init cmp_node_active_region(const void *a, const void *b) }/* sort the node_map by start_pfn */ -static void __init sort_node_map (void ) +void __init sort_node_map (void ) { sort(early_node_map, (size_t)nr_nodemap_entries, sizeof(struct node_active_region),