Commit 4eefa9e5 authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds

[PATCH] janitor: fix copy*user in tc/zs

This patch catches insures proper return values from
copy_to/from_user calls.

From: Ron Gage <ron@rongage.org>
parent 4197f48e
......@@ -1108,7 +1108,7 @@ static int get_serial_info(struct dec_serial * info,
tmp.close_delay = info->close_delay;
tmp.closing_wait = info->closing_wait;
tmp.custom_divisor = info->custom_divisor;
return copy_to_user(retinfo,&tmp,sizeof(*retinfo));
return copy_to_user(retinfo,&tmp,sizeof(*retinfo)) ? -EFAULT : 0;
}
static int set_serial_info(struct dec_serial * info,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment