Re: [WATCHDOG] v2.6.13 watchdog-patches
Hi Arjen, > this looks ENTIRELY like the wrong solution! To be honoust: I'm not in favour of using refcounts unnecessarily either. > Isn't it a LOT easier to just del_timer_sync() the timer from the module > exit code? Mucking with module refcounts in a driver is almost always a > sign of a bug or at least really bad design, and I think that is the > case here. However, the goal is to make sure that the "watchdog" stays running and watches the system and that it in case of abnormal behaviour reboots the system. And you can't get that if you delete the timer. Greetings, Wim. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [WATCHDOG] v2.6.13 watchdog-patches
Hi Arjen, this looks ENTIRELY like the wrong solution! To be honoust: I'm not in favour of using refcounts unnecessarily either. Isn't it a LOT easier to just del_timer_sync() the timer from the module exit code? Mucking with module refcounts in a driver is almost always a sign of a bug or at least really bad design, and I think that is the case here. However, the goal is to make sure that the watchdog stays running and watches the system and that it in case of abnormal behaviour reboots the system. And you can't get that if you delete the timer. Greetings, Wim. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [WATCHDOG] v2.6.13 watchdog-patches
On Sat, 2005-09-03 at 22:11 +0200, Arjan van de Ven wrote: > On Sat, 2005-09-03 at 22:04 +0200, Wim Van Sebroeck wrote: > > Author: Chuck Ebbert <[EMAIL PROTECTED]> > > Date: Fri Aug 19 14:14:07 2005 +0200 > > > > [WATCHDOG] softdog-timer-running-oops.patch > > > > The softdog watchdog timer has a bug that can create an oops: > > > > 1. Load the module without the nowayout option. > > 2. Open the driver and close it without writing 'V' before close. > > 3. Unload the module. The timer will continue to run... > > 4. Oops happens when timer fires. > > > > Reported Sun, 10 Oct 2004, by Michael Schierl <[EMAIL PROTECTED]> > > > > Fix is easy: always take a reference on the module on open. > > Release it only when the device is closed and no timer is running. > > Tested on 2.6.13-rc6 using the soft_noboot option. While the > > timer is running and the device is closed, the module use count > > stays at 1. After the timer fires, it drops to 0. Repeatedly > > opening and closing the driver caused no problems. Please apply. > > > this looks ENTIRELY like the wrong solution! > Isn't it a LOT easier to just del_timer_sync() the timer from the module > exit code? Mucking with module refcounts in a driver is almost always a > sign of a bug or at least really bad design, and I think that is the > case here. > But that defeats the purpose of the nowayout option doesn't it? josh - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [WATCHDOG] v2.6.13 watchdog-patches
On Sat, 2005-09-03 at 22:11 +0200, Arjan van de Ven wrote: On Sat, 2005-09-03 at 22:04 +0200, Wim Van Sebroeck wrote: Author: Chuck Ebbert [EMAIL PROTECTED] Date: Fri Aug 19 14:14:07 2005 +0200 [WATCHDOG] softdog-timer-running-oops.patch The softdog watchdog timer has a bug that can create an oops: 1. Load the module without the nowayout option. 2. Open the driver and close it without writing 'V' before close. 3. Unload the module. The timer will continue to run... 4. Oops happens when timer fires. Reported Sun, 10 Oct 2004, by Michael Schierl [EMAIL PROTECTED] Fix is easy: always take a reference on the module on open. Release it only when the device is closed and no timer is running. Tested on 2.6.13-rc6 using the soft_noboot option. While the timer is running and the device is closed, the module use count stays at 1. After the timer fires, it drops to 0. Repeatedly opening and closing the driver caused no problems. Please apply. this looks ENTIRELY like the wrong solution! Isn't it a LOT easier to just del_timer_sync() the timer from the module exit code? Mucking with module refcounts in a driver is almost always a sign of a bug or at least really bad design, and I think that is the case here. But that defeats the purpose of the nowayout option doesn't it? josh - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [WATCHDOG] v2.6.13 watchdog-patches
In-Reply-To: <[EMAIL PROTECTED]> On Sat, 03 Sep 2005 at 22:11:41 +0200, Arjan van de Ven wrote: > this looks ENTIRELY like the wrong solution! > Isn't it a LOT easier to just del_timer_sync() the timer from the module > exit code? But we want to prevent module unload so the timer can fire properly. __ Chuck - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [WATCHDOG] v2.6.13 watchdog-patches
On Sat, 2005-09-03 at 22:04 +0200, Wim Van Sebroeck wrote: > Author: Chuck Ebbert <[EMAIL PROTECTED]> > Date: Fri Aug 19 14:14:07 2005 +0200 > > [WATCHDOG] softdog-timer-running-oops.patch > > The softdog watchdog timer has a bug that can create an oops: > > 1. Load the module without the nowayout option. > 2. Open the driver and close it without writing 'V' before close. > 3. Unload the module. The timer will continue to run... > 4. Oops happens when timer fires. > > Reported Sun, 10 Oct 2004, by Michael Schierl <[EMAIL PROTECTED]> > > Fix is easy: always take a reference on the module on open. > Release it only when the device is closed and no timer is running. > Tested on 2.6.13-rc6 using the soft_noboot option. While the > timer is running and the device is closed, the module use count > stays at 1. After the timer fires, it drops to 0. Repeatedly > opening and closing the driver caused no problems. Please apply. this looks ENTIRELY like the wrong solution! Isn't it a LOT easier to just del_timer_sync() the timer from the module exit code? Mucking with module refcounts in a driver is almost always a sign of a bug or at least really bad design, and I think that is the case here. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[WATCHDOG] v2.6.13 watchdog-patches
Hi Linus, please do a git pull rsync://rsync.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git This will update the following files: drivers/char/watchdog/Kconfig| 43 - drivers/char/watchdog/Makefile | 71 +++- drivers/char/watchdog/ixp2000_wdt.c |2 drivers/char/watchdog/ixp4xx_wdt.c |2 drivers/char/watchdog/s3c2410_wdt.c | 87 ++- drivers/char/watchdog/scx200_wdt.c |2 drivers/char/watchdog/softdog.c | 13 +++-- drivers/char/watchdog/w83627hf_wdt.c |6 ++ 8 files changed, 143 insertions(+), 83 deletions(-) with these Changes: Author: Chuck Ebbert <[EMAIL PROTECTED]> Date: Fri Aug 19 14:14:07 2005 +0200 [WATCHDOG] softdog-timer-running-oops.patch The softdog watchdog timer has a bug that can create an oops: 1. Load the module without the nowayout option. 2. Open the driver and close it without writing 'V' before close. 3. Unload the module. The timer will continue to run... 4. Oops happens when timer fires. Reported Sun, 10 Oct 2004, by Michael Schierl <[EMAIL PROTECTED]> Fix is easy: always take a reference on the module on open. Release it only when the device is closed and no timer is running. Tested on 2.6.13-rc6 using the soft_noboot option. While the timer is running and the device is closed, the module use count stays at 1. After the timer fires, it drops to 0. Repeatedly opening and closing the driver caused no problems. Please apply. Signed-off-by: Chuck Ebbert <[EMAIL PROTECTED]> Signed-off-by: Wim Van Sebroeck <[EMAIL PROTECTED]> Author: [EMAIL PROTECTED] Brady <[EMAIL PROTECTED]> Date: Wed Aug 17 09:06:07 2005 +0200 [WATCHDOG] w83627hf_wdt.c-initialized_bios_bug Attached is a small update to the w83627hf watchdog driver to initialise appropriately if it was already initialised in the BIOS. On tyan motherboards for e.g. you can init the watchdog to 4 mins, then when the driver is loaded it sets the watchdog to "seconds" mode, and then machine will reboot within 4 seconds. So this patch resets the timeout to the configured value if the watchdog is already running. Signed-off-by: [EMAIL PROTECTED] Brady <[EMAIL PROTECTED]> Signed-off-by: Wim Van Sebroeck <[EMAIL PROTECTED]> Author: Ben Dooks <[EMAIL PROTECTED]> Date: Wed Aug 17 09:04:52 2005 +0200 [WATCHDOG] s3c2410 watchdog - replace reboot notifier Patch from Dimitry Andric <[EMAIL PROTECTED]> Change to using platfrom driver's .shutdown method instead of an reboot notifier Signed-off-by: Dimitry Andric <[EMAIL PROTECTED]> Signed-off-by: Ben Dooks <[EMAIL PROTECTED]> Signed-off-by: Wim Van Sebroeck <[EMAIL PROTECTED]> Author: Ben Dooks <[EMAIL PROTECTED]> Date: Wed Aug 17 09:03:23 2005 +0200 [WATCHDOG] s3c2410 watchdog power management Patch from Dimitry Andric <[EMAIL PROTECTED]>, updated by Ben Dooks <[EMAIL PROTECTED]>. Patch is against 2.6.11-mm2 Add power management support to the s3c2410 watchdog, so that it is shut-down over suspend, and re-initialised on resume. Also add Dimitry to the list of authors. Signed-off-by: Dimitry Andric <[EMAIL PROTECTED]> Signed-off-by: Ben Dooks <[EMAIL PROTECTED]> Signed-off-by: Wim Van Sebroeck <[EMAIL PROTECTED]> Author: Olaf Hering <[EMAIL PROTECTED]> Date: Wed Aug 17 08:58:34 2005 +0200 [WATCHDOG] correct sysfs name for watchdog devices While looking for possible candidates for our udev.rules package, I found a few odd ->name properties. /dev/watchdog has minor 130 according to devices.txt. Since all watchdog drivers use the misc_register() call, they will end up in /sys/class/misc/$foo. udev may create the /dev/watchdog node if the driver is loaded. I dont have such a device, so I cant test it. The drivers below provide names with spaces and even with / in it. Not a big deal, but apps may expect /dev/watchdog. Signed-off-by: Olaf Hering <[EMAIL PROTECTED]> Signed-off-by: Wim Van Sebroeck <[EMAIL PROTECTED]> Author: Wim Van Sebroeck <[EMAIL PROTECTED]> Date: Sat Sep 3 13:46:56 2005 +0200 [WATCHDOG] Kconfig+Makefile-clean Clean the Kconfig+Makefile according to a sorted list of the drivers of each architecture (and sub-architecture). Signed-off-by: Wim Van Sebroeck <[EMAIL PROTECTED]> Author: Wim Van Sebroeck <[EMAIL PROTECTED]> Date: Wed Aug 17 01:49:24 2005 +0200 [WATCHDOG] Makefile-probe_order-patch Re-arrange Makefile according to what we want to probe first. Signed-off-by: Wim Van Sebroeck <[EMAIL PROTECTED]> The Changes can also be looked at on: http://www.kernel.org/git/?p=linux/kernel/git/wim/linux-2.6-watchdog.git;a=summary For completeness, I added the overal diff
[WATCHDOG] v2.6.13 watchdog-patches
Hi Linus, please do a git pull rsync://rsync.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git This will update the following files: drivers/char/watchdog/Kconfig| 43 - drivers/char/watchdog/Makefile | 71 +++- drivers/char/watchdog/ixp2000_wdt.c |2 drivers/char/watchdog/ixp4xx_wdt.c |2 drivers/char/watchdog/s3c2410_wdt.c | 87 ++- drivers/char/watchdog/scx200_wdt.c |2 drivers/char/watchdog/softdog.c | 13 +++-- drivers/char/watchdog/w83627hf_wdt.c |6 ++ 8 files changed, 143 insertions(+), 83 deletions(-) with these Changes: Author: Chuck Ebbert [EMAIL PROTECTED] Date: Fri Aug 19 14:14:07 2005 +0200 [WATCHDOG] softdog-timer-running-oops.patch The softdog watchdog timer has a bug that can create an oops: 1. Load the module without the nowayout option. 2. Open the driver and close it without writing 'V' before close. 3. Unload the module. The timer will continue to run... 4. Oops happens when timer fires. Reported Sun, 10 Oct 2004, by Michael Schierl [EMAIL PROTECTED] Fix is easy: always take a reference on the module on open. Release it only when the device is closed and no timer is running. Tested on 2.6.13-rc6 using the soft_noboot option. While the timer is running and the device is closed, the module use count stays at 1. After the timer fires, it drops to 0. Repeatedly opening and closing the driver caused no problems. Please apply. Signed-off-by: Chuck Ebbert [EMAIL PROTECTED] Signed-off-by: Wim Van Sebroeck [EMAIL PROTECTED] Author: [EMAIL PROTECTED] Brady [EMAIL PROTECTED] Date: Wed Aug 17 09:06:07 2005 +0200 [WATCHDOG] w83627hf_wdt.c-initialized_bios_bug Attached is a small update to the w83627hf watchdog driver to initialise appropriately if it was already initialised in the BIOS. On tyan motherboards for e.g. you can init the watchdog to 4 mins, then when the driver is loaded it sets the watchdog to seconds mode, and then machine will reboot within 4 seconds. So this patch resets the timeout to the configured value if the watchdog is already running. Signed-off-by: [EMAIL PROTECTED] Brady [EMAIL PROTECTED] Signed-off-by: Wim Van Sebroeck [EMAIL PROTECTED] Author: Ben Dooks [EMAIL PROTECTED] Date: Wed Aug 17 09:04:52 2005 +0200 [WATCHDOG] s3c2410 watchdog - replace reboot notifier Patch from Dimitry Andric [EMAIL PROTECTED] Change to using platfrom driver's .shutdown method instead of an reboot notifier Signed-off-by: Dimitry Andric [EMAIL PROTECTED] Signed-off-by: Ben Dooks [EMAIL PROTECTED] Signed-off-by: Wim Van Sebroeck [EMAIL PROTECTED] Author: Ben Dooks [EMAIL PROTECTED] Date: Wed Aug 17 09:03:23 2005 +0200 [WATCHDOG] s3c2410 watchdog power management Patch from Dimitry Andric [EMAIL PROTECTED], updated by Ben Dooks [EMAIL PROTECTED]. Patch is against 2.6.11-mm2 Add power management support to the s3c2410 watchdog, so that it is shut-down over suspend, and re-initialised on resume. Also add Dimitry to the list of authors. Signed-off-by: Dimitry Andric [EMAIL PROTECTED] Signed-off-by: Ben Dooks [EMAIL PROTECTED] Signed-off-by: Wim Van Sebroeck [EMAIL PROTECTED] Author: Olaf Hering [EMAIL PROTECTED] Date: Wed Aug 17 08:58:34 2005 +0200 [WATCHDOG] correct sysfs name for watchdog devices While looking for possible candidates for our udev.rules package, I found a few odd -name properties. /dev/watchdog has minor 130 according to devices.txt. Since all watchdog drivers use the misc_register() call, they will end up in /sys/class/misc/$foo. udev may create the /dev/watchdog node if the driver is loaded. I dont have such a device, so I cant test it. The drivers below provide names with spaces and even with / in it. Not a big deal, but apps may expect /dev/watchdog. Signed-off-by: Olaf Hering [EMAIL PROTECTED] Signed-off-by: Wim Van Sebroeck [EMAIL PROTECTED] Author: Wim Van Sebroeck [EMAIL PROTECTED] Date: Sat Sep 3 13:46:56 2005 +0200 [WATCHDOG] Kconfig+Makefile-clean Clean the Kconfig+Makefile according to a sorted list of the drivers of each architecture (and sub-architecture). Signed-off-by: Wim Van Sebroeck [EMAIL PROTECTED] Author: Wim Van Sebroeck [EMAIL PROTECTED] Date: Wed Aug 17 01:49:24 2005 +0200 [WATCHDOG] Makefile-probe_order-patch Re-arrange Makefile according to what we want to probe first. Signed-off-by: Wim Van Sebroeck [EMAIL PROTECTED] The Changes can also be looked at on: http://www.kernel.org/git/?p=linux/kernel/git/wim/linux-2.6-watchdog.git;a=summary For completeness, I added the overal diff below. Greetings, Wim.
Re: [WATCHDOG] v2.6.13 watchdog-patches
On Sat, 2005-09-03 at 22:04 +0200, Wim Van Sebroeck wrote: Author: Chuck Ebbert [EMAIL PROTECTED] Date: Fri Aug 19 14:14:07 2005 +0200 [WATCHDOG] softdog-timer-running-oops.patch The softdog watchdog timer has a bug that can create an oops: 1. Load the module without the nowayout option. 2. Open the driver and close it without writing 'V' before close. 3. Unload the module. The timer will continue to run... 4. Oops happens when timer fires. Reported Sun, 10 Oct 2004, by Michael Schierl [EMAIL PROTECTED] Fix is easy: always take a reference on the module on open. Release it only when the device is closed and no timer is running. Tested on 2.6.13-rc6 using the soft_noboot option. While the timer is running and the device is closed, the module use count stays at 1. After the timer fires, it drops to 0. Repeatedly opening and closing the driver caused no problems. Please apply. this looks ENTIRELY like the wrong solution! Isn't it a LOT easier to just del_timer_sync() the timer from the module exit code? Mucking with module refcounts in a driver is almost always a sign of a bug or at least really bad design, and I think that is the case here. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [WATCHDOG] v2.6.13 watchdog-patches
In-Reply-To: [EMAIL PROTECTED] On Sat, 03 Sep 2005 at 22:11:41 +0200, Arjan van de Ven wrote: this looks ENTIRELY like the wrong solution! Isn't it a LOT easier to just del_timer_sync() the timer from the module exit code? But we want to prevent module unload so the timer can fire properly. __ Chuck - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/