diff -druN linux-libre-3.4.17-gnu/arch/arm/mach-exynos/common.c linux-libre-3.4.18-gnu/arch/arm/mach-exynos/common.c
--- linux-libre-3.4.17-gnu/arch/arm/mach-exynos/common.c	2012-10-31 13:05:17.000000000 -0400
+++ linux-libre-3.4.18-gnu/arch/arm/mach-exynos/common.c	2012-11-05 03:50:52.000000000 -0500
@@ -44,7 +44,6 @@
 #include <plat/fimc-core.h>
 #include <plat/iic-core.h>
 #include <plat/tv-core.h>
-#include <plat/spi-core.h>
 #include <plat/regs-serial.h>
 
 #include "common.h"
@@ -339,8 +338,6 @@
 
 	s5p_fb_setname(0, "exynos4-fb");
 	s5p_hdmi_setname("exynos4-hdmi");
-
-	s3c64xx_spi_setname("exynos4210-spi");
 }
 
 static void __init exynos5_map_io(void)
@@ -361,8 +358,6 @@
 	s3c_i2c0_setname("s3c2440-i2c");
 	s3c_i2c1_setname("s3c2440-i2c");
 	s3c_i2c2_setname("s3c2440-i2c");
-
-	s3c64xx_spi_setname("exynos4210-spi");
 }
 
 static void __init exynos4_init_clocks(int xtal)
diff -druN linux-libre-3.4.17-gnu/arch/arm/mach-s3c24xx/s3c2416.c linux-libre-3.4.18-gnu/arch/arm/mach-s3c24xx/s3c2416.c
--- linux-libre-3.4.17-gnu/arch/arm/mach-s3c24xx/s3c2416.c	2012-10-31 13:05:17.000000000 -0400
+++ linux-libre-3.4.18-gnu/arch/arm/mach-s3c24xx/s3c2416.c	2012-11-05 03:50:52.000000000 -0500
@@ -61,7 +61,6 @@
 #include <plat/nand-core.h>
 #include <plat/adc-core.h>
 #include <plat/rtc-core.h>
-#include <plat/spi-core.h>
 
 static struct map_desc s3c2416_iodesc[] __initdata = {
 	IODESC_ENT(WATCHDOG),
@@ -132,7 +131,6 @@
 	/* initialize device information early */
 	s3c2416_default_sdhci0();
 	s3c2416_default_sdhci1();
-	s3c64xx_spi_setname("s3c2443-spi");
 
 	iotable_init(s3c2416_iodesc, ARRAY_SIZE(s3c2416_iodesc));
 }
diff -druN linux-libre-3.4.17-gnu/arch/arm/mach-s3c24xx/s3c2443.c linux-libre-3.4.18-gnu/arch/arm/mach-s3c24xx/s3c2443.c
--- linux-libre-3.4.17-gnu/arch/arm/mach-s3c24xx/s3c2443.c	2012-10-31 13:05:17.000000000 -0400
+++ linux-libre-3.4.18-gnu/arch/arm/mach-s3c24xx/s3c2443.c	2012-11-05 03:50:52.000000000 -0500
@@ -43,7 +43,6 @@
 #include <plat/nand-core.h>
 #include <plat/adc-core.h>
 #include <plat/rtc-core.h>
-#include <plat/spi-core.h>
 
 static struct map_desc s3c2443_iodesc[] __initdata = {
 	IODESC_ENT(WATCHDOG),
@@ -101,9 +100,6 @@
 	s3c24xx_gpiocfg_default.set_pull = s3c2443_gpio_setpull;
 	s3c24xx_gpiocfg_default.get_pull = s3c2443_gpio_getpull;
 
-	/* initialize device information early */
-	s3c64xx_spi_setname("s3c2443-spi");
-
 	iotable_init(s3c2443_iodesc, ARRAY_SIZE(s3c2443_iodesc));
 }
 
diff -druN linux-libre-3.4.17-gnu/arch/arm/mach-s5p64x0/common.c linux-libre-3.4.18-gnu/arch/arm/mach-s5p64x0/common.c
--- linux-libre-3.4.17-gnu/arch/arm/mach-s5p64x0/common.c	2012-10-31 13:05:17.000000000 -0400
+++ linux-libre-3.4.18-gnu/arch/arm/mach-s5p64x0/common.c	2012-11-05 03:50:52.000000000 -0500
@@ -44,7 +44,6 @@
 #include <plat/sdhci.h>
 #include <plat/adc-core.h>
 #include <plat/fb-core.h>
-#include <plat/spi-core.h>
 #include <plat/gpio-cfg.h>
 #include <plat/regs-irqtype.h>
 #include <plat/regs-serial.h>
@@ -180,7 +179,6 @@
 	/* initialize any device information early */
 	s3c_adc_setname("s3c64xx-adc");
 	s3c_fb_setname("s5p64x0-fb");
-	s3c64xx_spi_setname("s5p64x0-spi");
 
 	s5p64x0_default_sdhci0();
 	s5p64x0_default_sdhci1();
@@ -195,7 +193,6 @@
 	/* initialize any device information early */
 	s3c_adc_setname("s3c64xx-adc");
 	s3c_fb_setname("s5p64x0-fb");
-	s3c64xx_spi_setname("s5p64x0-spi");
 
 	s5p64x0_default_sdhci0();
 	s5p64x0_default_sdhci1();
diff -druN linux-libre-3.4.17-gnu/arch/arm/mach-s5pc100/common.c linux-libre-3.4.18-gnu/arch/arm/mach-s5pc100/common.c
--- linux-libre-3.4.17-gnu/arch/arm/mach-s5pc100/common.c	2012-10-31 13:05:17.000000000 -0400
+++ linux-libre-3.4.18-gnu/arch/arm/mach-s5pc100/common.c	2012-11-05 03:50:52.000000000 -0500
@@ -45,7 +45,6 @@
 #include <plat/fb-core.h>
 #include <plat/iic-core.h>
 #include <plat/onenand-core.h>
-#include <plat/spi-core.h>
 #include <plat/regs-serial.h>
 #include <plat/watchdog-reset.h>
 
@@ -166,8 +165,6 @@
 	s3c_onenand_setname("s5pc100-onenand");
 	s3c_fb_setname("s5pc100-fb");
 	s3c_cfcon_setname("s5pc100-pata");
-
-	s3c64xx_spi_setname("s5pc100-spi");
 }
 
 void __init s5pc100_init_clocks(int xtal)
diff -druN linux-libre-3.4.17-gnu/arch/arm/mach-s5pv210/common.c linux-libre-3.4.18-gnu/arch/arm/mach-s5pv210/common.c
--- linux-libre-3.4.17-gnu/arch/arm/mach-s5pv210/common.c	2012-10-31 13:05:17.000000000 -0400
+++ linux-libre-3.4.18-gnu/arch/arm/mach-s5pv210/common.c	2012-11-05 03:50:52.000000000 -0500
@@ -43,7 +43,6 @@
 #include <plat/iic-core.h>
 #include <plat/keypad-core.h>
 #include <plat/tv-core.h>
-#include <plat/spi-core.h>
 #include <plat/regs-serial.h>
 
 #include "common.h"
@@ -197,8 +196,6 @@
 
 	/* setup TV devices */
 	s5p_hdmi_setname("s5pv210-hdmi");
-
-	s3c64xx_spi_setname("s5pv210-spi");
 }
 
 void __init s5pv210_init_clocks(int xtal)
diff -druN linux-libre-3.4.17-gnu/arch/arm/plat-samsung/include/plat/spi-core.h linux-libre-3.4.18-gnu/arch/arm/plat-samsung/include/plat/spi-core.h
--- linux-libre-3.4.17-gnu/arch/arm/plat-samsung/include/plat/spi-core.h	2012-10-31 13:05:17.000000000 -0400
+++ linux-libre-3.4.18-gnu/arch/arm/plat-samsung/include/plat/spi-core.h	1969-12-31 19:00:00.000000000 -0500
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2012 Heiko Stuebner <heiko@sntech.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __PLAT_S3C_SPI_CORE_H
-#define __PLAT_S3C_SPI_CORE_H
-
-/* These functions are only for use with the core support code, such as
- * the cpu specific initialisation code
- */
-
-/* re-define device name depending on support. */
-static inline void s3c64xx_spi_setname(char *name)
-{
-#ifdef CONFIG_S3C64XX_DEV_SPI0
-	s3c64xx_device_spi0.name = name;
-#endif
-#ifdef CONFIG_S3C64XX_DEV_SPI1
-	s3c64xx_device_spi1.name = name;
-#endif
-#ifdef CONFIG_S3C64XX_DEV_SPI2
-	s3c64xx_device_spi2.name = name;
-#endif
-}
-
-#endif /* __PLAT_S3C_SPI_CORE_H */
diff -druN linux-libre-3.4.17-gnu/drivers/block/floppy.c linux-libre-3.4.18-gnu/drivers/block/floppy.c
--- linux-libre-3.4.17-gnu/drivers/block/floppy.c	2012-10-31 13:05:17.000000000 -0400
+++ linux-libre-3.4.18-gnu/drivers/block/floppy.c	2012-11-05 03:50:52.000000000 -0500
@@ -4161,6 +4161,7 @@
 
 		disks[dr]->queue = blk_init_queue(do_fd_request, &floppy_lock);
 		if (!disks[dr]->queue) {
+			put_disk(disks[dr]);
 			err = -ENOMEM;
 			goto out_put_disk;
 		}
diff -druN linux-libre-3.4.17-gnu/drivers/gpio/gpiolib.c linux-libre-3.4.18-gnu/drivers/gpio/gpiolib.c
--- linux-libre-3.4.17-gnu/drivers/gpio/gpiolib.c	2012-10-31 13:05:17.000000000 -0400
+++ linux-libre-3.4.18-gnu/drivers/gpio/gpiolib.c	2012-11-05 03:50:52.000000000 -0500
@@ -623,9 +623,11 @@
 	 */
 
 	status = gpio_request(gpio, "sysfs");
-	if (status < 0)
+	if (status < 0) {
+		if (status == -EPROBE_DEFER)
+			status = -ENODEV;
 		goto done;
-
+	}
 	status = gpio_export(gpio, true);
 	if (status < 0)
 		gpio_free(gpio);
@@ -1191,8 +1193,10 @@
 
 	spin_lock_irqsave(&gpio_lock, flags);
 
-	if (!gpio_is_valid(gpio))
+	if (!gpio_is_valid(gpio)) {
+		status = -EINVAL;
 		goto done;
+	}
 	desc = &gpio_desc[gpio];
 	chip = desc->chip;
 	if (chip == NULL)
diff -druN linux-libre-3.4.17-gnu/drivers/gpio/gpio-timberdale.c linux-libre-3.4.18-gnu/drivers/gpio/gpio-timberdale.c
--- linux-libre-3.4.17-gnu/drivers/gpio/gpio-timberdale.c	2012-10-31 13:05:17.000000000 -0400
+++ linux-libre-3.4.18-gnu/drivers/gpio/gpio-timberdale.c	2012-11-05 03:50:52.000000000 -0500
@@ -116,7 +116,7 @@
 	unsigned long flags;
 
 	spin_lock_irqsave(&tgpio->lock, flags);
-	tgpio->last_ier &= ~(1 << offset);
+	tgpio->last_ier &= ~(1UL << offset);
 	iowrite32(tgpio->last_ier, tgpio->membase + TGPIO_IER);
 	spin_unlock_irqrestore(&tgpio->lock, flags);
 }
@@ -128,7 +128,7 @@
 	unsigned long flags;
 
 	spin_lock_irqsave(&tgpio->lock, flags);
-	tgpio->last_ier |= 1 << offset;
+	tgpio->last_ier |= 1UL << offset;
 	iowrite32(tgpio->last_ier, tgpio->membase + TGPIO_IER);
 	spin_unlock_irqrestore(&tgpio->lock, flags);
 }
