From 9c07b6c6ca105a85f888e43ea7ba86f84a4e3a67 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Sun, 8 Feb 2004 15:36:39 -0800 Subject: [PATCH] [PATCH] fix OOPS for multiple IDE PCI modules and CONFIG_PROC_FS=y The problem is that when loading next IDE PCI module memory used by previously registered ide_pci_host_proc_list entry is already unmapped (because of __{dev}initdata). This doesn't happen in built-in case because this memory is freed after all drivers are initialized. Fix it by removing __{dev}initdata from all ide_pci_host_proc_t. Thanks to Andre Tomt for help in debugging this. --- drivers/ide/pci/aec62xx.h | 2 +- drivers/ide/pci/alim15x3.h | 2 +- drivers/ide/pci/amd74xx.h | 2 +- drivers/ide/pci/cmd64x.h | 2 +- drivers/ide/pci/cs5520.h | 2 +- drivers/ide/pci/cs5530.h | 2 +- drivers/ide/pci/hpt34x.h | 2 +- drivers/ide/pci/hpt366.h | 2 +- drivers/ide/pci/pdc202xx_new.h | 2 +- drivers/ide/pci/pdc202xx_old.h | 2 +- drivers/ide/pci/piix.h | 2 +- drivers/ide/pci/sc1200.h | 2 +- drivers/ide/pci/serverworks.h | 2 +- drivers/ide/pci/siimage.h | 2 +- drivers/ide/pci/sis5513.h | 2 +- drivers/ide/pci/slc90e66.h | 2 +- drivers/ide/pci/triflex.h | 2 +- drivers/ide/pci/via82cxxx.h | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/ide/pci/aec62xx.h b/drivers/ide/pci/aec62xx.h index f0dd168f04d0a..c5584c41093cb 100644 --- a/drivers/ide/pci/aec62xx.h +++ b/drivers/ide/pci/aec62xx.h @@ -78,7 +78,7 @@ static u8 aec62xx_proc; static int aec62xx_get_info(char *, char **, off_t, int); -static ide_pci_host_proc_t aec62xx_procs[] __initdata = { +static ide_pci_host_proc_t aec62xx_procs[] = { { .name = "aec62xx", .set = 1, diff --git a/drivers/ide/pci/alim15x3.h b/drivers/ide/pci/alim15x3.h index 30c752f773cb9..2111305e7e100 100644 --- a/drivers/ide/pci/alim15x3.h +++ b/drivers/ide/pci/alim15x3.h @@ -15,7 +15,7 @@ static u8 ali_proc; static int ali_get_info(char *, char **, off_t, int); -static ide_pci_host_proc_t ali_procs[] __initdata = { +static ide_pci_host_proc_t ali_procs[] = { { .name = "ali", .set = 1, diff --git a/drivers/ide/pci/amd74xx.h b/drivers/ide/pci/amd74xx.h index 56a3892b67efc..2a570231e239d 100644 --- a/drivers/ide/pci/amd74xx.h +++ b/drivers/ide/pci/amd74xx.h @@ -15,7 +15,7 @@ static u8 amd74xx_proc; static int amd74xx_get_info(char *, char **, off_t, int); -static ide_pci_host_proc_t amd74xx_procs[] __initdata = { +static ide_pci_host_proc_t amd74xx_procs[] = { { .name = "amd74xx", .set = 1, diff --git a/drivers/ide/pci/cmd64x.h b/drivers/ide/pci/cmd64x.h index 253c517e540f3..50f7e17236c1f 100644 --- a/drivers/ide/pci/cmd64x.h +++ b/drivers/ide/pci/cmd64x.h @@ -69,7 +69,7 @@ static u8 cmd64x_proc; static char * print_cmd64x_get_info(char *, struct pci_dev *, int); static int cmd64x_get_info(char *, char **, off_t, int); -static ide_pci_host_proc_t cmd64x_procs[] __initdata = { +static ide_pci_host_proc_t cmd64x_procs[] = { { .name = "cmd64x", .set = 1, diff --git a/drivers/ide/pci/cs5520.h b/drivers/ide/pci/cs5520.h index e5e65183db934..33ebf1da34d04 100644 --- a/drivers/ide/pci/cs5520.h +++ b/drivers/ide/pci/cs5520.h @@ -15,7 +15,7 @@ static u8 cs5520_proc; static int cs5520_get_info(char *, char **, off_t, int); -static ide_pci_host_proc_t cs5520_procs[] __initdata = { +static ide_pci_host_proc_t cs5520_procs[] = { { .name = "cs5520", .set = 1, diff --git a/drivers/ide/pci/cs5530.h b/drivers/ide/pci/cs5530.h index 942e26ae2e445..aa1fba5c682a9 100644 --- a/drivers/ide/pci/cs5530.h +++ b/drivers/ide/pci/cs5530.h @@ -15,7 +15,7 @@ static u8 cs5530_proc; static int cs5530_get_info(char *, char **, off_t, int); -static ide_pci_host_proc_t cs5530_procs[] __initdata = { +static ide_pci_host_proc_t cs5530_procs[] = { { .name = "cs5530", .set = 1, diff --git a/drivers/ide/pci/hpt34x.h b/drivers/ide/pci/hpt34x.h index 0bf33aa1fd51d..6c8a2013086d6 100644 --- a/drivers/ide/pci/hpt34x.h +++ b/drivers/ide/pci/hpt34x.h @@ -21,7 +21,7 @@ static u8 hpt34x_proc; static int hpt34x_get_info(char *, char **, off_t, int); -static ide_pci_host_proc_t hpt34x_procs[] __initdata = { +static ide_pci_host_proc_t hpt34x_procs[] = { { .name = "hpt34x", .set = 1, diff --git a/drivers/ide/pci/hpt366.h b/drivers/ide/pci/hpt366.h index 5600f3ce04109..bcc8b8e867292 100644 --- a/drivers/ide/pci/hpt366.h +++ b/drivers/ide/pci/hpt366.h @@ -424,7 +424,7 @@ static u8 hpt366_proc; static int hpt366_get_info(char *, char **, off_t, int); -static ide_pci_host_proc_t hpt366_procs[] __initdata = { +static ide_pci_host_proc_t hpt366_procs[] = { { .name = "hpt366", .set = 1, diff --git a/drivers/ide/pci/pdc202xx_new.h b/drivers/ide/pci/pdc202xx_new.h index 41008c1424048..c05155332ab18 100644 --- a/drivers/ide/pci/pdc202xx_new.h +++ b/drivers/ide/pci/pdc202xx_new.h @@ -172,7 +172,7 @@ static u8 pdcnew_proc; static int pdcnew_get_info(char *, char **, off_t, int); -static ide_pci_host_proc_t pdcnew_procs[] __initdata = { +static ide_pci_host_proc_t pdcnew_procs[] = { { .name = "pdcnew", .set = 1, diff --git a/drivers/ide/pci/pdc202xx_old.h b/drivers/ide/pci/pdc202xx_old.h index b3b5388a5b808..e3f0aaa047b3b 100644 --- a/drivers/ide/pci/pdc202xx_old.h +++ b/drivers/ide/pci/pdc202xx_old.h @@ -207,7 +207,7 @@ static u8 pdc202xx_proc; static int pdc202xx_get_info(char *, char **, off_t, int); -static ide_pci_host_proc_t pdc202xx_procs[] __initdata = { +static ide_pci_host_proc_t pdc202xx_procs[] = { { .name = "pdc202xx", .set = 1, diff --git a/drivers/ide/pci/piix.h b/drivers/ide/pci/piix.h index 17268901b8f03..4f160e9ace9f7 100644 --- a/drivers/ide/pci/piix.h +++ b/drivers/ide/pci/piix.h @@ -17,7 +17,7 @@ static u8 piix_proc; static int piix_get_info(char *, char **, off_t, int); -static ide_pci_host_proc_t piix_procs[] __devinitdata = { +static ide_pci_host_proc_t piix_procs[] = { { .name = "piix", .set = 1, diff --git a/drivers/ide/pci/sc1200.h b/drivers/ide/pci/sc1200.h index 8714e5391446d..09a3ff9442edf 100644 --- a/drivers/ide/pci/sc1200.h +++ b/drivers/ide/pci/sc1200.h @@ -15,7 +15,7 @@ static u8 sc1200_proc; static int sc1200_get_info(char *, char **, off_t, int); -static ide_pci_host_proc_t sc1200_procs[] __initdata = { +static ide_pci_host_proc_t sc1200_procs[] = { { .name = "sc1200", .set = 1, diff --git a/drivers/ide/pci/serverworks.h b/drivers/ide/pci/serverworks.h index aec835380e293..34c4c00de02a3 100644 --- a/drivers/ide/pci/serverworks.h +++ b/drivers/ide/pci/serverworks.h @@ -31,7 +31,7 @@ static u8 svwks_proc; static int svwks_get_info(char *, char **, off_t, int); -static ide_pci_host_proc_t svwks_procs[] __initdata = { +static ide_pci_host_proc_t svwks_procs[] = { { .name = "svwks", .set = 1, diff --git a/drivers/ide/pci/siimage.h b/drivers/ide/pci/siimage.h index e16b507efc4f8..166339f30fa3b 100644 --- a/drivers/ide/pci/siimage.h +++ b/drivers/ide/pci/siimage.h @@ -31,7 +31,7 @@ static int siimage_get_info(char *, char **, off_t, int); static u8 siimage_proc; -static ide_pci_host_proc_t siimage_procs[] __initdata = { +static ide_pci_host_proc_t siimage_procs[] = { { .name = "siimage", .set = 1, diff --git a/drivers/ide/pci/sis5513.h b/drivers/ide/pci/sis5513.h index 29254a674dd19..890b67a07e8b8 100644 --- a/drivers/ide/pci/sis5513.h +++ b/drivers/ide/pci/sis5513.h @@ -15,7 +15,7 @@ static u8 sis_proc; static int sis_get_info(char *, char **, off_t, int); -static ide_pci_host_proc_t sis_procs[] __initdata = { +static ide_pci_host_proc_t sis_procs[] = { { .name = "sis", .set = 1, diff --git a/drivers/ide/pci/slc90e66.h b/drivers/ide/pci/slc90e66.h index 2ac8673373bab..626f775ef2990 100644 --- a/drivers/ide/pci/slc90e66.h +++ b/drivers/ide/pci/slc90e66.h @@ -17,7 +17,7 @@ static u8 slc90e66_proc; static int slc90e66_get_info(char *, char **, off_t, int); -static ide_pci_host_proc_t slc90e66_procs[] __initdata = { +static ide_pci_host_proc_t slc90e66_procs[] = { { .name = "slc90e66", .set = 1, diff --git a/drivers/ide/pci/triflex.h b/drivers/ide/pci/triflex.h index b208926283ed0..5bb7f12dd0cd4 100644 --- a/drivers/ide/pci/triflex.h +++ b/drivers/ide/pci/triflex.h @@ -17,7 +17,7 @@ static void init_hwif_triflex(ide_hwif_t *); #ifdef CONFIG_PROC_FS static int triflex_get_info(char *, char **, off_t, int); -static ide_pci_host_proc_t triflex_proc __initdata = { +static ide_pci_host_proc_t triflex_proc = { .name = "triflex", .set = 1, .get_info = triflex_get_info, diff --git a/drivers/ide/pci/via82cxxx.h b/drivers/ide/pci/via82cxxx.h index d60d5023420c9..0c1d390c5ba44 100644 --- a/drivers/ide/pci/via82cxxx.h +++ b/drivers/ide/pci/via82cxxx.h @@ -15,7 +15,7 @@ static u8 via_proc; static int via_get_info(char *, char **, off_t, int); -static ide_pci_host_proc_t via_procs[] __initdata = { +static ide_pci_host_proc_t via_procs[] = { { .name = "via", .set = 1, -- 2.53.0