| To: | Evgeniy Polyakov <johnpol@xxxxxxxxxxx> |
|---|---|
| Subject: | Re: [1/1] connector/CBUS: new messaging subsystem. Revision number next. |
| From: | Thomas Graf <tgraf@xxxxxxx> |
| Date: | Mon, 11 Apr 2005 15:32:39 +0200 |
| Cc: | netdev@xxxxxxxxxxx, Greg KH <greg@xxxxxxxxx>, Jamal Hadi Salim <hadi@xxxxxxxxxx>, Kay Sievers <kay.sievers@xxxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, James Morris <jmorris@xxxxxxxxxx>, Guillaume Thouvenin <guillaume.thouvenin@xxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Andrew Morton <akpm@xxxxxxxx>, Jay Lan <jlan@xxxxxxxxxxxx> |
| In-reply-to: | <20050411125932.GA19538@uganda.factory.vocord.ru> |
| References: | <20050411125932.GA19538@uganda.factory.vocord.ru> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
* Evgeniy Polyakov <20050411125932.GA19538@xxxxxxxxxxxxxxxxxxxxxxxx> 2005-04-11
16:59
> + size = NLMSG_SPACE(sizeof(*msg) + msg->len);
> +
> + skb = alloc_skb(size, gfp_mask);
> + if (!skb) {
> + printk(KERN_ERR "Failed to allocate new skb with size=%u.\n",
> size);
> + return -ENOMEM;
> + }
> +
> + nlh = NLMSG_PUT(skb, 0, msg->seq, NLMSG_DONE, size - sizeof(*nlh));
Needs same fix.
> + size0 = sizeof(*msg) + sizeof(*ctl) + 3*sizeof(*req);
> +
> + size = NLMSG_SPACE(size0);
> +
> + skb = alloc_skb(size, GFP_ATOMIC);
> + if (!skb) {
> + printk(KERN_ERR "Failed to allocate new skb with size=%u.\n",
> size);
> +
> + return -ENOMEM;
> + }
> +
> + nlh = NLMSG_PUT(skb, 0, 0x123, NLMSG_DONE, size -
> NLMSG_ALIGN(sizeof(*nlh)));
Just pass size0 instead of reverting the calculation.
|
| Previous by Date: | [1/1] connector/CBUS: new messaging subsystem. Revision number next., Evgeniy Polyakov |
|---|---|
| Next by Date: | Re: Function to read IP address in dot format, Randy.Dunlap |
| Previous by Thread: | [1/1] connector/CBUS: new messaging subsystem. Revision number next., Evgeniy Polyakov |
| Next by Thread: | [2/1] connector/CBUS: new messaging subsystem. Revision number next., Evgeniy Polyakov |
| Indexes: | [Date] [Thread] [Top] [All Lists] |