diff -druN linux-libre-3.4.17-gnu/drivers/gpu/drm/nouveau/nouveau_drv.c linux-libre-3.4.18-gnu/drivers/gpu/drm/nouveau/nouveau_drv.c
--- linux-libre-3.4.17-gnu/drivers/gpu/drm/nouveau/nouveau_drv.c	2012-10-31 13:05:17.000000000 -0400
+++ linux-libre-3.4.18-gnu/drivers/gpu/drm/nouveau/nouveau_drv.c	2012-11-05 03:50:52.000000000 -0500
@@ -186,11 +186,13 @@
 	if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
 		return 0;
 
-	NV_INFO(dev, "Disabling display...\n");
-	nouveau_display_fini(dev);
+	if (dev->mode_config.num_crtc) {
+		NV_INFO(dev, "Disabling display...\n");
+		nouveau_display_fini(dev);
 
-	NV_INFO(dev, "Disabling fbcon...\n");
-	nouveau_fbcon_set_suspend(dev, 1);
+		NV_INFO(dev, "Disabling fbcon...\n");
+		nouveau_fbcon_set_suspend(dev, 1);
+	}
 
 	NV_INFO(dev, "Unpinning framebuffer(s)...\n");
 	list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
@@ -363,10 +365,12 @@
 			NV_ERROR(dev, "Could not pin/map cursor.\n");
 	}
 
-	nouveau_fbcon_set_suspend(dev, 0);
-	nouveau_fbcon_zfill_all(dev);
+	if (dev->mode_config.num_crtc) {
+		nouveau_fbcon_set_suspend(dev, 0);
+		nouveau_fbcon_zfill_all(dev);
 
-	nouveau_display_init(dev);
+		nouveau_display_init(dev);
+	}
 
 	/* Force CLUT to get re-loaded during modeset */
 	list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
@@ -468,9 +472,7 @@
 #ifdef CONFIG_VGA_CONSOLE
 		if (vgacon_text_force())
 			nouveau_modeset = 0;
-		else
 #endif
-			nouveau_modeset = 1;
 	}
 
 	if (!nouveau_modeset)
