Re: [PATCH] net: Fix references to out-of-scope variables in put_cmsg_compat()

2012-07-22 Thread David Miller
From: Jesper Juhl Date: Sun, 22 Jul 2012 23:37:20 +0200 (CEST) > In net/compat.c::put_cmsg_compat() we may assign 'data' the address of > either the 'ctv' or 'cts' local variables inside the 'if > (!COMPAT_USE_64BIT_TIME)' branch. > > Those variables go out of scope at the end of the 'if' statem

[PATCH] net: Fix references to out-of-scope variables in put_cmsg_compat()

2012-07-22 Thread Jesper Juhl
In net/compat.c::put_cmsg_compat() we may assign 'data' the address of either the 'ctv' or 'cts' local variables inside the 'if (!COMPAT_USE_64BIT_TIME)' branch. Those variables go out of scope at the end of the 'if' statement, so when we use 'data' further down in 'copy_to_user(CMSG_COMPAT_DATA(c