From: Coywolf Qi Hunt <qiyong@fc-cn.com>
To: torvalds@osdl.org
Cc: willy@debian.org, arnd@arndb.de, akpm@osdl.org,
linux-kernel@vger.kernel.org, debian-glibc@lists.debian.org
Subject: [patch] ioctl BLKGETSIZE64 fix
Date: Thu, 15 Dec 2005 20:25:27 +0800 [thread overview]
Message-ID: <20051215122527.GA7762@localhost.localdomain> (raw)
Hello,
Two years ago, "[PATCH] use size_t for the broken ioctl numbers" brought in the problem.
<http://lkml.org/lkml/2003/9/7/14> (also FYI: <https://lwn.net/Articles/48360/>)
The patch below fixes the bug on BLKGETSIZE64. typeof(size_t) == 32, but we expect 64.
The choice of `size_t' is also a mistake. We should have taken `int'. This also affects
userland linux-kernel-headers.
Or am I missing something? Thanks.
Coywolf
Signed-off-by: Coywolf Qi Hunt <qiyong@fc-cn.com>
---
diff -pruN 2.6.15-rc5-mm3/include/linux/fs.h 2.6.15-rc5-mm3~BLKGETSIZE64-fix/include/linux/fs.h
--- 2.6.15-rc5-mm3/include/linux/fs.h 2005-12-15 16:55:22.000000000 +0800
+++ 2.6.15-rc5-mm3~BLKGETSIZE64-fix/include/linux/fs.h 2005-12-15 20:08:52.000000000 +0800
@@ -197,7 +197,7 @@ extern int dir_notify_enable;
/* A jump here: 108-111 have been used for various private purposes. */
#define BLKBSZGET _IOR(0x12,112,size_t)
#define BLKBSZSET _IOW(0x12,113,size_t)
-#define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size in bytes (u64 *arg) */
+#define BLKGETSIZE64 _IOR(0x12,114,u64) /* return device size in bytes (u64 *arg) */
#define BLKSTARTTRACE _IOWR(0x12,115,struct blk_user_trace_setup)
#define BLKSTOPTRACE _IO(0x12,116)
next reply other threads:[~2005-12-15 12:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-15 12:25 Coywolf Qi Hunt [this message]
2005-12-15 13:01 ` [patch] ioctl BLKGETSIZE64 fix Matthew Wilcox
2005-12-15 17:42 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051215122527.GA7762@localhost.localdomain \
--to=qiyong@fc-cn.com \
--cc=akpm@osdl.org \
--cc=arnd@arndb.de \
--cc=debian-glibc@lists.debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--cc=willy@debian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.