diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-03-19 20:15:46 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-03-19 20:15:46 +0000 |
commit | 566b60c04ab230b8cc3845f964306f99504b18df (patch) | |
tree | 1897a526488c3496f4ffe5eebb39a1dd41ab731d /drivers/hid/hid-hyperv.c | |
parent | 3ba4cea21901d90d703b52e4a806fbafa86037a6 (diff) | |
parent | c7edc9e326d53ca5ef9bed82de0740c6b107d55b (diff) | |
download | blackbird-op-linux-566b60c04ab230b8cc3845f964306f99504b18df.tar.gz blackbird-op-linux-566b60c04ab230b8cc3845f964306f99504b18df.zip |
Merge branch 'uprobes-v7' of git://git.linaro.org/people/dave.long/linux into devel-stable
This patch series adds basic uprobes support to ARM. It is based on
patches developed earlier by Rabin Vincent. That approach of adding
hooks into the kprobes instruction parsing code was not well received.
This approach separates the ARM instruction parsing code in kprobes out
into a separate set of functions which can be used by both kprobes and
uprobes. Both kprobes and uprobes then provide their own semantic action
tables to process the results of the parsing.
Diffstat (limited to 'drivers/hid/hid-hyperv.c')
-rw-r--r-- | drivers/hid/hid-hyperv.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c index 8fae6d1414cc..c24908f14934 100644 --- a/drivers/hid/hid-hyperv.c +++ b/drivers/hid/hid-hyperv.c @@ -157,6 +157,7 @@ struct mousevsc_dev { u32 report_desc_size; struct hv_input_dev_info hid_dev_info; struct hid_device *hid_device; + u8 input_buf[HID_MAX_BUFFER_SIZE]; }; @@ -256,6 +257,7 @@ static void mousevsc_on_receive(struct hv_device *device, struct synthhid_msg *hid_msg; struct mousevsc_dev *input_dev = hv_get_drvdata(device); struct synthhid_input_report *input_report; + size_t len; pipe_msg = (struct pipe_prt_msg *)((unsigned long)packet + (packet->offset8 << 3)); @@ -300,9 +302,12 @@ static void mousevsc_on_receive(struct hv_device *device, (struct synthhid_input_report *)pipe_msg->data; if (!input_dev->init_complete) break; - hid_input_report(input_dev->hid_device, - HID_INPUT_REPORT, input_report->buffer, - input_report->header.size, 1); + + len = min(input_report->header.size, + (u32)sizeof(input_dev->input_buf)); + memcpy(input_dev->input_buf, input_report->buffer, len); + hid_input_report(input_dev->hid_device, HID_INPUT_REPORT, + input_dev->input_buf, len, 1); break; default: pr_err("unsupported hid msg type - type %d len %d", |