lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20100329191209.GA4777@salidar.me.mortis.eu>
Date:	Mon, 29 Mar 2010 21:12:09 +0200
From:	Giel van Schijndel <me@...tis.eu>
To:	Wim Van Sebroeck <wim@...ana.be>
Cc:	Randy Dunlap <rdunlap@...otime.net>, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] doc: watchdog simple example: don't fail on fsync()

On Mon, Mar 29, 2010 at 08:40:41PM +0200, Wim Van Sebroeck wrote:
>> Don't terminate the watchdog daemon when fsync() fails because no
>> watchdog driver actually implements the fsync() syscall.
> 
> Wouldn't it be simpler then to just do an fsync without checking the error-result?

Yes, it definitly would be. Though I think it would be even simpler to
simply ditch the fsync() call. Considering that none of the watchdog
drivers implements it, nor can I think of a usecase where it would make
sense to implement (as more than a NOP).

So instead I suggest the patch following this line:
========================================================================
doc: watchdog simple example: don't fail on fsync()

Don't terminate the watchdog daemon when fsync() fails because no
watchdog driver actually implements the fsync() syscall.

Signed-off-by: Giel van Schijndel <me@...tis.eu>
---
 Documentation/watchdog/src/watchdog-simple.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/Documentation/watchdog/src/watchdog-simple.c b/Documentation/watchdog/src/watchdog-simple.c
index 4cf72f3..ba45803 100644
--- a/Documentation/watchdog/src/watchdog-simple.c
+++ b/Documentation/watchdog/src/watchdog-simple.c
@@ -17,9 +17,6 @@ int main(void)
 			ret = -1;
 			break;
 		}
-		ret = fsync(fd);
-		if (ret)
-			break;
 		sleep(10);
 	}
 	close(fd);
-- 
1.6.4.4

-- 
Met vriendelijke groet,
With kind regards,
Giel van Schijndel

Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