History

[PATCH] Remove __devinitdata from notifier block definitions

Few of the notifier_chain_register() callers use __devinitdata in the definition of notifier_block data structure. It is incorrect as the data structure should be available after the initializations (they do not unregister them during initializations). This was leading to an oops when notifier_chain_register() call is invoked for those callback chains after initialization. This patch fixes all such usages to _not_ have the notifier_block data structure in the init data section.

Chandra Seetharaman committed 20 years ago

Commit 649bbaa1 parent e7edf9c9 files · +9 −9Browse files

Unified · Split

9 files
  1. arch/powerpc/kernel/sysfs.c +1 −1
  2. arch/s390/appldata/appldata_base.c +1 −1
  3. block/ll_rw_blk.c +1 −1
  4. kernel/hrtimer.c +1 −1
  5. kernel/rcupdate.c +1 −1
  6. kernel/sched.c +1 −1
  7. kernel/softirq.c +1 −1
  8. kernel/softlockup.c +1 −1
  9. kernel/timer.c +1 −1
arch/powerpc/kernel/sysfs.c+1−1
@@ -297,7 +297,7 @@ static int __devinit sysfs_cpu_notify(struct notifier_block *self, · 296 unmodified lines
297297 return NOTIFY_OK;
298298 }
299299
300−static struct notifier_block __devinitdata sysfs_cpu_nb = {
300+static struct notifier_block sysfs_cpu_nb = {
301301 .notifier_call = sysfs_cpu_notify,
302302 };
303303
arch/s390/appldata/appldata_base.c+1−1
@@ -652,7 +652,7 @@ appldata_cpu_notify(struct notifier_block *self, · 651 unmodified lines
652652 return NOTIFY_OK;
653653 }
654654
655−static struct notifier_block __devinitdata appldata_nb = {
655+static struct notifier_block appldata_nb = {
656656 .notifier_call = appldata_cpu_notify,
657657 };
658658
block/ll_rw_blk.c+1−1
@@ -3385,7 +3385,7 @@ static int blk_cpu_notify(struct notifier_block *self, unsigned long action, · 3384 unmodified lines
33853385 }
33863386
33873387
3388−static struct notifier_block __devinitdata blk_cpu_notifier = {
3388+static struct notifier_block blk_cpu_notifier = {
33893389 .notifier_call = blk_cpu_notify,
33903390 };
33913391
kernel/hrtimer.c+1−1
@@ -860,7 +860,7 @@ static int __devinit hrtimer_cpu_notify(struct notifier_block *self, · 859 unmodified lines
860860 return NOTIFY_OK;
861861 }
862862
863−static struct notifier_block __devinitdata hrtimers_nb = {
863+static struct notifier_block hrtimers_nb = {
864864 .notifier_call = hrtimer_cpu_notify,
865865 };
866866
kernel/rcupdate.c+1−1
@@ -537,7 +537,7 @@ static int __devinit rcu_cpu_notify(struct notifier_block *self, · 536 unmodified lines
537537 return NOTIFY_OK;
538538 }
539539
540−static struct notifier_block __devinitdata rcu_nb = {
540+static struct notifier_block rcu_nb = {
541541 .notifier_call = rcu_cpu_notify,
542542 };
543543
kernel/sched.c+1−1
@@ -4814,7 +4814,7 @@ static int migration_call(struct notifier_block *nfb, unsigned long action, · 4813 unmodified lines
48144814 /* Register at highest priority so that task migration (migrate_all_tasks)
48154815 * happens before everything else.
48164816 */
4817−static struct notifier_block __devinitdata migration_notifier = {
4817+static struct notifier_block migration_notifier = {
48184818 .notifier_call = migration_call,
48194819 .priority = 10
48204820 };
kernel/softirq.c+1−1
@@ -484,7 +484,7 @@ static int __devinit cpu_callback(struct notifier_block *nfb, · 483 unmodified lines
484484 return NOTIFY_OK;
485485 }
486486
487−static struct notifier_block __devinitdata cpu_nfb = {
487+static struct notifier_block cpu_nfb = {
488488 .notifier_call = cpu_callback
489489 };
490490
kernel/softlockup.c+1−1
@@ -140,7 +140,7 @@ cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) · 139 unmodified lines
140140 return NOTIFY_OK;
141141 }
142142
143−static struct notifier_block __devinitdata cpu_nfb = {
143+static struct notifier_block cpu_nfb = {
144144 .notifier_call = cpu_callback
145145 };
146146
kernel/timer.c+1−1
@@ -1334,7 +1334,7 @@ static int __devinit timer_cpu_notify(struct notifier_block *self, · 1333 unmodified lines
13341334 return NOTIFY_OK;
13351335 }
13361336
1337−static struct notifier_block __devinitdata timers_nb = {
1337+static struct notifier_block timers_nb = {
13381338 .notifier_call = timer_cpu_notify,
13391339 };
13401340