linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Watchdog timer core enhancements
@ 2012-03-15 11:59 Hans de Goede
  2012-03-15 11:59 ` [PATCH 1/3] watchdog_dev: Add support for having more then 1 watchdog Hans de Goede
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Hans de Goede @ 2012-03-15 11:59 UTC (permalink / raw)
  To: linux-watchdog; +Cc: Alan Cox, Wim Van Sebroeck, LM Sensors, Thilo Cestonaro

Hi,

Short selfintro for the watchdog people: I'm a FOSS developer / enthusiast
for close to 15 years now. I've written Linux kernel drivers for a ton
of webcams and various hwmon IC's.

Three of the hwmon drivers I maintain are IC's which also include a watchdog
part in their hwmon solution.

This is a resend of a series of watchdog_dev patches which I initially send
on Sep 12 2011:
http://lists.lm-sensors.org/pipermail/lm-sensors/2011-September/033707.html
And which unfortunately has seen 0 reviews / feedback since then.

This resend is re-based on top of v3.3-rc7

Currently the hwmon drivers I maintain are implementing the watchdog API
all by themselves, I would very much like to switch them over to
watchdog_dev to remove a lot of code duplication, but there currently
are 2 things stopping me from moving them over:

1) The driver core only works for 1 watchdog, but both my fschmd and my sch5636
test systems also have an iTCO watchdog and that tends to load first. Thus when
writing the fschmd watchdog code I made it support loading either on the
default watchdog minor, or on one of the additional reserved watchdog minors
(212-215). The first patch in this series adds support for this to the
watchdog timer driver core (which was quite straightforward to add).

2) Most Linux drivers use dynamically allocated memory for the driver data,
which gets allocated on calling the probe function and released on driver
unbind. This means that merely locking the module containing the driver as long
as /dev/watchdog is open is not sufficient, since the driver can still be
unbound. The second patch in this series fixes this.

Note that the 2nd issue is also hit by the recently posted:
"[PATCH V2 00/22] watchdog: ARM watchdogs: sp805 & mpcore updates & fixes"
patch series which convert the mpcore_wdt driver to watchdog_dev, doing
an unbind between the platform driver and the platform dev there from sysfs
while an app holds the /dev/watchdog file open will make file->private_data
for that file handle point to freed memory!

Once this series is upstream I'll also write a patches to convert all my
hwmon IC with watchdog watchdog driver parts to watchdog_dev.

Regards,

Hans

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-05-07  6:58 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-15 11:59 Watchdog timer core enhancements Hans de Goede
2012-03-15 11:59 ` [PATCH 1/3] watchdog_dev: Add support for having more then 1 watchdog Hans de Goede
2012-03-15 13:11   ` Alan Cox
2012-03-15 14:18     ` Hans de Goede
2012-03-15 15:38       ` Alan Cox
2012-05-04 12:34         ` Wim Van Sebroeck
2012-05-07  6:58           ` Hans de Goede
2012-03-15 11:59 ` [PATCH 2/3] watchdog_dev: Add support for dynamically allocated watchdog_device structs Hans de Goede
2012-03-15 11:59 ` [PATCH 3/3] watchdog_dev: Let the driver update the timeout field on set_timeout success Hans de Goede
2012-03-15 12:39 ` Watchdog timer core enhancements Pádraig Brady
2012-03-15 21:13 ` Wim Van Sebroeck
2012-03-16  7:43   ` Hans de Goede
2012-03-17 12:56   ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).