Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218574
b: refs/heads/master
c: 03145be
h: refs/heads/master
v: v3
  • Loading branch information
Dan Rosenberg authored and Linus Torvalds committed Oct 28, 2010
1 parent 220bd99 commit 89687ea
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b795218075a1e1183169abb66a90dcdcf30367f9
refs/heads/master: 03145beb455cf5c20a761e8451e30b8a74ba58d9
6 changes: 6 additions & 0 deletions trunk/ipc/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ long compat_sys_semctl(int first, int second, int third, void __user *uptr)
struct semid64_ds __user *up64;
int version = compat_ipc_parse_version(&third);

memset(&s64, 0, sizeof(s64));

if (!uptr)
return -EINVAL;
if (get_user(pad, (u32 __user *) uptr))
Expand Down Expand Up @@ -421,6 +423,8 @@ long compat_sys_msgctl(int first, int second, void __user *uptr)
int version = compat_ipc_parse_version(&second);
void __user *p;

memset(&m64, 0, sizeof(m64));

switch (second & (~IPC_64)) {
case IPC_INFO:
case IPC_RMID:
Expand Down Expand Up @@ -594,6 +598,8 @@ long compat_sys_shmctl(int first, int second, void __user *uptr)
int err, err2;
int version = compat_ipc_parse_version(&second);

memset(&s64, 0, sizeof(s64));

switch (second & (~IPC_64)) {
case IPC_RMID:
case SHM_LOCK:
Expand Down
5 changes: 5 additions & 0 deletions trunk/ipc/compat_mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ asmlinkage long compat_sys_mq_open(const char __user *u_name,
void __user *p = NULL;
if (u_attr && oflag & O_CREAT) {
struct mq_attr attr;

memset(&attr, 0, sizeof(attr));

p = compat_alloc_user_space(sizeof(attr));
if (get_compat_mq_attr(&attr, u_attr) ||
copy_to_user(p, &attr, sizeof(attr)))
Expand Down Expand Up @@ -127,6 +130,8 @@ asmlinkage long compat_sys_mq_getsetattr(mqd_t mqdes,
struct mq_attr __user *p = compat_alloc_user_space(2 * sizeof(*p));
long ret;

memset(&mqstat, 0, sizeof(mqstat));

if (u_mqstat) {
if (get_compat_mq_attr(&mqstat, u_mqstat) ||
copy_to_user(p, &mqstat, sizeof(mqstat)))
Expand Down

0 comments on commit 89687ea

Please sign in to comment.