From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933246Ab3JKUSf (ORCPT ); Fri, 11 Oct 2013 16:18:35 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45997 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932258Ab3JKTky (ORCPT ); Fri, 11 Oct 2013 15:40:54 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kbuild test robot , Jiri Kosina Subject: [ 005/135] HID: fix unused rsize usage Date: Fri, 11 Oct 2013 12:38:06 -0700 Message-Id: <20131011193945.788558769@linuxfoundation.org> X-Mailer: git-send-email 1.8.4.3.gca3854a In-Reply-To: <20131011193945.181603934@linuxfoundation.org> References: <20131011193945.181603934@linuxfoundation.org> User-Agent: quilt/0.60-5.1.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.11-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jiri Kosina commit bc197eedef1ae082ec662c64c3f4aa302821fb7a upstream. 27ce4050 ("HID: fix data access in implement()") by mistake removed a setting of buffer size in hidp. Fix that by putting it back. Reported-by: kbuild test robot Signed-off-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman --- net/bluetooth/hidp/core.c | 1 + 1 file changed, 1 insertion(+) --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c @@ -236,6 +236,7 @@ static int hidp_send_report(struct hidp_ hid_output_report(report, buf); hdr = HIDP_TRANS_DATA | HIDP_DATA_RTYPE_OUPUT; + rsize = ((report->size - 1) >> 3) + 1 + (report->id > 0); ret = hidp_send_intr_message(session, hdr, buf, rsize); kfree(buf);