summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* net-next: vmxnet3 fixes [4/5] Do not reset when the device is not openedShreyas Bhatewara2010-07-191-0/+2
| | | | | | | | | | | | Hold rtnl_lock to get the right link state. While asynchronously resetting the device, hold rtnl_lock to get the right value from netif_running. If a reset is scheduled, and the device goes thru close and open, it may happen that reset and open may run in parallel. Holding rtnl_lock will avoid this. Signed-off-by: Shreyas Bhatewara <sbhatewara@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: 64bit stats for netdev_queueEric Dumazet2010-07-192-4/+6
| | | | | | | | | | | | | Since struct netdev_queue tx_bytes/tx_packets/tx_dropped are already protected by _xmit_lock, its easy to convert these fields to u64 instead of unsigned long. This completes 64bit stats for devices using them (vlan, macvlan, ...) Strictly, we could avoid the locking in dev_txq_stats_fold() on 64bit arches, but its slow path and we prefer keep it simple. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: fix bond_inet6addr_event()Eric Dumazet2010-07-191-0/+2
| | | | | | | | | | After commit ad1afb0039391 (vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet)), bond_inet6addr_event() might be called with a NULL bond->vlgrp pointer, and a non empty bond->vlan_list. vlan_group_get_device() is dereferencing a NULL pointer. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* s2io: Remove unnecessary memset of netdev private dataTobias Klauser2010-07-191-1/+0
| | | | | | | | | The memory for the private data is allocated using kzalloc in alloc_etherdev (or alloc_netdev_mq respectively) so there is no need to set it to 0 again. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* sch_atm: Convert to use standard list_head facilities.David S. Miller2010-07-181-57/+41
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* net: support time stamping in phy devices.Richard Cochran2010-07-1810-1/+208
| | | | | | | | | | | | | | | This patch adds a new networking option to allow hardware time stamps from PHY devices. When enabled, likely candidates among incoming and outgoing network packets are offered to the PHY driver for possible time stamping. When accepted by the PHY driver, incoming packets are deferred for later delivery by the driver. The patch also adds phylib driver methods for the SIOCSHWTSTAMP ioctl and callbacks for transmit and receive time stamping. Drivers may optionally implement these functions. Signed-off-by: Richard Cochran <richard.cochran@omicron.at> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: added a BPF to help drivers detect PTP packets.Richard Cochran2010-07-181-0/+126
| | | | | | | | | | | Certain kinds of hardware time stamping units in both MACs and PHYs have the limitation that they can only time stamp PTP packets. Drivers for such hardware are left with the task of correctly matching skbs to time stamps. This patch adds a BPF that drivers can use to classify PTP packets when needed. Signed-off-by: Richard Cochran <richard.cochran@omicron.at> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: preserve ifreq parameter when calling generic phy_mii_ioctl().Richard Cochran2010-07-1825-43/+34
| | | | | | | | | | | | The phy_mii_ioctl() function unnecessarily throws away the original ifreq. We need access to the ifreq in order to support PHYs that can perform hardware time stamping. Two maverick drivers filter the ioctl commands passed to phy_mii_ioctl(). This is unnecessary since phylib will check the command in any case. Signed-off-by: Richard Cochran <richard.cochran@omicron.at> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: add driver hook for tx time stamping.Richard Cochran2010-07-181-0/+21
| | | | | | | | | | This patch adds a hook for transmit time stamps. The transmit hook allows a software fallback for transmit time stamps, for MACs lacking time stamping hardware. Using the hook will still require adding an inline function call to each MAC driver. Signed-off-by: Richard Cochran <richard.cochran@omicron.at> Signed-off-by: David S. Miller <davem@davemloft.net>
* vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet)Pedro Garcia2010-07-183-49/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Without the 8021q module loaded in the kernel, all 802.1p packets (VLAN 0 but QoS tagging) are silently discarded (as expected, as the protocol is not loaded). - Without this patch in 8021q module, these packets are forwarded to the module, but they are discarded also if VLAN 0 is not configured, which should not be the default behaviour, as VLAN 0 is not really a VLANed packet but a 802.1p packet. Defining VLAN 0 makes it almost impossible to communicate with mixed 802.1p and non 802.1p devices on the same network due to arp table issues. - Changed logic to skip vlan specific code in vlan_skb_recv if VLAN is 0 and we have not defined a VLAN with ID 0, but we accept the packet with the encapsulated proto and pass it later to netif_rx. - In the vlan device event handler, added some logic to add VLAN 0 to HW filter in devices that support it (this prevented any traffic in VLAN 0 to reach the stack in e1000e with HW filter under 2.6.35, and probably also with other HW filtered cards, so we fix it here). - In the vlan unregister logic, prevent the elimination of VLAN 0 in devices with HW filter. - The default behaviour is to ignore the VLAN 0 tagging and accept the packet as if it was not tagged, but we can still define a VLAN 0 if desired (so it is backwards compatible). Signed-off-by: Pedro Garcia <pedro.netdev@dondevamos.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: Remove MAX_SOCK_ADDR constantTetsuo Handa2010-07-181-9/+0
| | | | | | | | | MAX_SOCK_ADDR is no longer used because commit 230b1839 "net: Use standard structures for generic socket address structures." replaced "char address[MAX_SOCK_ADDR];" with "struct sockaddr_storage address;". Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
* arcnet: fix signed bug in probe functionDan Carpenter2010-07-182-3/+3
| | | | | | | | | probe_irq_off() returns the first irq found or if two irqs are found then it returns the negative of the first irq found. We can cast dev->irq to an int so that the test for negative values works. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: dccp: fix sign bugKulikov Vasiliy2010-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'gap' is unsigned, so this code is wrong: gap = -new_head; ... if (gap > 0) { ... } Make 'gap' signed. The semantic patch that finds this problem (many false-positive results): (http://coccinelle.lip6.fr/) // <smpl> @ r1 @ identifier f; @@ int f(...) { ... } @@ identifier r1.f; type T; unsigned T x; @@ *x = f(...) ... *x > 0 Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: fix pci resource leakAmit Kumar Salecha2010-07-181-1/+6
| | | | | | | | pci_get_domain_bus_and_slot: caller must decrement the reference count by calling pci_dev_put(). Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net-next: vmxnet3 fixes [3/5] Initialize link state at probe timeShreyas Bhatewara2010-07-181-5/+8
| | | | | | | | | This change initializes the state of link at the time when driver is loaded. The ethtool output for 'link detected' and 'link speed' is thus valid even before the interface is brought up. Signed-off-by: Shreyas Bhatewara <sbhatewara@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2: use device model DMA APIStanislaw Gruszka2010-07-181-53/+58
| | | | | | | | | Use DMA API as PCI equivalents will be deprecated. This change also allow to allocate with GFP_KERNEL in some places. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2: allocate with GFP_KERNEL flag on RX path initStanislaw Gruszka2010-07-181-8/+9
| | | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4vf: fix SGE resource resource deallocation bugCasey Leedom2010-07-151-1/+1
| | | | | | | | Fix SGE resource resource deallocation bug. Forgot to increment the RXQ and TXQ cursors in the loop ... Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net-next: vmxnet3 fixes [2/5] Interrupt control bitmapRonghua Zang2010-07-152-1/+10
| | | | | | | | | A new bit map 'intrCtrl' is introduced in the DriverShared area. The driver should update VMXNET3_IC_DISABLE_ALL bit before writing IMR. Signed-off-by: Ronghua Zang <ronghua@vmware.com> Signed-off-by: Shreyas Bhatewara <sbhatewara@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net-next: fix LRO feature update in vmxnet3Shreyas Bhatewara2010-07-151-2/+3
| | | | | | | Fix LRO feature update. Signed-off-by: Shreyas Bhatewara <sbhatewara@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tcp: sizeof struct tcp_skb_cb is 44Eric Dumazet2010-07-151-5/+4
| | | | | | | | | Correct comment stating sizeof(struct tcp_skb_cb) is 36 or 40, since its 44 bytes, since commit 951dbc8ac714b04 ([IPV6]: Move nextheader offset to the IP6CB). Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: Version updateJon Mason2010-07-151-3/+2
| | | | | | | | | Version update Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@exar.com> Signed-off-by: Ramkrishna Vepa <ramkrishna.vepa@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: Update maintainers informationJon Mason2010-07-151-5/+7
| | | | | | | | | Update and correct maintainers information Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@exar.com> Signed-off-by: Ramkrishna Vepa <ramkrishna.vepa@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: Update copyright informationJon Mason2010-07-1514-26/+26
| | | | | | | | | Update copyright information to reflect the Exar purchase of Neterion Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@exar.com> Signed-off-by: Ramkrishna Vepa <ramkrishna.vepa@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: NETIF_F_LLTX removalJon Mason2010-07-153-129/+39
| | | | | | | | | | | NETIF_F_LLTX and it's usage of local transmit locks are depricated in favor of using the netdev queue's transmit lock. Remove the local lock and all references to it, and use the netdev queue transmit lock in the transmit completion handler. Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: Ramkrishna Vepa <ramkrishna.vepa@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: Fix multicast issuesJon Mason2010-07-151-124/+146
| | | | | | | | | | | Fix error in multicast flag check, add calls to restore the status of multicast and promiscuous mode settings after change_mtu, and style cleanups to shorten the function calls by using a temporary variable. Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@exar.com> Signed-off-by: Ramkrishna Vepa <ramkrishna.vepa@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: Remove queue_state referencesJon Mason2010-07-152-86/+42
| | | | | | | | | | | | | Remove queue_state references, as they are no longer necessary. Also, The driver needs to start/stop the queue regardless of which type of steering is enabled. Remove checks for TX_MULTIQ_STEERING only and start/stop for all steering types. Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@exar.com> Signed-off-by: Ramkrishna Vepa <ramkrishna.vepa@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: bridge: fix sign bugKulikov Vasiliy2010-07-151-1/+1
| | | | | | | | | | | ipv6_skip_exthdr() can return error code that is below zero. 'offset' is unsigned, so it makes no sense. ipv6_skip_exthdr() returns 'int' so we can painlessly change type of offset to int. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers: ixgbevf: fix unsigned underflowKulikov Vasiliy2010-07-151-1/+2
| | | | | | | | | | | | | | | | | | 'count' is unsigned. It is initialized to zero, then it can be increased multiple times, and finally it is used in such a way: >>>> count--; | | /* clear timestamp and dma mappings for remaining portion of packet */ | while (count >= 0) { | count--; | ... ^ If count is zero here (so, it was never increased), we would have a very long loop :) Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers: irda: fix sign bugKulikov Vasiliy2010-07-151-1/+1
| | | | | | | | platform_get_irq_byname() can return negative results, it is not seen to unsigned irq. Make it signed. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers: irda: fix sign bugKulikov Vasiliy2010-07-151-1/+1
| | | | | | | | platform_get_irq_byname() can return negative results, it is not seen to unsigned irq. Make it signed. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers: isdn: get rid of custom strtoul()Andy Shevchenko2010-07-151-60/+20
| | | | | | | | | | | | | | There were two methods isdn_gethex() and isdn_getnum() which are custom implementations of strtoul(). Get rid of them in regard to strict_strtoul() kernel's function. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Hansjoerg Lipp <hjlipp@web.de> Cc: Tilman Schmidt <tilman@imap.cc> Cc: Karsten Keil <isdn@linux-pingi.de> Cc: gigaset307x-common@lists.sourceforge.net Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers: isdn: remove custom strtoul()Andy Shevchenko2010-07-151-28/+6
| | | | | | | | | In this case we safe to use strict_strtoul(). Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Karsten Keil <isdn@linux-pingi.de> Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers: isdn: use kernel macros to convert hex digitAndy Shevchenko2010-07-152-16/+4
| | | | | | | | Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Karsten Keil <isdn@linux-pingi.de> Cc: Tilman Schmidt <tilman@imap.cc> Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
* isdn/hisax: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)Peter Huewe2010-07-151-42/+42
| | | | | | | | | This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and .subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the PCI_VDEVICE macro, and thus improves readability. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* mISDN: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)Peter Huewe2010-07-151-6/+3
| | | | | | | | | This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and .subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the PCI_VDEVICE macro, and thus improves readability. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* isdn/hardware/eicon: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID ↵Peter Huewe2010-07-151-35/+34
| | | | | | | | | | | is used) This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and .subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the PCI_VDEVICE macro, and thus improves readability. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* mISDN: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)Peter Huewe2010-07-151-25/+14
| | | | | | | | | This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and .subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the PCI_VDEVICE macro, and thus improves readability. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* isdn/hardware/mISDN: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID ↵Peter Huewe2010-07-151-46/+46
| | | | | | | | | | | is used) This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and .subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the PCI_VDEVICE macro, and thus improves readability. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* atm: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)Peter Huewe2010-07-151-4/+2
| | | | | | | | | This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and .subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the PCI_VDEVICE macro, and thus improves readability. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* atm: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)Peter Huewe2010-07-151-2/+1
| | | | | | | | | This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and .subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the PCI_VDEVICE macro, and thus improves readability. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* atm: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)Peter Huewe2010-07-151-2/+1
| | | | | | | | | This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and .subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the PCI_VDEVICE macro, and thus improves readability. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* atm: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)Peter Huewe2010-07-151-2/+1
| | | | | | | | | This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and .subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the PCI_VDEVICE macro, and thus improves readability. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* atm: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)Peter Huewe2010-07-151-4/+2
| | | | | | | | | This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and .subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the PCI_VDEVICE macro, and thus improves readability. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* atm: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)Peter Huewe2010-07-151-4/+2
| | | | | | | | | This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and .subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the PCI_VDEVICE macro, and thus improves readability. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* atm: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)Peter Huewe2010-07-151-4/+2
| | | | | | | | | This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and .subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the PCI_VDEVICE macro, and thus improves readability. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/nuc900: enable Mac driver clockWan ZongShun2010-07-151-0/+3
| | | | | | | | | | | | | This patch fixed a bug that Mac driver does not work,because I missed the clk enable. I have ever tested the driver when I submitted previous Mac driver patch, and it worked good, since my bootloader has enabled the clock in advance. But when I try to use other bootloader where clock engine was disabled,the Mac driver does not work, so I send this patch to fix this issue. Signed-off-by: Wan ZongShun <mcuos.com@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net/mlx4: Use %pV, pr_<level>, printk_onceJoe Perches2010-07-156-61/+71
| | | | | | | | | | | | | | | | | Remove near duplication of format string constants by using the newly introduced vsprintf extention %pV to reduce text by 20k or so. $ size drivers/net/mlx4/built-in.o* text data bss dec hex filename 161367 1866 48784 212017 33c31 drivers/net/mlx4/built-in.o 142621 1866 46248 190735 2e90f drivers/net/mlx4/built-in.o.new Use printk_once as appropriate. Convert printks to pr_<level>, some bare printks now use pr_cont. Remove now unused #define PFX. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Net: ethernet: pe2.c: fix EXPORT_SYMBOL macro code style issueChihau Chau2010-07-141-2/+1
| | | | | | | | | This patch fix a code style issue, if a function is exported, the EXPORT_SYMBOL macro for it should follow immediately after the closing function brace line. Signed-off-by: Chihau Chau <chihau@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: fix a buffer overflow in bonding_show_queue_id.Nicolas de Pesloüan2010-07-141-2/+2
| | | | | | | | | | | The test for buffer overflow ensures we have room for 6 more bytes. sprintf, called with %s:%d, slave->dev->name, slave->queue_id may yield far more than 6 bytes. The correct test is res > (PAGE_SIZE - IFNAMSIZ - 6) . Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr> Signed-off-by: David S. Miller <davem@davemloft.net>