Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Linus Torvalds committed Oct 3, 2013
2 parents 981d901 + a988fb8 commit 164a2c5
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
7 changes: 6 additions & 1 deletion arch/sparc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/include/asm/floppy_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
3 changes: 2 additions & 1 deletion arch/sparc/kernel/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

#
# Makefile for the linux kernel.
#
Expand Down Expand Up @@ -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

Expand Down
5 changes: 2 additions & 3 deletions arch/sparc/kernel/ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions arch/sparc/kernel/ldc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions include/asm-generic/hugetlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 164a2c5

Please sign in to comment.