diff -druN linux-libre-3.4.17-gnu/drivers/gpu/drm/nouveau/nouveau_state.c linux-libre-3.4.18-gnu/drivers/gpu/drm/nouveau/nouveau_state.c
--- linux-libre-3.4.17-gnu/drivers/gpu/drm/nouveau/nouveau_state.c	2012-10-31 13:05:17.000000000 -0400
+++ linux-libre-3.4.18-gnu/drivers/gpu/drm/nouveau/nouveau_state.c	2012-11-05 03:50:52.000000000 -0500
@@ -47,6 +47,7 @@
 {
 	struct drm_nouveau_private *dev_priv = dev->dev_private;
 	struct nouveau_engine *engine = &dev_priv->engine;
+	u32 pclass = dev->pdev->class >> 8;
 
 	switch (dev_priv->chipset & 0xf0) {
 	case 0x00:
@@ -526,7 +527,8 @@
 	}
 
 	/* headless mode */
-	if (nouveau_modeset == 2) {
+	if (nouveau_modeset == 2 ||
+	    (nouveau_modeset < 0 && pclass != PCI_CLASS_DISPLAY_VGA)) {
 		engine->display.early_init = nouveau_stub_init;
 		engine->display.late_takedown = nouveau_stub_takedown;
 		engine->display.create = nouveau_stub_init;
diff -druN linux-libre-3.4.17-gnu/drivers/gpu/drm/nouveau/nv04_dac.c linux-libre-3.4.18-gnu/drivers/gpu/drm/nouveau/nv04_dac.c
--- linux-libre-3.4.17-gnu/drivers/gpu/drm/nouveau/nv04_dac.c	2012-10-31 13:05:17.000000000 -0400
+++ linux-libre-3.4.18-gnu/drivers/gpu/drm/nouveau/nv04_dac.c	2012-11-05 03:50:52.000000000 -0500
@@ -210,7 +210,7 @@
 	NVWriteVgaCrtc(dev, 0, NV_CIO_CR_MODE_INDEX, saved_cr_mode);
 
 	if (blue == 0x18) {
-		NV_INFO(dev, "Load detected on head A\n");
+		NV_DEBUG(dev, "Load detected on head A\n");
 		return connector_status_connected;
 	}
 
@@ -323,7 +323,7 @@
 
 	if (nv17_dac_sample_load(encoder) &
 	    NV_PRAMDAC_TEST_CONTROL_SENSEB_ALLHI) {
-		NV_INFO(dev, "Load detected on output %c\n",
+		NV_DEBUG(dev, "Load detected on output %c\n",
 			'@' + ffs(dcb->or));
 		return connector_status_connected;
 	} else {
@@ -398,7 +398,7 @@
 
 	helper->dpms(encoder, DRM_MODE_DPMS_ON);
 
-	NV_INFO(dev, "Output %s is running on CRTC %d using output %c\n",
+	NV_DEBUG(dev, "Output %s is running on CRTC %d using output %c\n",
 		drm_get_connector_name(&nouveau_encoder_connector_get(nv_encoder)->base),
 		nv_crtc->index, '@' + ffs(nv_encoder->dcb->or));
 }
@@ -447,7 +447,7 @@
 		return;
 	nv_encoder->last_dpms = mode;
 
-	NV_INFO(dev, "Setting dpms mode %d on vga encoder (output %d)\n",
+	NV_DEBUG(dev, "Setting dpms mode %d on vga encoder (output %d)\n",
 		     mode, nv_encoder->dcb->index);
 
 	nv04_dac_update_dacclk(encoder, mode == DRM_MODE_DPMS_ON);
diff -druN linux-libre-3.4.17-gnu/drivers/gpu/drm/nouveau/nv04_dfp.c linux-libre-3.4.18-gnu/drivers/gpu/drm/nouveau/nv04_dfp.c
--- linux-libre-3.4.17-gnu/drivers/gpu/drm/nouveau/nv04_dfp.c	2012-10-31 13:05:17.000000000 -0400
+++ linux-libre-3.4.18-gnu/drivers/gpu/drm/nouveau/nv04_dfp.c	2012-11-05 03:50:52.000000000 -0500
@@ -476,7 +476,7 @@
 
 	helper->dpms(encoder, DRM_MODE_DPMS_ON);
 
-	NV_INFO(dev, "Output %s is running on CRTC %d using output %c\n",
+	NV_DEBUG(dev, "Output %s is running on CRTC %d using output %c\n",
 		drm_get_connector_name(&nouveau_encoder_connector_get(nv_encoder)->base),
 		nv_crtc->index, '@' + ffs(nv_encoder->dcb->or));
 }
@@ -519,7 +519,7 @@
 		return;
 	nv_encoder->last_dpms = mode;
 
-	NV_INFO(dev, "Setting dpms mode %d on lvds encoder (output %d)\n",
+	NV_DEBUG(dev, "Setting dpms mode %d on lvds encoder (output %d)\n",
 		     mode, nv_encoder->dcb->index);
 
 	if (was_powersaving && is_powersaving_dpms(mode))
@@ -564,7 +564,7 @@
 		return;
 	nv_encoder->last_dpms = mode;
 
-	NV_INFO(dev, "Setting dpms mode %d on tmds encoder (output %d)\n",
+	NV_DEBUG(dev, "Setting dpms mode %d on tmds encoder (output %d)\n",
 		     mode, nv_encoder->dcb->index);
 
 	nv04_dfp_update_backlight(encoder, mode);
diff -druN linux-libre-3.4.17-gnu/drivers/gpu/drm/nouveau/nv04_tv.c linux-libre-3.4.18-gnu/drivers/gpu/drm/nouveau/nv04_tv.c
--- linux-libre-3.4.17-gnu/drivers/gpu/drm/nouveau/nv04_tv.c	2012-10-31 13:05:17.000000000 -0400
+++ linux-libre-3.4.18-gnu/drivers/gpu/drm/nouveau/nv04_tv.c	2012-11-05 03:50:52.000000000 -0500
@@ -69,7 +69,7 @@
 	struct nv04_mode_state *state = &dev_priv->mode_reg;
 	uint8_t crtc1A;
 
-	NV_INFO(dev, "Setting dpms mode %d on TV encoder (output %d)\n",
+	NV_DEBUG(dev, "Setting dpms mode %d on TV encoder (output %d)\n",
 		mode, nv_encoder->dcb->index);
 
 	state->pllsel &= ~(PLLSEL_TV_CRTC1_MASK | PLLSEL_TV_CRTC2_MASK);
@@ -162,7 +162,7 @@
 
 	helper->dpms(encoder, DRM_MODE_DPMS_ON);
 
-	NV_INFO(dev, "Output %s is running on CRTC %d using output %c\n",
+	NV_DEBUG(dev, "Output %s is running on CRTC %d using output %c\n",
 		      drm_get_connector_name(&nouveau_encoder_connector_get(nv_encoder)->base), nv_crtc->index,
 		      '@' + ffs(nv_encoder->dcb->or));
 }
diff -druN linux-libre-3.4.17-gnu/drivers/hid/hid-microsoft.c linux-libre-3.4.18-gnu/drivers/hid/hid-microsoft.c
--- linux-libre-3.4.17-gnu/drivers/hid/hid-microsoft.c	2012-10-31 13:05:17.000000000 -0400
+++ linux-libre-3.4.18-gnu/drivers/hid/hid-microsoft.c	2012-11-05 03:50:52.000000000 -0500
@@ -29,22 +29,30 @@
 #define MS_RDESC		0x08
 #define MS_NOGET		0x10
 #define MS_DUPLICATE_USAGES	0x20
+#define MS_RDESC_3K		0x40
 
-/*
- * Microsoft Wireless Desktop Receiver (Model 1028) has
- * 'Usage Min/Max' where it ought to have 'Physical Min/Max'
- */
 static __u8 *ms_report_fixup(struct hid_device *hdev, __u8 *rdesc,
 		unsigned int *rsize)
 {
 	unsigned long quirks = (unsigned long)hid_get_drvdata(hdev);
 
+	/*
+	 * Microsoft Wireless Desktop Receiver (Model 1028) has
+	 * 'Usage Min/Max' where it ought to have 'Physical Min/Max'
+	 */
 	if ((quirks & MS_RDESC) && *rsize == 571 && rdesc[557] == 0x19 &&
 			rdesc[559] == 0x29) {
 		hid_info(hdev, "fixing up Microsoft Wireless Receiver Model 1028 report descriptor\n");
 		rdesc[557] = 0x35;
 		rdesc[559] = 0x45;
 	}
+	/* the same as above (s/usage/physical/) */
+	if ((quirks & MS_RDESC_3K) && *rsize == 106 &&
+			!memcmp((char []){ 0x19, 0x00, 0x29, 0xff },
+				&rdesc[94], 4)) {
+		rdesc[94] = 0x35;
+		rdesc[96] = 0x45;
+	}
 	return rdesc;
 }
 
@@ -193,7 +201,7 @@
 	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_PRESENTER_8K_USB),
 		.driver_data = MS_PRESENTER },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_3K),
-		.driver_data = MS_ERGONOMY },
+		.driver_data = MS_ERGONOMY | MS_RDESC_3K },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0),
 		.driver_data = MS_NOGET },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_COMFORT_MOUSE_4500),
diff -druN linux-libre-3.4.17-gnu/drivers/md/raid1.c linux-libre-3.4.18-gnu/drivers/md/raid1.c
--- linux-libre-3.4.17-gnu/drivers/md/raid1.c	2012-10-31 13:05:17.000000000 -0400
+++ linux-libre-3.4.18-gnu/drivers/md/raid1.c	2012-11-05 03:50:52.000000000 -0500
@@ -2564,7 +2564,7 @@
 		    || disk_idx < 0)
 			continue;
 		if (test_bit(Replacement, &rdev->flags))
