[patch] removing EINVAL error from cacheflush() man page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


The cacheflush() man page states that cacheflush() will set  EINVAL if
cache parameter is not one of ICACHE, DCACHE, or BCACHE. I have tried
to verify this behavior in linux- and observed that this check
is not implemented in the kernel. Based on this observation, I have
proposed one patch to LKML and the details are available in the below
listed URL:


At first, this patch
 was added to the -mm tree and later dropped. Mr. Ralf Baechle and Mr.
Andrew Morton have expressed their views on why it was dropped.

Ralf Baechle :
"There is no point in checking the arguments which are being ignored anyway."

Andrew Morton:
> There is no point in checking the arguments which are being ignored
> anyway.
Well, there _is_ a point.  So that people don't write buggy userspace
which "seems" to work, but which will fail if at some time in the
future we _do_ start using the argument.  ie: for
But it's too late to fix that up now."

The reference to -EINVAL  is present from the very first release of
cacheflush() man page :
man-pages-1.10.tar.gz which was released on Jan 15  1996.
Thanks to Mr. Michael Kerrisk for providing the URL which helped me to
trace out the  history of cacheflush() man page:

Based on this, I think , we should modify the cacheflush() man page.

Signed-off-by: Maxin B. John <maxin.john@xxxxxxxxxxx>
diff -uNr man-pages-3.21-orig/man2/cacheflush.2 man-pages-3.21/man2/cacheflush.2
--- man-pages-3.21-orig/man2/cacheflush.2       2009-04-15
21:35:32.000000000 +0530
+++ man-pages-3.21/man2/cacheflush.2    2009-05-07 15:06:31.350544848 +0530
@@ -63,14 +63,6 @@
 .I (addr+nbytes-1)
 is not accessible.
-.I cache
-is not one of
 This Linux-specific system call is only available on MIPS based systems.
 .\" FIXME This system call was only on MIPS back in 1.2 days, but
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Memory]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]     [Linux Resources]

Add to Google Powered by Linux