public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: "Eugene T. Bordenkircher" <eugebo@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: Problem with f_rndis.c
Date: Fri, 3 Apr 2009 13:42:29 -0700	[thread overview]
Message-ID: <200904031342.29960.david-b@pacbell.net> (raw)
In-Reply-To: <49D62418.6080405@gmail.com>

On Friday 03 April 2009, Eugene T. Bordenkircher wrote:
> 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.

Maybe just add more params to rndis_bind_config() and
call that code from there.


      reply	other threads:[~2009-04-03 20:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-03 14:58 Problem with f_rndis.c Eugene T. Bordenkircher
2009-04-03 20:42 ` David Brownell [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200904031342.29960.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=eugebo@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox