* [PATCH 6/9] Bluetooth: Silence DEBUG_STRICT_USER_COPY_CHECKS=y warning [not found] <1305244212-19183-1-git-send-email-sboyd@codeaurora.org> @ 2011-05-12 23:50 ` Stephen Boyd 2011-05-13 21:06 ` Gustavo F. Padovan 0 siblings, 1 reply; 2+ messages in thread From: Stephen Boyd @ 2011-05-12 23:50 UTC (permalink / raw) To: linux-bluetooth; +Cc: linux-kernel, netdev, Marcel Holtmann, Gustavo F. Padovan Enabling DEBUG_STRICT_USER_COPY_CHECKS causes the following warning: In function 'copy_from_user', inlined from 'rfcomm_sock_setsockopt' at net/bluetooth/rfcomm/sock.c:705: arch/x86/include/asm/uaccess_64.h:65: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct presumably due to buf_size being signed causing GCC to fail to see that buf_size can't become negative. Cc: Marcel Holtmann <marcel@holtmann.org> Cc: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> --- net/bluetooth/rfcomm/sock.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c index 66cc1f0..0698b37 100644 --- a/net/bluetooth/rfcomm/sock.c +++ b/net/bluetooth/rfcomm/sock.c @@ -679,7 +679,8 @@ static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname, c { struct sock *sk = sock->sk; struct bt_security sec; - int len, err = 0; + int err = 0; + size_t len; u32 opt; BT_DBG("sk %p", sk); -- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum. ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 6/9] Bluetooth: Silence DEBUG_STRICT_USER_COPY_CHECKS=y warning 2011-05-12 23:50 ` [PATCH 6/9] Bluetooth: Silence DEBUG_STRICT_USER_COPY_CHECKS=y warning Stephen Boyd @ 2011-05-13 21:06 ` Gustavo F. Padovan 0 siblings, 0 replies; 2+ messages in thread From: Gustavo F. Padovan @ 2011-05-13 21:06 UTC (permalink / raw) To: Stephen Boyd; +Cc: linux-bluetooth, linux-kernel, netdev, Marcel Holtmann Hi Stephen, * Stephen Boyd <sboyd@codeaurora.org> [2011-05-12 16:50:09 -0700]: > Enabling DEBUG_STRICT_USER_COPY_CHECKS causes the following > warning: > > In function 'copy_from_user', > inlined from 'rfcomm_sock_setsockopt' at > net/bluetooth/rfcomm/sock.c:705: > arch/x86/include/asm/uaccess_64.h:65: > warning: call to 'copy_from_user_overflow' declared with > attribute warning: copy_from_user() buffer size is not provably > correct > > presumably due to buf_size being signed causing GCC to fail to > see that buf_size can't become negative. > > Cc: Marcel Holtmann <marcel@holtmann.org> > Cc: Gustavo F. Padovan <padovan@profusion.mobi> > Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> > --- > net/bluetooth/rfcomm/sock.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) Applied, thanks. -- Gustavo F. Padovan http://profusion.mobi ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-13 21:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1305244212-19183-1-git-send-email-sboyd@codeaurora.org>
2011-05-12 23:50 ` [PATCH 6/9] Bluetooth: Silence DEBUG_STRICT_USER_COPY_CHECKS=y warning Stephen Boyd
2011-05-13 21:06 ` Gustavo F. Padovan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox