Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc

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
This commit is contained in:
Linus Torvalds 2013-10-02 20:58:33 -07:00
commit 164a2c5822
6 changed files with 15 additions and 10 deletions

View file

@ -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"

View file

@ -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);
}

View file

@ -1,3 +1,4 @@
#
# 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

View file

@ -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) {

View file

@ -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);

View file

@ -6,12 +6,12 @@ static inline pte_t mk_huge_pte(struct page *page, pgprot_t pgprot)
return mk_pte(page, pgprot);
}
static inline int huge_pte_write(pte_t pte)
static inline unsigned long huge_pte_write(pte_t pte)
{
return pte_write(pte);
}
static inline int huge_pte_dirty(pte_t pte)
static inline unsigned long huge_pte_dirty(pte_t pte)
{
return pte_dirty(pte);
}