-			disk = conf->mirrors + conf->raid_disks + disk_idx;
+			disk = conf->mirrors + mddev->raid_disks + disk_idx;
 		else
 			disk = conf->mirrors + disk_idx;
 
diff -druN linux-libre-3.4.17-gnu/drivers/net/wireless/b43/main.c linux-libre-3.4.18-gnu/drivers/net/wireless/b43/main.c
--- linux-libre-3.4.17-gnu/drivers/net/wireless/b43/main.c	2012-10-31 17:34:44.000000000 -0400
+++ linux-libre-3.4.18-gnu/drivers/net/wireless/b43/main.c	2012-11-05 14:21:45.000000000 -0500
@@ -5426,6 +5426,8 @@
 	cancel_work_sync(&wldev->restart_work);
 
 	B43_WARN_ON(!wl);
+	if (!wldev->fw.ucode.data)
+		return;			/* NULL if firmware never loaded */
 	if (wl->current_dev == wldev) {
 		/* Restore the queues count before unregistering, because firmware detect
 		 * might have modified it. Restoring is important, so the networking
diff -druN linux-libre-3.4.17-gnu/drivers/target/target_core_transport.c linux-libre-3.4.18-gnu/drivers/target/target_core_transport.c
--- linux-libre-3.4.17-gnu/drivers/target/target_core_transport.c	2012-10-31 13:05:17.000000000 -0400
+++ linux-libre-3.4.18-gnu/drivers/target/target_core_transport.c	2012-11-05 03:50:52.000000000 -0500
@@ -1748,7 +1748,6 @@
 
 	se_cmd->se_tmr_req->response = TMR_LUN_DOES_NOT_EXIST;
 	se_cmd->se_tfo->queue_tm_rsp(se_cmd);
-	transport_generic_free_cmd(se_cmd, 0);
 }
 
 /**
diff -druN linux-libre-3.4.17-gnu/fs/ext4/ialloc.c linux-libre-3.4.18-gnu/fs/ext4/ialloc.c
--- linux-libre-3.4.17-gnu/fs/ext4/ialloc.c	2012-10-31 13:05:17.000000000 -0400
+++ linux-libre-3.4.18-gnu/fs/ext4/ialloc.c	2012-11-05 03:50:52.000000000 -0500
@@ -697,6 +697,10 @@
 				   "inode=%lu", ino + 1);
 			continue;
 		}
+		BUFFER_TRACE(inode_bitmap_bh, "get_write_access");
+		err = ext4_journal_get_write_access(handle, inode_bitmap_bh);
+		if (err)
+			goto fail;
 		ext4_lock_group(sb, group);
 		ret2 = ext4_test_and_set_bit(ino, inode_bitmap_bh->b_data);
 		ext4_unlock_group(sb, group);
@@ -710,6 +714,11 @@
 	goto out;
 
 got:
+	BUFFER_TRACE(inode_bitmap_bh, "call ext4_handle_dirty_metadata");
+	err = ext4_handle_dirty_metadata(handle, NULL, inode_bitmap_bh);
+	if (err)
+		goto fail;
+
 	/* We may have to initialize the block bitmap if it isn't already */
 	if (EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_GDT_CSUM) &&
 	    gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) {
@@ -742,11 +751,6 @@
 			goto fail;
 	}
 
-	BUFFER_TRACE(inode_bitmap_bh, "get_write_access");
-	err = ext4_journal_get_write_access(handle, inode_bitmap_bh);
-	if (err)
-		goto fail;
-
 	BUFFER_TRACE(group_desc_bh, "get_write_access");
 	err = ext4_journal_get_write_access(handle, group_desc_bh);
 	if (err)
@@ -789,11 +793,6 @@
 		ext4_unlock_group(sb, group);
 	}
 
-	BUFFER_TRACE(inode_bitmap_bh, "call ext4_handle_dirty_metadata");
-	err = ext4_handle_dirty_metadata(handle, NULL, inode_bitmap_bh);
-	if (err)
-		goto fail;
-
 	BUFFER_TRACE(group_desc_bh, "call ext4_handle_dirty_metadata");
 	err = ext4_handle_dirty_metadata(handle, NULL, group_desc_bh);
 	if (err)
diff -druN linux-libre-3.4.17-gnu/Makefile linux-libre-3.4.18-gnu/Makefile
--- linux-libre-3.4.17-gnu/Makefile	2012-10-31 17:27:41.000000000 -0400
+++ linux-libre-3.4.18-gnu/Makefile	2012-11-05 14:14:46.000000000 -0500
@@ -1,6 +1,6 @@
 VERSION = 3
 PATCHLEVEL = 4
-SUBLEVEL = 17
+SUBLEVEL = 18
 EXTRAVERSION =-gnu
 NAME = Saber-toothed Squirrel
 
