Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0767e62
)
Bug# 329: Approver: Andreas - obd_ioctl_unpack() causes segmentation violation.
author
donmilos
<donmilos>
Mon, 4 Nov 2002 21:25:49 +0000
(21:25 +0000)
committer
donmilos
<donmilos>
Mon, 4 Nov 2002 21:25:49 +0000
(21:25 +0000)
lustre/include/linux/lustre_lib.h
patch
|
blob
|
history
diff --git
a/lustre/include/linux/lustre_lib.h
b/lustre/include/linux/lustre_lib.h
index
f3f59b9
..
2588154
100644
(file)
--- a/
lustre/include/linux/lustre_lib.h
+++ b/
lustre/include/linux/lustre_lib.h
@@
-334,9
+334,15
@@
static inline int obd_ioctl_unpack(struct obd_ioctl_data *data, char *pbuf,
char *ptr;
struct obd_ioctl_data *overlay;
- if (!
*
pbuf)
+ if (!pbuf)
return 1;
overlay = (struct obd_ioctl_data *)pbuf;
+
+ /* Preserve the caller's buffer pointers */
+ overlay->ioc_inlbuf1 = data->ioc_inlbuf1;
+ overlay->ioc_inlbuf2 = data->ioc_inlbuf2;
+ overlay->ioc_inlbuf3 = data->ioc_inlbuf3;
+
memcpy(data, pbuf, sizeof(*data));
ptr = overlay->ioc_bulk;