Patch "driver core: Set deferred_probe_timeout to a longer default if CONFIG_MODULES is set" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    driver core: Set deferred_probe_timeout to a longer default if CONFIG_MODULES is set

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     driver-core-set-deferred_probe_timeout-to-a-longer-d.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit cae2bae22ae13e0c31293862dc9addea3118695e
Author: John Stultz <john.stultz@xxxxxxxxxx>
Date:   Tue Feb 25 05:08:24 2020 +0000

    driver core: Set deferred_probe_timeout to a longer default if CONFIG_MODULES is set
    
    [ Upstream commit e2cec7d6853712295cef5377762165a489b2957f ]
    
    When using modules, its common for the modules not to be loaded
    until quite late by userland. With the current code,
    driver_deferred_probe_check_state() will stop returning
    EPROBE_DEFER after late_initcall, which can cause module
    dependency resolution to fail after that.
    
    So allow a longer window of 30 seconds (picked somewhat
    arbitrarily, but influenced by the similar regulator core
    timeout value) in the case where modules are enabled.
    
    Cc: linux-pm@xxxxxxxxxxxxxxx
    Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Cc: Linus Walleij <linus.walleij@xxxxxxxxxx>
    Cc: Thierry Reding <treding@xxxxxxxxxx>
    Cc: Mark Brown <broonie@xxxxxxxxxx>
    Cc: Liam Girdwood <lgirdwood@xxxxxxxxx>
    Cc: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
    Cc: Saravana Kannan <saravanak@xxxxxxxxxx>
    Cc: Todd Kjos <tkjos@xxxxxxxxxx>
    Cc: Len Brown <len.brown@xxxxxxxxx>
    Cc: Pavel Machek <pavel@xxxxxx>
    Cc: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
    Cc: Kevin Hilman <khilman@xxxxxxxxxx>
    Cc: "Rafael J. Wysocki" <rjw@xxxxxxxxxxxxx>
    Cc: Rob Herring <robh@xxxxxxxxxx>
    Reviewed-by: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
    Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
    Signed-off-by: John Stultz <john.stultz@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20200225050828.56458-3-john.stultz@xxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 2a28e07d2e0b..490cffffcae4 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -224,7 +224,16 @@ static int deferred_devs_show(struct seq_file *s, void *data)
 }
 DEFINE_SHOW_ATTRIBUTE(deferred_devs);
 
+#ifdef CONFIG_MODULES
+/*
+ * In the case of modules, set the default probe timeout to
+ * 30 seconds to give userland some time to load needed modules
+ */
+static int deferred_probe_timeout = 30;
+#else
+/* In the case of !modules, no probe timeout needed */
 static int deferred_probe_timeout = -1;
+#endif
 static int __init deferred_probe_timeout_setup(char *str)
 {
 	int timeout;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux