Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86/microcode: Fix double vfree() and remove redundant pointer checks before vfree()

+5 -11
+5 -11
arch/x86/kernel/microcode_intel.c
··· 364 364 365 365 /* For performance reasons, reuse mc area when possible */ 366 366 if (!mc || mc_size > curr_mc_size) { 367 - if (mc) 368 - vfree(mc); 367 + vfree(mc); 369 368 mc = vmalloc(mc_size); 370 369 if (!mc) 371 370 break; ··· 373 374 374 375 if (get_ucode_data(mc, ucode_ptr, mc_size) || 375 376 microcode_sanity_check(mc) < 0) { 376 - vfree(mc); 377 377 break; 378 378 } 379 379 380 380 if (get_matching_microcode(&uci->cpu_sig, mc, new_rev)) { 381 - if (new_mc) 382 - vfree(new_mc); 381 + vfree(new_mc); 383 382 new_rev = mc_header.rev; 384 383 new_mc = mc; 385 384 mc = NULL; /* trigger new vmalloc */ ··· 387 390 leftover -= mc_size; 388 391 } 389 392 390 - if (mc) 391 - vfree(mc); 393 + vfree(mc); 392 394 393 395 if (leftover) { 394 - if (new_mc) 395 - vfree(new_mc); 396 + vfree(new_mc); 396 397 state = UCODE_ERROR; 397 398 goto out; 398 399 } ··· 400 405 goto out; 401 406 } 402 407 403 - if (uci->mc) 404 - vfree(uci->mc); 408 + vfree(uci->mc); 405 409 uci->mc = (struct microcode_intel *)new_mc; 406 410 407 411 pr_debug("CPU%d found a matching microcode update with version 0x%x (current=0x%x)\n",