lkml.org 
[lkml]   [2006]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [WATCHDOG] v2.6.18-rc3 patches
From
Date
Ar Maw, 2006-08-01 am 22:09 +0200, ysgrifennodd Wim Van Sebroeck:
> If there are problems with these patches, please let me know.
> If not I will sent them to Linus on sunday.

NAK


> +
> +static void wdt_enable(void)

Open, fork and write from both processes. This needs a semaphore
> +{
> + if (wdt_clk)
> + clk_set_rate(wdt_clk, 1);
> +
> + /* stop counter, initiate counter reset */
> + __raw_writel(RESET_COUNT, WDTIM_CTRL(wdt_base));
> + /*wait for reset to complete. 100% guarantee event */
> + while (__raw_readl(WDTIM_COUNTER(wdt_base)));

Should have cpu_relax() and really ought to have a timeout in case it
fails. In fact it needs one or a barrier as you are using __raw and that
may not reload if the compiler is overclever.


> +static void wdt_disable(void)
> +{

Ditto - open, fork write the close sequence in parallel on both ?

> + wdt_disable(); /*disable for now */
> + set_bit(WDT_DEVICE_INITED, &wdt_status);
> + }

Races an open occuring when misc_register is done and before we hit
wdt_disable.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-02 00:11    [W:1.851 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site