Skip to contentSkip to conversation

mpcore_wdt.c bogus fpos check

PATCH In review Marcelo Tosatti 2 participants 2 messages Nov 18, 2005 – Dec 5, 2005 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mpcore_wdt.c bogus fpos check

Hi,

drivers/char/watchdog/mpcore_wdt.c write function contains a check for (ppos != &file->f_pos). Such check used to make sense when a pointer to file->f_pos was handed by vfs_write(), not a copy of it as it stands now.

Has been broken since then... Don't have a device to test - does it work at all?

mpc8xx_wdt.c is similarly broken (patch will be sent separately).

drivers/char/watchdog/mpcore_wdt.c +0 -4
index da631c1..c9f545e 100644
@@ -180,10 +180,6 @@ static ssize_t mpcore_wdt_write(struct f
 {
 	struct mpcore_wdt *wdt = file->private_data;
 
-	/*  Can't seek (pwrite) on this device  */
-	if (ppos != &file->f_pos)
-		return -ESPIPE;
-
 	/*
 	 *	Refresh the timer.
 	 */
#1 lore raw
Quoted 2 lines · Marcelo Tosatti

Has been broken since then... Don't have a device to test - does it work at all?

mpcore is a recent addition to the kernel, and this got missed in my review. Thanks for spotting, applied.

Signature · 3 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core