Re: [PATCH] connector: Removed the destruct_data callback since itis always kfree_skb()

From: Andrew Morton
Date: Sun Oct 04 2009 - 17:59:22 EST


On Tue, 29 Sep 2009 16:48:11 +0200 Philipp Reisner <philipp.reisner@xxxxxxxxxx> wrote:

> Signed-off-by: Philipp Reisner <philipp.reisner@xxxxxxxxxx>
> Acked-by: Lars Ellenberg <lars.ellenberg@xxxxxxxxxx>

Please don't send unchangelogged patches.

> index 163c3e3..210338e 100644
> --- a/drivers/connector/cn_queue.c
> +++ b/drivers/connector/cn_queue.c
> @@ -83,8 +83,8 @@ void cn_queue_wrapper(struct work_struct *work)
>
> d->callback(msg, nsp);
>
> - d->destruct_data(d->ddata);
> - d->ddata = NULL;
> + kfree_skb(d->skb);
> + d->skb = NULL;
>
> kfree(d->free);
> }

So.. why is this a good thing to do? The patchset removes the option
of ever putting anything other than an skb* into the callback data, it
does this without any dicussion or justification and it does it under
the guise of "allowing permission checking in the receiver callbacks".

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/