aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-07-22target: merge release_cmd methodsChristoph Hellwig7-60/+35
The release_cmd_to_pool and release_cmd_direct methods are always the same. Merge them into a single release_cmd method, and clean up the fallout. (nab: fix breakage in transport_generic_free_cmd() parameter build breakage in drivers/target/tcm_fc/tfc_cmd.c) Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2011-07-22target: remove the unused SCF_* flagsChristoph Hellwig2-29/+5
This patch contains a squashed version to remove unused SCF_* flags: target: remove the unused SCF_SE_DISABLE_ONLINE_CHECK flag target: remove the unused SCF_CMD_PASSTHROUGH_NOALLOC flag target: remove the unused SCF_EMULATE_SYNC_UNMAP flag target: remove the unused SCF_EMULATE_SYNC_CACHE flag Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2011-07-22target: remove the always-noop ->new_cmd_failure methodChristoph Hellwig8-31/+0
Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2011-07-22target: Updates from AGrover and HCH (round 3)Andy Grover17-753/+583
This patch contains a squashed version of third round series cleanups, improvements ,and simplfications from Andy and Christoph ahead of the heavy lifting between round 3 -> 4 for the target core SGL conversion. This include cleanups to the main target I/O path and other miscellaneous updates. target: Replace custom sg<->buf functions with lib funcs target: Simplify sector limiting code target: get_cdb should never return NULL target: Simplify transport_memcpy_se_mem_read_contig target: Use assignment rather than increment for t_task_cdbs target: Don't pass dma_size to generic_get_mem target: Pass sg with type scatterlist in transport_map_sg_to_mem target: Move task_sg_num next to task_sg in struct se_task target: inline struct se_transport_task into struct se_cmd target: Change name & semantics of transport_get_sectors() target: Remove unused members of se_cmd target: Rename se_cmd.t_task_cdbs to t_task_list_num target: Fix some spelling target: Remove unused var from transport_generic_do_tmr target: map_sg_to_mem: return sg_count in return value target/pscsi: Use min_t for sector limits target/pscsi: Unused param for pscsi_get_bio() target: Rename get_cdb_count to allocate_tasks target: Make transport_generic_new_cmd() available for iscsi-target target: Remove fabric callback to allocate iovecs target: Fix transport_generic_new_cmd WRITE comment (hch: Use __GFP_ZERO usage for alloc_pages() usage) Signed-off-by: Andy Grover <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2011-07-22target: Fix WRITE_SAME_[16,32] number of blocks=0 caseNicholas Bellinger2-10/+32
This patch fixes the handling of WRITE_SAME_[16,32] emulation where a WRITE_SAME_* CDB with number of blocks=0 was being rejected by SCSI expected data transfer length overflow checking in target core. It changes both CDB cases in transport_generic_cmd_sequencer() to use dev->se_sub_dev->se_dev_attrib.block_size to match what sg_write_same is sending us with --num=0. It also fixes target_emulate_write_same() to properly determine the num_blocks with --num=0 case to determine the remaining range for dev->transport->do_discard(). Reported-by: Chris Greiveldinger <[email protected]> Signed-off-by: Nicholas A. Bellinger <[email protected]>
2011-07-22target: Fix WRITE_SAME_16 t_task_lba assignment bugNicholas Bellinger1-1/+1
This patch fixes a bug in the assignment of cmd->t_task.t_task_lba with WRITE_SAME_16 to correctly use get_unaligned_be64() for the 64-bit LBA. Reported-by: Chris Greiveldinger <[email protected]> Signed-off-by: Nicholas A. Bellinger <[email protected]>
2011-07-22target: More core cleanups from AGrover (round 2)Andy Grover19-941/+761
This patch contains the squashed version of second round of target core cleanups and simplifications and Andy and Co. It also contains a handful of fixes to address bugs the original series and other minor cleanups. Here is the condensed shortlog: target: Remove unneeded casts to void* target: Rename get_lun_for_{cmd,tmr} to lookup_{cmd,tmr}_lun target: Make t_task a member of se_cmd, not a pointer target: Handle functions returning "-2" target: Use cmd->se_dev over cmd->se_lun->lun_se_dev target: Embed qr in struct se_cmd target: Replace embedded struct se_queue_req with a list_head target: Rename list_heads that are nodes in struct se_cmd to "*_node" target: Fold transport_device_setup_cmd() into lookup_{tmr,cmd}_lun() target: Make t_mem_list and t_mem_list_bidi members of t_task target: Add comment & cleanup transport_map_sg_to_mem() target: Remove unneeded checks in transport_free_pages() (Roland: Fix se_queue_req removal leftovers OOPs) (nab: Fix transport_lookup_tmr_lun failure case) (nab: Fix list_empty(&cmd->t_task.t_mem_bidi_list) inversion bugs) Signed-off-by: Andy Grover <[email protected]> Signed-off-by: Roland Dreier <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2011-07-22target: Fix double test of inquiry_prodRoland Dreier1-1/+1
The code in transport_add_device_to_core_hba() really intends to make sure that neither inquiry_prod nor inquiry_rev is NULL. Signed-off-by: Roland Dreier <[email protected]> Signed-off-by: Nicholas A. Bellinger <[email protected]>
2011-07-22target: Core cleanups from AGrover (round 1)Andy Grover27-1940/+1703
This patch contains the squashed version of a number of cleanups and minor fixes from Andy's initial series (round 1) for target core this past spring. The condensed log looks like: target: use errno values instead of returning -1 for everything target: Rename transport_calc_sg_num to transport_init_task_sg target: Fix leak in error path in transport_init_task_sg target/pscsi: Remove pscsi_get_sh() usage target: Make two runtime checks into WARN_ONs target: Remove hba queue depth and convert to spin_lock_irq usage target: dev->dev_status_queue_obj is unused target: Make struct se_queue_req.cmd type struct se_cmd * target: Remove __transport_get_qr_from_queue() target: Rename se_dev->g_se_dev_list to se_dev_node target: Remove struct se_global target: Simplify scsi mib index table code target: Make dev_queue_obj a member of se_device instead of a pointer target: remove extraneous returns at end of void functions target: Ensure transport_dump_vpd_ident_type returns null-terminated str target: Function pointers don't need to use '&' to be assigned target: Fix comment in __transport_execute_tasks() target: Misc style cleanups target: rename struct pr_reservation_template to pr_reservation target: Remove #defines that just perform indirection target: Inline transport_get_task_from_execute_queue() target: Minor header comment fixes Signed-off-by: Andy Grover <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2011-07-22target: Remove unused su_group usage in fabric register/dergisterNicholas Bellinger1-15/+0
This patch removes two instances of left over v3.x code performing local scope access to struct target_core_fabric_ops->tf_subsys->su_group in target_fabric_configfs_register() and target_fabric_configfs_deregister(). Reported-by: Christophe Fergeau <[email protected]> Signed-off-by: Nicholas A. Bellinger <[email protected]>
2011-07-22target: Remove unnecessary *cdb transport_get_lun_for_cmd parameterNicholas Bellinger4-4/+3
This patch removes the now unnecessary 'unsigned char *cdb' function parameter from transport_get_lun_for_cmd(). This also includes updating lio-target, tcm_loop and tcm_fc usage of transport_get_lun_for_cmd(). Reported-by: Fubo Chen <[email protected]> Signed-off-by: Nicholas A. Bellinger <[email protected]>
2011-07-22target: use MAINTENANCE_IN and MAINTENANCE_OUT definitions in scsi.hNicholas Bellinger1-2/+2
Signed-off-by: FUJITA Tomonori <[email protected]> Signed-off-by: Nicholas A. Bellinger <[email protected]>
2011-07-22target: Check LUN numbers in transport_get_lun_for_[cmd,tmr]Fubo Chen1-0/+12
This patch checks the passed 'unpacked_lun' against TRANSPORT_MAX_LUNS_PER_TPG before reading from struct se_node_acl->device_list[]. Signed-off-by: Fubo Chen <[email protected]> Signed-off-by: Nicholas A. Bellinger <[email protected]>
2011-07-22mips: Fix i8253 clockevent falloutThomas Gleixner1-1/+1
pit_clockevent wants to replaced in the argument of the callback function as well. Reported-by; Ingo Molnar <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
2011-07-22slab: fix DEBUG_SLAB warningTetsuo Handa1-1/+2
In commit c225150b "slab: fix DEBUG_SLAB build", "if ((unsigned long)objp & (ARCH_SLAB_MINALIGN-1))" is always true if ARCH_SLAB_MINALIGN == 0. Do not print warning if ARCH_SLAB_MINALIGN == 0. Signed-off-by: Tetsuo Handa <[email protected]> Signed-off-by: Pekka Enberg <[email protected]>
2011-07-22MAINTAINERS: change e-mail of Adrian HunterArtem Bityutskiy1-1/+2
... he does not work in Nokia any longer. Signed-off-by: Artem Bityutskiy <[email protected]>
2011-07-21Merge branch 'vhost-net-next' of ↵David S. Miller1-4/+14
git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
2011-07-21net: Fix ppc64 BPF JIT dependencies.David S. Miller1-1/+1
Signed-off-by: David S. Miller <[email protected]>
2011-07-21acenic: include NET_SKB_PAD headroom to incoming skbsEric Dumazet1-3/+3
Some workloads need some headroom (NET_SKB_PAD) to avoid expensive reallocations. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-21Merge branch 'master' of ↵David S. Miller7-481/+338
master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net-next-2.6
2011-07-21ixgbe: convert to ndo_fix_featuresDon Skidmore3-217/+111
Private rx_csum flags are now duplicate of netdev->features & NETIF_F_RXCSUM. We remove those duplicates and now use the net_device_ops ndo_set_features. This was based on the original patch submitted by Michal Miroslaw <[email protected]>. I also removed the special case not requiring a reset for X540 hardware. It is needed just as it is in 82599 hardware. Signed-off-by: Don Skidmore <[email protected]> Cc: Michal Miroslaw <[email protected]> Tested-by: Phil Schmitt <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-07-21ixgbe: only enable WoL for magic packet by defaultAndy Gospodarek1-6/+3
Martin Wilck <[email protected]> reported that systems using the ixgbe-driver that were capable of WoL were rebooting almost as soon as they were shut down. This is because the default WoL settings enabled magic packet, broadcast, unicast, and multicast. Other Intel devices seem to use the stored eeprom value for initial WoL capabilities. The 82578DM (e1000e) and 82576 (igb) the devices I looked at had only the magic packet enabled in the eeprom, so that seems appropriate on ixgbe-based devices as well. I set the WoL options on my 82578DM to be the same default as the ixgbe devices (umbg) and saw the same as Martin -- almost as soon as my box shutdown, it booted again. This patch changes the default to only be the magic packet. This is the same as the default for most Intel and non-Intel hardware currently upstream. Signed-off-by: Andy Gospodarek <[email protected]> CC: Martin Wilck <[email protected]> Tested-by: Phil Schmitt <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-07-21ixgbe: remove ifdef check for non-existent defineEmil Tantilov1-2/+0
Signed-off-by: Emil Tantilov <[email protected]> Tested-by: Phil Schmitt <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-07-21ixgbe: Pass staterr instead of re-reading status and error bits from descriptorAlexander Duyck3-42/+37
This change is meant to address possible race conditions from the status and error bits on the RX descriptors being re-read by multiple functions in the RX cleanup path. To resolve this I have added code that will pass the staterr value to those functions. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Ross Brattain <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-07-21ixgbe: Move interrupt related values out of ring and into q_vectorAlexander Duyck3-138/+62
This change moves work_limit, total_packets, and total_bytes into the ring container struct of the q_vector. The advantage of this is that it should reduce the size of memory used in the event of multiple rings being assigned to a single q_vector. In addition it should help to reduce the total workload for calculating itr since now total_packets and total_bytes will be the total work done of the interrupt instead of for the ring. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Ross Brattain <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-07-21ixgbe: add structure for containing RX/TX rings to q_vectorAlexander Duyck3-84/+88
This patch adds support for a ring container structure to be used within the q_vector. The basic idea is to provide a means of separating the RX and TX rings while maintaining a common structure for their containment. The advantage to this is that later we should be able to pass this structure to the update_itr functions without needing to pass individual rings. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Ross Brattain <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-07-21mlx4_core: Bump the driver version to 1.0Dotan Barak1-2/+2
Many features were added to this driver, so the driver version should change too. Signed-off-by: Dotan Barak <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
2011-07-21ixgbe: inline the ixgbe_maybe_stop_tx functionAlexander Duyck1-1/+1
The ixgbe_maybe_stop_tx function is only a few lines long and is called multiple times through the xmit hotpath. In order to streamline things it makes sense to just inline it. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Ross Brattain <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-07-21ixgbe: Update ATR to use recorded TX queues instead of CPU for routingAlexander Duyck1-4/+3
This change is meant to update ATR so that it will use the recorded RX queue instead of the CPU in the case of routing. This change is meant to help ixgbe default behavior to more closely match that of the kernel. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Ross Brattain <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-07-21igb: Fix for DH89xxCC near end loopback testRobert Healy2-0/+43
On this chipset it is required to configure the MPHY block for loopback tests. If MPHY is not configured then all loopback tests will report failures. Signed-off-by: Robert Healy <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-07-21e1000: always call e1000_check_for_link() on e1000_ce4100 MACs.Nicolas Schichan1-4/+7
Interrupts about link lost or rx sequence errors are not reported by the ce4100 hardware, leading to transitions from link UP to link DOWN never being reported. Signed-off-by: Nicolas Schichan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-07-22lguest: Fix in/out emulationRusty Russell1-9/+11
We were blatting too much of the register. Linux didn't care, but in theory it might. Reported-by: Jonas Maebe <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2011-07-22lguest: Fix translation count about wikipedia's cpuid pageAdrian Knoth1-1/+1
The comment is outdated, wikipedia now has six translations of the cpuid page. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2011-07-22lguest: Fix three simple typos in commentsAdrian Knoth2-2/+2
This patch fixes three typos I've accidentally spotted. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Rusty Russell <[email protected]> (one was already fixed)
2011-07-22lguest: update commentsRusty Russell9-39/+50
Also removes a long-unused #define and an extraneous semicolon. Signed-off-by: Rusty Russell <[email protected]>
2011-07-22lguest: Simplify device initialization.Rusty Russell2-34/+28
We used to notify the Host every time we updated a device's status. However, it only really needs to know when we're resetting the device, or failed to initialize it, or when we've finished our feature negotiation. In particular, we used to wait for VIRTIO_CONFIG_S_DRIVER_OK in the status byte before starting the device service threads. But this corresponds to the successful finish of device initialization, which might (like virtio_blk's partition scanning) use the device. So we had a hack, if they used the device before we expected we started the threads anyway. Now we hook into the finalize_features hook in the Guest: at that point we tell the Launcher that it can rely on the features we have acked. On the Launcher side, we look at the status at that point, and start servicing the device. Signed-off-by: Rusty Russell <[email protected]>
2011-07-22lguest: don't rewrite vmcall instructionsRusty Russell2-81/+2
Now we no longer use vmcall, we don't need to rewrite it in the Guest. Signed-off-by: Rusty Russell <[email protected]>
2011-07-22lguest: remove remaining vmcallRusty Russell1-6/+2
We switch back from using vmcall in 091ebf07a2408f9a56634caa0f86d9360e9af23b because it was unreliable under kvm, but I missed one (rarely-used) place. Signed-off-by: Rusty Russell <[email protected]>
2011-07-22lguest: use a special 1:1 linear pagetable mode until first switch.Rusty Russell6-205/+98
The Host used to create some page tables for the Guest to use at the top of Guest memory; it would then tell the Guest where this was. In particular, it created linear mappings for 0 and 0xC0000000 addresses because lguest used to switch to its real page tables quite late in boot. However, since d50d8fe19 Linux initialized boot page tables in head_32.S even before the "are we lguest?" boot jump. So, now we can simplify things: the Host pagetable code assumes 1:1 linear mapping until it first calls the LHCALL_NEW_PGTABLE hypercall, which we now do before we reach C code. This also means that the Host doesn't need to know anything about the Guest's PAGE_OFFSET. (Non-Linux guests might not even have such a thing). Signed-off-by: Rusty Russell <[email protected]>
2011-07-22lguest: Do not exit on non-fatal errorsSakari Ailus1-4/+6
Do not exit on some non-fatal errors: - writev() fails in net_output(). The result is a lost packet or packets. - writev() fails in console_output(). The result is partially lost console output. - readv() fails in net_input(). The result is a lost packet or packets. Rather than bringing the guest down, this patch ignores e.g. an allocation failure on the host side. Example: lguest: page allocation failure. order:4, mode:0x4d0 Pid: 4045, comm: lguest Tainted: G W 2.6.36 #1 Call Trace: [<c138d614>] ? printk+0x18/0x1c [<c106a4e2>] __alloc_pages_nodemask+0x4d2/0x570 [<c1087954>] cache_alloc_refill+0x2a4/0x4d0 [<c1305149>] ? __netif_receive_skb+0x189/0x270 [<c1087c5a>] __kmalloc+0xda/0xf0 [<c12fffa5>] __alloc_skb+0x55/0x100 [<c1305519>] ? net_rx_action+0x79/0x100 [<c12fafed>] sock_alloc_send_pskb+0x18d/0x280 [<c11fda25>] ? _copy_from_user+0x35/0x130 [<c13010b6>] ? memcpy_fromiovecend+0x56/0x80 [<c12a74dc>] tun_chr_aio_write+0x1cc/0x500 [<c108a125>] do_sync_readv_writev+0x95/0xd0 [<c11fda25>] ? _copy_from_user+0x35/0x130 [<c1089fa8>] ? rw_copy_check_uvector+0x58/0x100 [<c108a7bc>] do_readv_writev+0x9c/0x1d0 [<c12a7310>] ? tun_chr_aio_write+0x0/0x500 [<c108a93a>] vfs_writev+0x4a/0x60 [<c108aa21>] sys_writev+0x41/0x80 [<c138f061>] syscall_call+0x7/0xb Mem-Info: DMA per-cpu: CPU 0: hi: 0, btch: 1 usd: 0 Normal per-cpu: CPU 0: hi: 186, btch: 31 usd: 0 HighMem per-cpu: CPU 0: hi: 186, btch: 31 usd: 0 active_anon:134651 inactive_anon:50543 isolated_anon:0 active_file:96881 inactive_file:132007 isolated_file:0 unevictable:0 dirty:3 writeback:0 unstable:0 free:91374 slab_reclaimable:6300 slab_unreclaimable:2802 mapped:2281 shmem:9 pagetables:330 bounce:0 DMA free:3524kB min:64kB low:80kB high:96kB active_anon:0kB inactive_anon:8kB active_file:8760kB inactive_file:2760kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15868kB mlocked:0kB dirty:0kB writeback:0kB mapped:16kB shmem:0kB slab_reclaimable:88kB slab_unreclaimable:148kB kernel_stack:40kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 865 2016 2016 Normal free:150100kB min:3728kB low:4660kB high:5592kB active_anon:6224kB inactive_anon:15772kB active_file:324084kB inactive_file:325944kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:885944kB mlocked:0kB dirty:12kB writeback:0kB mapped:1520kB shmem:0kB slab_reclaimable:25112kB slab_unreclaimable:11060kB kernel_stack:1888kB pagetables:1320kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 9207 9207 HighMem free:211872kB min:512kB low:1752kB high:2992kB active_anon:532380kB inactive_anon:186392kB active_file:54680kB inactive_file:199324kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:1178504kB mlocked:0kB dirty:0kB writeback:0kB mapped:7588kB shmem:36kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0 DMA: 3*4kB 65*8kB 35*16kB 18*32kB 11*64kB 9*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 3524kB Normal: 35981*4kB 344*8kB 158*16kB 28*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 150100kB HighMem: 5732*4kB 5462*8kB 2826*16kB 1598*32kB 84*64kB 10*128kB 7*256kB 1*512kB 1*1024kB 1*2048kB 9*4096kB = 211872kB 231237 total pagecache pages 2340 pages in swap cache Swap cache stats: add 160060, delete 157720, find 189017/194106 Free swap = 4179840kB Total swap = 4194300kB 524271 pages RAM 296946 pages HighMem 5668 pages reserved 867664 pages shared 82155 pages non-shared Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2011-07-21netxen: add fw version compatibility checkAmit Kumar Salecha3-13/+68
o Minimum fw version supported for P3 chip is 4.0.505 o File Fw > 4.0.554 is not supported if flash fw < 4.0.554. o In mn firmware case, file fw older than flash fw is allowed. o Change variable names for readability o Update driver version 4.0.76 Signed-off-by: Amit Kumar Salecha <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-21be2net: request native mode each time the card is resetSathya Perla3-4/+6
Currently be3-native mode is requested only in probe(). It must be requested, each time the card is reset either after an EEH error or after sleep/hibernation. Also, the be_cmd_check_native_mode() is better named be_cmd_req_native_mode() Signed-off-by: Sathya Perla <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-21ipv4: Constrain UFO fragment sizes to multiples of 8 bytesBill Sommerfeld1-3/+3
Because the ip fragment offset field counts 8-byte chunks, ip fragments other than the last must contain a multiple of 8 bytes of payload. ip_ufo_append_data wasn't respecting this constraint and, depending on the MTU and ip option sizes, could create malformed non-final fragments. Google-Bug-Id: 5009328 Signed-off-by: Bill Sommerfeld <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-21virtio_net: Fix panic in virtnet_removeKrishna Kumar1-9/+1
Fix a panic in virtnet_remove. unregister_netdev has already freed up the netdev (and virtnet_info) due to dev->destructor being set, while virtnet_info is still required. Remove virtnet_free altogether, and move the freeing of the per-cpu statistics from virtnet_free to virtnet_remove. Tested patch below. Signed-off-by: Krishna Kumar <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-21ipv6: make fragment identifications less predictableEric Dumazet7-22/+64
IPv6 fragment identification generation is way beyond what we use for IPv4 : It uses a single generator. Its not scalable and allows DOS attacks. Now inetpeer is IPv6 aware, we can use it to provide a more secure and scalable frag ident generator (per destination, instead of system wide) This patch : 1) defines a new secure_ipv6_id() helper 2) extends inet_getid() to provide 32bit results 3) extends ipv6_select_ident() with a new dest parameter Reported-by: Fernando Gont <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-21ipv6: unshare inetpeersEric Dumazet1-13/+20
We currently cow metrics a bit too soon in IPv6 case : All routes are tied to a single inetpeer entry. Change ip6_rt_copy() to get destination address as second argument, so that we fill rt6i_dst before the dst_copy_metrics() call. icmp6_dst_alloc() must set rt6i_dst before calling dst_metric_set(), or else the cow is done while rt6i_dst is still NULL. If orig route points to readonly metrics, we can share the pointer instead of performing the memory allocation and copy. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-21can: make function can_get_bittiming staticThadeu Lima de Souza Cascardo1-1/+1
The function can_get_bittiming is not used anywhere else, so it should be static. Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-21net: Kobj and queues_kset should be used when CONFIG_XPS is enabledChoi, Jong-Hwan1-2/+2
Kobj and queues_kset are used with CONFIG_XPS=y. Signed-off-by: Choi, Jong-Hwan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-21vmxnet3: fix publicity of NETIF_F_HIGHDMAShreyas Bhatewara1-1/+1
NETIF_F_HIGHDMA is being disabled even when dma64 is true. This patch fixes it. CC: Michal Miroslaw <[email protected]> Signed-off-by: Shreyas N Bhatewara <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-07-21vmxnet3: set netdev parant device before calling netdev_infoShreyas Bhatewara1-1/+1
Parent device for netdev should be set before netdev_info() can be called otherwise there is a NULL pointer dereference and probe() fails. Signed-off-by: Shreyas N Bhatewara <[email protected]> Signed-off-by: Scott J. Goldman <[email protected]>-- Signed-off-by: David S. Miller <[email protected]>