Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 164a2c58 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull sparc fixes from David Miller:
 "Couple of small bug fixes:

   1) strlcpy in ldom_reboot() is still not quite right, use sprintf
      instead from Kees Cook.

   2) Generic hugetlb interface pte checks should use the widest return
      type, otherwise high bits can get chopped off.

   3) Fix build with PCI MSI enabled on 32-bit sparc"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc: fix MSI build failure on Sparc32
  sparc: remove deprecated IRQF_DISABLED
  mm: Fix generic hugetlb pte check return type.
  sparc: fix ldom_reboot buffer overflow harder
parents 981d9010 a988fb80
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -506,12 +506,17 @@ config SUN_OPENPROMFS
	  Only choose N if you know in advance that you will not need to modify
	  OpenPROM settings on the running system.

# Makefile helper
# Makefile helpers
config SPARC64_PCI
	bool
	default y
	depends on SPARC64 && PCI

config SPARC64_PCI_MSI
	bool
	default y
	depends on SPARC64_PCI && PCI_MSI

endmenu

menu "Executable file formats"
+1 −1
Original line number Diff line number Diff line
@@ -254,7 +254,7 @@ static int sun_fd_request_irq(void)
		once = 1;

		error = request_irq(FLOPPY_IRQ, sparc_floppy_irq,
				    IRQF_DISABLED, "floppy", NULL);
				    0, "floppy", NULL);

		return ((error == 0) ? 0 : -1);
	}
+2 −1
Original line number Diff line number Diff line

#
# Makefile for the linux kernel.
#
@@ -99,7 +100,7 @@ obj-$(CONFIG_STACKTRACE) += stacktrace.o
obj-$(CONFIG_SPARC64_PCI)    += pci.o pci_common.o psycho_common.o
obj-$(CONFIG_SPARC64_PCI)    += pci_psycho.o pci_sabre.o pci_schizo.o
obj-$(CONFIG_SPARC64_PCI)    += pci_sun4v.o pci_sun4v_asm.o pci_fire.o
obj-$(CONFIG_PCI_MSI)        += pci_msi.o
obj-$(CONFIG_SPARC64_PCI_MSI) += pci_msi.o

obj-$(CONFIG_COMPAT)         += sys32.o sys_sparc32.o signal32.o

+2 −3
Original line number Diff line number Diff line
@@ -849,9 +849,8 @@ void ldom_reboot(const char *boot_command)
	if (boot_command && strlen(boot_command)) {
		unsigned long len;

		strcpy(full_boot_str, "boot ");
		strlcpy(full_boot_str + strlen("boot "), boot_command,
			sizeof(full_boot_str));
		snprintf(full_boot_str, sizeof(full_boot_str), "boot %s",
			 boot_command);
		len = strlen(full_boot_str);

		if (reboot_data_supported) {
+2 −2
Original line number Diff line number Diff line
@@ -1249,12 +1249,12 @@ int ldc_bind(struct ldc_channel *lp, const char *name)
	snprintf(lp->rx_irq_name, LDC_IRQ_NAME_MAX, "%s RX", name);
	snprintf(lp->tx_irq_name, LDC_IRQ_NAME_MAX, "%s TX", name);

	err = request_irq(lp->cfg.rx_irq, ldc_rx, IRQF_DISABLED,
	err = request_irq(lp->cfg.rx_irq, ldc_rx, 0,
			  lp->rx_irq_name, lp);
	if (err)
		return err;

	err = request_irq(lp->cfg.tx_irq, ldc_tx, IRQF_DISABLED,
	err = request_irq(lp->cfg.tx_irq, ldc_tx, 0,
			  lp->tx_irq_name, lp);
	if (err) {
		free_irq(lp->cfg.rx_irq, lp);
Loading