linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Fariya <fariyaf@gmail.com>
Cc: kbuild@01.org, linux-wireless@vger.kernel.org
Subject: Re: [kbuild-all] [wireless-next:master 316/316] drivers/net/wireless/rsi/rsi_91x_debugfs.c:296 rsi_init_dbgfs() error: potential null dereference 'dev_dbgfs'. (kzalloc returns null)
Date: Fri, 28 Mar 2014 12:01:27 +0300	[thread overview]
Message-ID: <20140328090126.GC7045@mwanda> (raw)
In-Reply-To: <CAG+h2qigvA+yfPt9iRv6eZCLppwFznuZ=Hdk5Yxr-EB_9WTQig@mail.gmail.com>

On Fri, Mar 28, 2014 at 07:51:25AM +0530, Fariya wrote:
> Hi Dan,
> 
> Do I need to re-send the whole of the driver again? Considering the driver
> is a part of wireless-next, shall I check-out the wireless-next git repo
> and create a patch for the mentioned fixes and send it across?

The latter.  Do it on top of wireles-next.

> 
> > *The code for this one is:         transfer = min_t(int, count, 4096); It's
> > complaining because "tranfers" is u8, but the cast to int always makes me
> > worry negative values.  In this case, count is not user controlled so it's
> > safe.  But that's a common security problem you should be aware of.  It's
> > better to cast it to an unsigned value.*
> 
> >Shall I typecast the return value of min_t to u8?

No.  That would do a truncate to 8 bits before the compare.  Cast it to
u32 first.

regards,
dan carpenter


      parent reply	other threads:[~2014-03-28  9:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <53275729.QHDAYltTUiN7HGNZ%fengguang.wu@intel.com>
     [not found] ` <20140327154507.GA27177@mwanda>
2014-03-27 16:01   ` [kbuild-all] [wireless-next:master 316/316] drivers/net/wireless/rsi/rsi_91x_debugfs.c:296 rsi_init_dbgfs() error: potential null dereference 'dev_dbgfs'. (kzalloc returns null) Dan Carpenter
     [not found]     ` <CAG+h2qigvA+yfPt9iRv6eZCLppwFznuZ=Hdk5Yxr-EB_9WTQig@mail.gmail.com>
2014-03-28  9:01       ` Dan Carpenter [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=20140328090126.GC7045@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=fariyaf@gmail.com \
    --cc=kbuild@01.org \
    --cc=linux-wireless@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;
as well as URLs for NNTP newsgroup(s).