aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-07-20 22:45:45 -0400
committerDavid S. Miller <davem@davemloft.net>2007-07-20 22:45:45 -0400
commit31ce72a6b1c7635259cf522459539c0611f2c50c (patch)
treed8a20cc99b87822c56081b4bc2b4e9bf796a196a /net
parentfc7b93800b48324667e218a4b6b784b853cf4dd7 (diff)
[NET]: Fix loopback crashes when multiqueue is enabled.
From: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/dev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 38212c3f9971..ee4035571c21 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3624,7 +3624,7 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,
3624 3624
3625 /* ensure 32-byte alignment of both the device and private area */ 3625 /* ensure 32-byte alignment of both the device and private area */
3626 alloc_size = (sizeof(*dev) + NETDEV_ALIGN_CONST + 3626 alloc_size = (sizeof(*dev) + NETDEV_ALIGN_CONST +
3627 (sizeof(struct net_device_subqueue) * queue_count)) & 3627 (sizeof(struct net_device_subqueue) * (queue_count - 1))) &
3628 ~NETDEV_ALIGN_CONST; 3628 ~NETDEV_ALIGN_CONST;
3629 alloc_size += sizeof_priv + NETDEV_ALIGN_CONST; 3629 alloc_size += sizeof_priv + NETDEV_ALIGN_CONST;
3630 3630
@@ -3642,7 +3642,7 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,
3642 dev->priv = ((char *)dev + 3642 dev->priv = ((char *)dev +
3643 ((sizeof(struct net_device) + 3643 ((sizeof(struct net_device) +
3644 (sizeof(struct net_device_subqueue) * 3644 (sizeof(struct net_device_subqueue) *
3645 queue_count) + NETDEV_ALIGN_CONST) 3645 (queue_count - 1)) + NETDEV_ALIGN_CONST)
3646 & ~NETDEV_ALIGN_CONST)); 3646 & ~NETDEV_ALIGN_CONST));
3647 } 3647 }
3648 3648