Skip to content

Commit

Permalink
USB: Fix kernel oops with g_ether and Windows
Browse files Browse the repository at this point in the history
Please find attached patch for
https://bugzilla.kernel.org/show_bug.cgi?id=16023 problem.


Signed-off-by: Maxim Osipov <maxim.osipov@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Maxim Osipov authored and Greg Kroah-Hartman committed Sep 4, 2010
1 parent 793f03a commit 037d365
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/usb/gadget/rndis.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,13 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
/* mandatory */
case OID_GEN_VENDOR_DESCRIPTION:
pr_debug("%s: OID_GEN_VENDOR_DESCRIPTION\n", __func__);
length = strlen (rndis_per_dev_params [configNr].vendorDescr);
memcpy (outbuf,
rndis_per_dev_params [configNr].vendorDescr, length);
if ( rndis_per_dev_params [configNr].vendorDescr ) {
length = strlen (rndis_per_dev_params [configNr].vendorDescr);
memcpy (outbuf,
rndis_per_dev_params [configNr].vendorDescr, length);
} else {
outbuf[0] = 0;
}
retval = 0;
break;

Expand Down

0 comments on commit 037d365

Please sign in to comment.