Commit 9c07b6c6 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Nathan Scott

[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 <andre@tomt.net> for help in debugging this.
parent 07aecea7
...@@ -78,7 +78,7 @@ static u8 aec62xx_proc; ...@@ -78,7 +78,7 @@ static u8 aec62xx_proc;
static int aec62xx_get_info(char *, char **, off_t, int); 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", .name = "aec62xx",
.set = 1, .set = 1,
......
...@@ -15,7 +15,7 @@ static u8 ali_proc; ...@@ -15,7 +15,7 @@ static u8 ali_proc;
static int ali_get_info(char *, char **, off_t, int); 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", .name = "ali",
.set = 1, .set = 1,
......
...@@ -15,7 +15,7 @@ static u8 amd74xx_proc; ...@@ -15,7 +15,7 @@ static u8 amd74xx_proc;
static int amd74xx_get_info(char *, char **, off_t, int); 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", .name = "amd74xx",
.set = 1, .set = 1,
......
...@@ -69,7 +69,7 @@ static u8 cmd64x_proc; ...@@ -69,7 +69,7 @@ static u8 cmd64x_proc;
static char * print_cmd64x_get_info(char *, struct pci_dev *, int); static char * print_cmd64x_get_info(char *, struct pci_dev *, int);
static int cmd64x_get_info(char *, char **, off_t, 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", .name = "cmd64x",
.set = 1, .set = 1,
......
...@@ -15,7 +15,7 @@ static u8 cs5520_proc; ...@@ -15,7 +15,7 @@ static u8 cs5520_proc;
static int cs5520_get_info(char *, char **, off_t, int); 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", .name = "cs5520",
.set = 1, .set = 1,
......
...@@ -15,7 +15,7 @@ static u8 cs5530_proc; ...@@ -15,7 +15,7 @@ static u8 cs5530_proc;
static int cs5530_get_info(char *, char **, off_t, int); 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", .name = "cs5530",
.set = 1, .set = 1,
......
...@@ -21,7 +21,7 @@ static u8 hpt34x_proc; ...@@ -21,7 +21,7 @@ static u8 hpt34x_proc;
static int hpt34x_get_info(char *, char **, off_t, int); 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", .name = "hpt34x",
.set = 1, .set = 1,
......
...@@ -424,7 +424,7 @@ static u8 hpt366_proc; ...@@ -424,7 +424,7 @@ static u8 hpt366_proc;
static int hpt366_get_info(char *, char **, off_t, int); 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", .name = "hpt366",
.set = 1, .set = 1,
......
...@@ -172,7 +172,7 @@ static u8 pdcnew_proc; ...@@ -172,7 +172,7 @@ static u8 pdcnew_proc;
static int pdcnew_get_info(char *, char **, off_t, int); 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", .name = "pdcnew",
.set = 1, .set = 1,
......
...@@ -207,7 +207,7 @@ static u8 pdc202xx_proc; ...@@ -207,7 +207,7 @@ static u8 pdc202xx_proc;
static int pdc202xx_get_info(char *, char **, off_t, int); 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", .name = "pdc202xx",
.set = 1, .set = 1,
......
...@@ -17,7 +17,7 @@ static u8 piix_proc; ...@@ -17,7 +17,7 @@ static u8 piix_proc;
static int piix_get_info(char *, char **, off_t, int); 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", .name = "piix",
.set = 1, .set = 1,
......
...@@ -15,7 +15,7 @@ static u8 sc1200_proc; ...@@ -15,7 +15,7 @@ static u8 sc1200_proc;
static int sc1200_get_info(char *, char **, off_t, int); 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", .name = "sc1200",
.set = 1, .set = 1,
......
...@@ -31,7 +31,7 @@ static u8 svwks_proc; ...@@ -31,7 +31,7 @@ static u8 svwks_proc;
static int svwks_get_info(char *, char **, off_t, int); 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", .name = "svwks",
.set = 1, .set = 1,
......
...@@ -31,7 +31,7 @@ static int siimage_get_info(char *, char **, off_t, int); ...@@ -31,7 +31,7 @@ static int siimage_get_info(char *, char **, off_t, int);
static u8 siimage_proc; static u8 siimage_proc;
static ide_pci_host_proc_t siimage_procs[] __initdata = { static ide_pci_host_proc_t siimage_procs[] = {
{ {
.name = "siimage", .name = "siimage",
.set = 1, .set = 1,
......
...@@ -15,7 +15,7 @@ static u8 sis_proc; ...@@ -15,7 +15,7 @@ static u8 sis_proc;
static int sis_get_info(char *, char **, off_t, int); 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", .name = "sis",
.set = 1, .set = 1,
......
...@@ -17,7 +17,7 @@ static u8 slc90e66_proc; ...@@ -17,7 +17,7 @@ static u8 slc90e66_proc;
static int slc90e66_get_info(char *, char **, off_t, int); 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", .name = "slc90e66",
.set = 1, .set = 1,
......
...@@ -17,7 +17,7 @@ static void init_hwif_triflex(ide_hwif_t *); ...@@ -17,7 +17,7 @@ static void init_hwif_triflex(ide_hwif_t *);
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
static int triflex_get_info(char *, char **, off_t, int); 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", .name = "triflex",
.set = 1, .set = 1,
.get_info = triflex_get_info, .get_info = triflex_get_info,
......
...@@ -15,7 +15,7 @@ static u8 via_proc; ...@@ -15,7 +15,7 @@ static u8 via_proc;
static int via_get_info(char *, char **, off_t, int); 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", .name = "via",
.set = 1, .set = 1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment