All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mitchell Blank Jr <mitch@sfgoth.com>
To: Brandon Craig Rhodes <brandon@rhodesmill.org>
Cc: netdev@vger.kernel.org
Subject: Re: TKIP encryption should allocate enough tailroom
Date: Tue, 16 Jan 2007 19:39:31 -0800	[thread overview]
Message-ID: <20070117033931.GX35756@gaz.sfgoth.com> (raw)
In-Reply-To: <87bqky759v.fsf@ten22.rhodesmill.org>

Brandon Craig Rhodes wrote:
> +	if (skb_tailroom(skb) < 4) {
> +		int err;
> +		err = skb_padto(skb, skb->len + 4);
> +		if (unlikely(err || skb_tailroom(skb) < 4)) {
> +			printk(KERN_DEBUG "Failed to increase tailroom"
> +			       " for TKIP encrypt");
> +			return err || -1;

The "||" operator in C doesn't act the same way it does in perl and ruby.
You're always returning 1 here.

+			return err || -1;

...and here as well.

-Mitch

  reply	other threads:[~2007-01-17  3:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-17  2:31 TKIP encryption should allocate enough tailroom Brandon Craig Rhodes
2007-01-17  3:39 ` Mitchell Blank Jr [this message]
2007-01-17  3:34   ` Brandon Craig Rhodes
2007-01-17  6:34     ` Herbert Xu
2007-01-17  7:18       ` Herbert Xu
2007-01-17  3:50 ` Michael Wu
2007-01-17 16:46 ` Brandon Craig Rhodes
2007-01-17 17:23   ` Larry Finger
2007-01-17 17:38     ` Brandon Craig Rhodes
2007-01-18 13:16   ` Pekka Pietikainen
2007-01-18 13:55     ` Brandon Craig Rhodes
2007-01-19 12:23       ` Pekka Pietikainen

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=20070117033931.GX35756@gaz.sfgoth.com \
    --to=mitch@sfgoth.com \
    --cc=brandon@rhodesmill.org \
    --cc=netdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.