Re: AT91SAM9/CAP9 watchdog driver

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Victor <avictor.za@...>
Cc: <akpm@...>, <wim@...>, LAK <linux-arm-kernel@...>, Linux Kernel list <linux-kernel@...>
Date: Monday, June 2, 2008 - 2:58 am

> +static long at91_wdt_ioctl(struct file *file, unsigned int cmd,

No locking.. so you could get two set timeout calls in parallel. Probably
you need a simple mutex in at91_wdt_settimeout();



At the moment those two are safe. When the open lock_kernel
goes away it will be possible to get

			misc_register
						open
						ioctl
			wdt_settimout()

So you may want to swap those two around (and disable the timer if the
register fails ?), or lock the open against the register routine.

Otherwise looks good.

Alan
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
AT91SAM9/CAP9 watchdog driver, Andrew Victor, (Sun Jun 1, 12:40 pm)
Re: AT91SAM9/CAP9 watchdog driver, David Brownell, (Sat Jun 7, 2:39 am)
Re: AT91SAM9/CAP9 watchdog driver, Andrew Morton, (Tue Jun 3, 5:23 pm)
Re: AT91SAM9/CAP9 watchdog driver, Andrew Victor, (Wed Jun 4, 3:31 am)
Re: AT91SAM9/CAP9 watchdog driver, Alan Cox, (Wed Jun 4, 7:36 am)
Re: AT91SAM9/CAP9 watchdog driver, Andrew Victor, (Wed Jun 4, 2:36 pm)
Re: AT91SAM9/CAP9 watchdog driver, Alan Cox, (Wed Jun 4, 2:24 pm)
Re: AT91SAM9/CAP9 watchdog driver, Andrew Victor, (Wed Jun 4, 3:02 pm)
Re: AT91SAM9/CAP9 watchdog driver, Alan Cox, (Wed Jun 4, 3:18 pm)
Re: AT91SAM9/CAP9 watchdog driver, Alan Cox, (Mon Jun 2, 2:58 am)