From: Greg Kroah-Hartman Date: Thu, 3 Aug 2017 19:39:12 +0000 (-0700) Subject: 4.9-stable patches X-Git-Tag: v4.12.5~37 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=69149bdf0fa03f947e38d3aadb4b0937c52d0f34;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: staging-comedi-comedi_fops-avoid-orphaned-proc-entry.patch --- diff --git a/queue-4.9/series b/queue-4.9/series index 5ca3df082c8..449cb96cb31 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -19,3 +19,4 @@ drm-nouveau-bar-gf100-fix-access-to-upper-half-of-bar2.patch kvm-ppc-book3s-hv-restore-critical-sprs-to-host-values-on-guest-exit.patch kvm-ppc-book3s-hv-save-restore-host-values-of-debug-registers.patch revert-powerpc-numa-fix-percpu-allocations-to-be-numa-aware.patch +staging-comedi-comedi_fops-avoid-orphaned-proc-entry.patch diff --git a/queue-4.9/staging-comedi-comedi_fops-avoid-orphaned-proc-entry.patch b/queue-4.9/staging-comedi-comedi_fops-avoid-orphaned-proc-entry.patch new file mode 100644 index 00000000000..01861b544d7 --- /dev/null +++ b/queue-4.9/staging-comedi-comedi_fops-avoid-orphaned-proc-entry.patch @@ -0,0 +1,42 @@ +From bf279ece37d2a3eaaa9813fcd7a1d8a81eb29c20 Mon Sep 17 00:00:00 2001 +From: Cheah Kok Cheong +Date: Fri, 30 Dec 2016 19:25:52 +0800 +Subject: Staging: comedi: comedi_fops: Avoid orphaned proc entry + +From: Cheah Kok Cheong + +commit bf279ece37d2a3eaaa9813fcd7a1d8a81eb29c20 upstream. + +Move comedi_proc_init to the end to avoid orphaned proc entry +if module loading failed. + +Signed-off-by: Cheah Kok Cheong +Reviewed-by: Ian Abbott +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/comedi/comedi_fops.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/staging/comedi/comedi_fops.c ++++ b/drivers/staging/comedi/comedi_fops.c +@@ -2898,9 +2898,6 @@ static int __init comedi_init(void) + + comedi_class->dev_groups = comedi_dev_groups; + +- /* XXX requires /proc interface */ +- comedi_proc_init(); +- + /* create devices files for legacy/manual use */ + for (i = 0; i < comedi_num_legacy_minors; i++) { + struct comedi_device *dev; +@@ -2918,6 +2915,9 @@ static int __init comedi_init(void) + mutex_unlock(&dev->mutex); + } + ++ /* XXX requires /proc interface */ ++ comedi_proc_init(); ++ + return 0; + } + module_init(comedi_init);