projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3e0975
)
Fix error handling in HDIO_GETGEO compat wrapper
author
Andreas Schwab
<schwab@suse.de>
Tue, 8 May 2007 07:31:38 +0000
(
00:31
-0700)
committer
Linus Torvalds
<torvalds@woody.linux-foundation.org>
Tue, 8 May 2007 18:15:14 +0000
(11:15 -0700)
Don't clobber error from sys_ioctl in HDIO_GETGEO compat wrapper.
Signed-off-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/compat_ioctl.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/compat_ioctl.c
b/fs/compat_ioctl.c
index 6972d242fbdfa429836979a1ca10bff227c70c1d..d92bc3eb7afcb33f398dbf35a3e4bc8f2c0c5393 100644
(file)
--- a/
fs/compat_ioctl.c
+++ b/
fs/compat_ioctl.c
@@
-684,8
+684,10
@@
static int hdio_getgeo(unsigned int fd, unsigned int cmd, unsigned long arg)
if (!err) {
err = copy_to_user (ugeo, &geo, 4);
err |= __put_user (geo.start, &ugeo->start);
+ if (err)
+ err = -EFAULT;
}
- return err
? -EFAULT : 0
;
+ return err;
}
static int hdio_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)