public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Problem with f_rndis.c
@ 2009-04-03 14:58 Eugene T. Bordenkircher
  2009-04-03 20:42 ` David Brownell
  0 siblings, 1 reply; 2+ messages in thread
From: Eugene T. Bordenkircher @ 2009-04-03 14:58 UTC (permalink / raw)
  To: linux-kernel, linux-usb

The following is an artifact in f_rndis.c that is present because of the USB
gadget refactoring

679         rndis_set_param_medium(rndis->config, NDIS_MEDIUM_802_3, 0);
680         rndis_set_host_mac(rndis->config, rndis->ethaddr);
681
682 #if 0
683 // FIXME
684         if (rndis_set_param_vendor(rndis->config, vendorID,
685                                 manufacturer))
686                 goto fail0;
687 #endif
688
689         /* NOTE:  all that is done without knowing or caring about
690          * the network link ... which is unavailable to this code
691          * until we're activated via set_alt().

The bad news is that I'm hitting an oops because of it.

Newer versions of the windows rndis driver never seem to call
OID_GEN_VENDOR_DESCRIPTION so this isn't a problem.  However, older versions of
XP SP2 and earlier machines still call this, and since the vendor string is
never set in rndis_per_dev_params(rndis.c) the kernel ends up SEGV'ing by
accessing the null pointer for the vendor string.

I played around with this for about 3-4 hours yesterday trying to get the
vendorID and manufacturer in some reasonable manner, but could not find a way
to backtrack to them.

Any suggestions to help me fix it? or even better solutions? :) I have plenty
of boxes that are oops'ing so I can test solutions as needed.

Eugene T. Bordenkircher

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-03 20:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-03 14:58 Problem with f_rndis.c Eugene T. Bordenkircher
2009-04-03 20:42 ` David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox