From: "Gustavo F. Padovan" <gustavo@las.ic.unicamp.br>
To: Andrei Emeltchenko <andrei.emeltchenko.news@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: Remove double free of skb pointer
Date: Tue, 5 Jan 2010 20:33:07 -0200 [thread overview]
Message-ID: <6b53b1991001051433x19c97c3elbe0edbd5ed8df3b7@mail.gmail.com> (raw)
In-Reply-To: <508e92ca0912220656j6913ef64w4bd6c1557079d0b5@mail.gmail.com>
On Tue, Dec 22, 2009 at 12:56 PM, Andrei Emeltchenko
<andrei.emeltchenko.news@gmail.com> wrote:
> Trivial fix for double free of skb pointer with kfree_skb to
> make code simplier and cleaner. Remove unused variable err.
>
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
> ---
> net/bluetooth/l2cap.c | 11 ++++-------
> 1 files changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
> index 1120cf1..8acc19e 100644
> --- a/net/bluetooth/l2cap.c
> +++ b/net/bluetooth/l2cap.c
> @@ -3518,7 +3518,6 @@ static inline int l2cap_data_channel(struct
> l2cap_conn *conn, u16 cid, struct sk
> struct l2cap_pinfo *pi;
> u16 control, len;
> u8 tx_seq;
> - int err;
>
> sk = l2cap_get_chan_by_scid(&conn->chan_list, cid);
> if (!sk) {
> @@ -3570,13 +3569,11 @@ static inline int l2cap_data_channel(struct
> l2cap_conn *conn, u16 cid, struct sk
> goto drop;
>
> if (__is_iframe(control))
> - err = l2cap_data_channel_iframe(sk, control, skb);
> + l2cap_data_channel_iframe(sk, control, skb);
> else
> - err = l2cap_data_channel_sframe(sk, control, skb);
> + l2cap_data_channel_sframe(sk, control, skb);
>
> - if (!err)
> - goto done;
> - break;
> + goto done;
>
> case L2CAP_MODE_STREAMING:
> control = get_unaligned_le16(skb->data);
> @@ -3602,7 +3599,7 @@ static inline int l2cap_data_channel(struct
> l2cap_conn *conn, u16 cid, struct sk
> else
> pi->expected_tx_seq = tx_seq + 1;
>
> - err = l2cap_sar_reassembly_sdu(sk, skb, control);
> + l2cap_sar_reassembly_sdu(sk, skb, control);
>
> goto done;
>
> --
> 1.6.0.4
>
Acked-by: Gustavo F. Padovan <padovan@profusion.mobi>
--
Gustavo F. Padovan
http://padovan.org
next prev parent reply other threads:[~2010-01-05 22:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-22 14:56 [PATCH] Bluetooth: Remove double free of skb pointer Andrei Emeltchenko
2010-01-05 22:33 ` Gustavo F. Padovan [this message]
2010-01-07 3:47 ` Marcel Holtmann
-- strict thread matches above, loose matches on Subject: below --
2009-12-22 13:29 Andrei Emeltchenko
2009-12-22 13:34 ` Andrei Emeltchenko
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=6b53b1991001051433x19c97c3elbe0edbd5ed8df3b7@mail.gmail.com \
--to=gustavo@las.ic.unicamp.br \
--cc=andrei.emeltchenko.news@gmail.com \
--cc=linux-bluetooth@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).