id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
c31f8830f0dfd31e7e196b85ca1b39aef8b77d57
Analyze and fix the following issue in the Linux kernel code: Btrfs: online shrinking fixes
Problem Details: While shrinking the FS, the allocation functions need to make sure they don't try to allocate bytes past the end of the FS. nodatacow needed an extra check to force cows when the existing extents are past the end of the FS. Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 660b05a4baf5..99a8b0f0d318 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -192,11 +192,13 @@ static u64 noinline find_search_start(struct btrfs_root *root, u64 start = 0; u64 end = 0; u64 cache_miss = 0; + u64 total_fs...
1372f8e609d260c2352bf74e125614eef7aee8ef
Analyze and fix the following issue in the Linux kernel code: Properly call btrfs_search_slot while shrinking
Problem Details: The shrinking code used btrfs_next_leaf to find the next item, but this does not cow the blocks it touches. This fix calls search_slot after finding the next item to do appropriate cow and balancing. Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 426a0222e12f..c390fd847a27 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -2434,7 +2434,15 @@ bg_next: break; } leaf = path->nodes[0]; - nritems = btrfs_header_nritems(leaf); + btrfs_item_key_to_cpu(leaf, &f...
73e48b277a3fcd647f1936c71aea2f8d450ecc74
Analyze and fix the following issue in the Linux kernel code: Btrfs: Properly handle overlapping extent in shrink_extent_tree
Problem Details: The patch fixes the overlapping extent issue in shrink_extent_tree. It checks whether there is an overlapping extent by using find_previous_extent. If there is an overlapping extent, it setups key.objectid and cur_byte properly. --- Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index cc89df4493ab..426a0222e12f 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -2317,36 +2317,6 @@ out: return ret; } -static int find_overlapping_extent(struct btrfs_root *root, - struct btrfs_path *path, u64 new_size...
5b92ee7204a5fb6542b204831202adbc1a7a851a
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix lock ordering of the snapshot semaphore against the page lock
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index c9ebd4fe8f7e..e862292bdfc6 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -251,7 +251,6 @@ static int noinline dirty_and_release_pages(struct btrfs_trans_handle *trans, num_bytes = (write_bytes + pos - start_pos + root->sectorsize - 1) & ~((u6...
f9ef6604ace23a6fcd698e08b58a883d6009157b
Analyze and fix the following issue in the Linux kernel code: Btrfs: 32 bit compile fixes for the resizer and enospc checks
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 6137f06091e8..54f2b1d8bdfd 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -2501,6 +2501,7 @@ int btrfs_grow_extent_tree(struct btrfs_trans_handle *trans, u64 nr = 0; u64 cur_byte; u64 old_size; + unsigned long rem; s...
4313b3994d719fcdeb7e661473019ca3d62e829b
Analyze and fix the following issue in the Linux kernel code: Btrfs: Reduce stack usage in the resizer, fix 32 bit compiles
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index d6e5c19969b0..9873975ce0ee 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -386,6 +386,7 @@ struct btrfs_root { int defrag_running; int defrag_level; char *name; + int in_sysfs; }; /* diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c in...
e52ec0eb62e76ea584c8438ef92933e9b815db80
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix NULL block groups on reading the inode
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index de0fb0743cf9..a421069e998b 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -1630,11 +1630,11 @@ int btrfs_alloc_extent(struct btrfs_trans_handle *trans, struct btrfs_path *path; btrfs_set_stack_extent_refs(&extent_item,...
5d4fb734b4cb89a3902d6de309af0f6f3e63fe73
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix an off by one in the extent_map prepare write code
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index 2b92f1070274..f53d8c976219 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c @@ -2270,7 +2270,7 @@ int extent_prepare_write(struct extent_map_tree *tree, kunmap_atomic(kaddr, KM_USER0); } if ((em->block_start != EXTENT_MAP_H...
879c1cfc3104b632dea85d07490f1b55e54275a9
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix nodatacow extent lookup
Problem Details: Yan Zheng noticed the offset into the extent was incorrectly being added to the extent start before trying to find it in the extent allocation tree. Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 55b2e1426024..1c61c85dc3d8 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -177,7 +177,6 @@ again: if (bytenr == 0) goto not_found; - bytenr += btrfs_file_extent_offset(leaf, item); if (btrfs_count_snapshots_in_path(root, path, bytenr) ...
190662b2128dd648749e197f5563e9f6bbb5e05c
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix delayed allocation to avoid missing delalloc extents
Problem Details: find_lock_delalloc_range could exit out too early Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index 0d1e59a86e49..a0dff34dd437 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c @@ -1070,6 +1070,7 @@ u64 find_lock_delalloc_range(struct extent_map_tree *tree, search_again: node = tree_search(&tree->state, cur_start); if (!node ||...
d10c5f31c79c6a703974ae29d0a05781b828fe30
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix extent_map and extent_state leaks by flushing lrus on FS unmount
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 4338b00c2a25..278564178993 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -765,8 +765,18 @@ int close_ctree(struct btrfs_root *root) btrfs_free_block_groups(root->fs_info); del_fs_roots(fs_info); + + filemap_write_and_wait(fs_info->bt...
e9906a98497c26a3c1a7532b51b81cc1fbdf9e1d
Analyze and fix the following issue in the Linux kernel code: Fixes for loopback files in btrfs
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index a280b9562221..62fcd79d8ab3 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -861,6 +861,7 @@ struct file_operations btrfs_file_operations = { .llseek = generic_file_llseek, .read = do_sync_read, .aio_read = generic_file_aio_read, + .splice_...
6e3b96668eb34da6060a5189e6a73e9d62a3b178
Analyze and fix the following issue in the Linux kernel code: Off by one fix for btrfs_drop_extents
Problem Details: One of my old patches introduces a new bug to btrfs_drop_extents(changeset 275). Inline extents are not truncated properly when "extent_end == end", it can trigger the BUG_ON at file.c:600. I hope I don't introduce new bug this time. --- Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 1cc4d285951c..a280b9562221 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -481,8 +481,9 @@ next_slot: search_start = (extent_end + mask) & ~mask; } else search_start = extent_end; - if (end < extent_end && start > key.offset && found_inline...
6caab489c5866788ae64a72986520b1f0e40c706
Analyze and fix the following issue in the Linux kernel code: Fix btrfs_inc_ref to add backref hints
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 7c953b2ecf15..057cdd49c09b 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -702,7 +702,7 @@ int btrfs_inc_root_ref(struct btrfs_trans_handle *trans, } return btrfs_inc_extent_ref(trans, root, root->node->start, r...
7a7205367dfd9adf129f0ebc7d040a557fe0d1ba
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix typo in .. check (thanks Yan)
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 06d92be16805..41b0c7de7a59 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -857,7 +857,7 @@ static int btrfs_inode_by_name(struct inode *dir, struct dentry *dentry, path = btrfs_alloc_path(); BUG_ON(!path); - if (namelen == 1 && strcmp(name, "...
17636e03f42a1a42fed3834859de4702bd655fd1
Analyze and fix the following issue in the Linux kernel code: Btrfs: section mismatch warnings
Problem Details: --Boundary-00=_CcOWHFYK4T+JwSj Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello everybody, compiling btrfs into the kernel results in section mismatch warnings. __exit functions are called where they are not allowed to. The attached pa...
```diff diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index 06e437723dc3..8326a18413ff 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c @@ -69,7 +69,7 @@ free_map_cache: return -ENOMEM; } -void __exit extent_map_exit(void) +void extent_map_exit(void) { struct extent_state *state; di...
9691975dd663b255fa52404dc7de4b18892bf244
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix buffer get/release issue in create_snapshot
Problem Details: btrfs_cow_block expects a reference to be held on the buffer being cow'd. Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 37f8e0321af8..d0af0807d9f8 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -2034,11 +2034,11 @@ static int create_snapshot(struct btrfs_root *root, char *name, int namelen) key.objectid = objectid; key.offset = 1; btrfs_set_key_type(&key, BTRF...
1a2b2ac78a4151a49267a1e3f48a131f5810814e
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix extent allocation for btree blocks as the disk fills
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 91397e989393..8ab4954f6ad0 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -172,9 +172,7 @@ static u64 find_search_start(struct btrfs_root *root, int wrapped = 0; if (!cache) { - cache = btrfs_lookup_block_group(root->...
3acd7ee876c508973eb4722de5b00b3dff4c7372
Analyze and fix the following issue in the Linux kernel code: Btrfs: xattr fixes
Problem Details: This fixes two typos that Yan pointed out to me. Thanks much, Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/xattr.c b/fs/btrfs/xattr.c index 984616cca254..33caaf5b4b0c 100644 --- a/fs/btrfs/xattr.c +++ b/fs/btrfs/xattr.c @@ -180,7 +180,7 @@ ssize_t btrfs_xattr_get(struct inode *inode, int name_index, data_ptr = (unsigned long)((char *)(di + 1) + btrfs_dir_name_len(leaf, di)); read_ex...
5cf664263b05beb080bf95037e4c3bd50c80b096
Analyze and fix the following issue in the Linux kernel code: Btrfs: Off by one fixes for extent-tree.c
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index e5340677d6c4..6a7a9ba75fd9 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -150,12 +150,9 @@ struct btrfs_block_group_cache *btrfs_lookup_block_group(struct return NULL; block_group = (struct btrfs_block_group_cache *)...
0591fb56fb732c7bf500d1446d0bf927046d7002
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix extent bit range testing
Problem Details: It could return the bit as set when there was actually a hole at the very end of the range. Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index 0077c6c1d9f9..b3ff63c4bf2a 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c @@ -96,7 +96,7 @@ void extent_map_tree_empty_lru(struct extent_map_tree *tree) while(!list_empty(&tree->buffer_lru)) { eb = list_entry(tree->buffer_lru....
09be207d1ba224531a61de9afdc07a125e45318c
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix failure cleanups when allocating extent buffers fail
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index b0677c84bb75..c976615dcda3 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c @@ -2106,25 +2106,17 @@ static struct extent_buffer *__alloc_extent_buffer(struct extent_map_tree *tree, spin_lock(&tree->lru_lock); eb = find_lru(tree...
e644d021e328d3902559e5db687383f2da85993c
Analyze and fix the following issue in the Linux kernel code: Fix recursive KM_USER1 usage in btrfs_realloc_node
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index f7907b02fa77..030d21d7f98c 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -557,14 +557,9 @@ static inline unsigned long btrfs_node_key_ptr_offset(int nr) sizeof(struct btrfs_key_ptr) * nr; } -static inline void btrfs_node_key(struct extent_bu...
a273208edd55463b3bcd8b77a6fe8ba54afc6940
Analyze and fix the following issue in the Linux kernel code: Fix EXTENT_MAP_INLINE off by one in btrfs_drop_extents
Problem Details: Don't set hint_byte to EXTENT_MAP_INLINE when 'end == extent_end' or 'start == key.offset' . The inline extent will be truncated in these cases. Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index bb98f52f4ea4..5ceaed25dce1 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -475,8 +475,7 @@ next_slot: search_start = (extent_end + mask) & ~mask; } else search_start = extent_end; - - if (end <= extent_end && start >= key.offset && found_in...
dcfec0dcb1b1a037fb26177789e8f108bc429cb3
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix u32 overflow in dirty_and_release_pages.
Problem Details: When calculating the size of inline extent, inode->i_size should also be take into consideration, otherwise sys_write may drop some data silently. You can test this bug by: #dd if=/dev/zero bs=4k count=1 of=test_file #dd if=/dev/zero bs=2k count=1 of=test_file conv=notrunc Signed-off-by: Chris Maso...
```diff diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 4e52f7ec1cbe..bb98f52f4ea4 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -239,9 +239,8 @@ static int dirty_and_release_pages(struct btrfs_trans_handle *trans, u64 start_pos; u64 end_of_last_block; u64 end_pos = pos + write_bytes; - u32 inline_si...
944746ec7575258475958d858cdf3a0e4c8f7b9e
Analyze and fix the following issue in the Linux kernel code: Btrfs: small fixes for find_lock_delalloc_range.
Problem Details: There is a 'finish_wait', but no 'prepare_to_wait' . So I think that the 'prepare_to_wait' is missing. The second change is according to the name of variable. Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index 44be9cfd30ee..ff8881fb56d6 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c @@ -1044,6 +1044,8 @@ search_again: if (state->state & EXTENT_LOCKED) { DEFINE_WAIT(wait); atomic_inc(&state->refs); + prepare_to_wait(&stat...
b97f9203b4d672c06eca50a1b1b99e4f69e1daf8
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix typo and memory leak in extent-tree.c
Problem Details: This patch fixes a typo in update_block_group and memory leak in btrfs_free_block_groups. Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 7de7707d939c..e7192ea8f96c 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -588,16 +588,15 @@ static int update_block_group(struct btrfs_trans_handle *trans, old_val < (cache->key.offset >> 1)) { int bit_to_clear...
179e29e488cc74f1e9bd67bc45f70b832740e9ec
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix a number of inline extent problems that Yan Zheng reported.
Problem Details: The fixes do a number of things: 1) Most btrfs_drop_extent callers will try to leave the inline extents in place. It can truncate bytes off the beginning of the inline extent if required. 2) writepage can now update the inline extent, allowing mmap writes to go directly into the inline extent. 3) b...
```diff diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 516b90224a1b..eef9c92f86d5 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -1930,7 +1930,7 @@ again: int btrfs_truncate_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, - u32 new_size) + u32 new_s...
35ebb934bd7fcc7ca991b155b7980c3c4ff9f1a5
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix PAGE_CACHE_SHIFT shifts on 32 bit machines
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 5a7e60d7f443..8935eec31ee2 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -159,7 +159,7 @@ static int csum_tree_block(struct btrfs_root *root, struct extent_buffer *buf, int csum_dirty_buffer(struct btrfs_root *root, struct page *page) { ...
b56baf5bedccd3258643b09289f17ceab3ddea52
Analyze and fix the following issue in the Linux kernel code: Minor fix for btrfs_csum_file_block.
Problem Details: Execution should goto label 'insert' when 'btrfs_next_leaf' return a non-zero value, otherwise the parameter 'slot' for 'btrfs_item_key_to_cpu' may be out of bounds. The original codes jump to label 'insert' only when 'btrfs_next_leaf' return a negative value. Signed-off-by: Chris Mason <chris.mason@...
```diff diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index 482a2b615327..7eb9a5412e2f 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c @@ -178,13 +178,11 @@ int btrfs_csum_file_block(struct btrfs_trans_handle *trans, nritems = btrfs_header_nritems(path->nodes[0]); if (path->slots[0] >= nri...
689f9346612d96ab93890160cf2fe0df5217ab73
Analyze and fix the following issue in the Linux kernel code: Fix inline extent handling in btrfs_get_extent
Problem Details: 1. Reorder kmap and the test for 'page != NULL' 2. Zero-fill rest area of a block when inline extent isn't big enough. 3. Do not insert extent_map into the map tree when page == NULL. (If insert the extent_map into the map tree, subsequent read requests will find it in the map tree directly and th...
```diff diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index c88f13a88555..0ba1cdbdf112 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -1596,8 +1596,7 @@ again: size = btrfs_file_extent_inline_len(leaf, btrfs_item_nr(leaf, path->slots[0])); - - extent_end = (extent_start + size) | + extent_...
c67cda1758130f3e437744c4c2ec4a7cc25564e3
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix extent_map leak in extent_bmap
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index c44989a1e520..e4ee980cc138 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c @@ -1924,6 +1924,7 @@ sector_t extent_bmap(struct address_space *mapping, sector_t iblock, struct inode *inode = mapping->host; u64 start = iblock << ino...
44ec0b7179b9bce7df1080370f51314a24a00216
Analyze and fix the following issue in the Linux kernel code: Btrfs: Compile fixes for 2.6.24-rc1
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 7e4b2c1b4a56..c88f13a88555 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -2176,8 +2176,12 @@ void btrfs_destroy_inode(struct inode *inode) kmem_cache_free(btrfs_inode_cachep, BTRFS_I(inode)); } +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)...
134d45120164141c0847daf5222aaec77e04724a
Analyze and fix the following issue in the Linux kernel code: Fix ENOTEMPTY check in btrfs_rmdir
Problem Details: The ENOTEMPTY check in btrfs_rmdir isn't reliable. It's possible that the backward search finds . or .. at first, then some other directory entry. In that case, btrfs_rmdir delete . or .. improperly. The patch also fixes a fs_mutex unlock issue in btrfs_rmdir. -- Signed-off-by: Chris Mason <chris....
```diff diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index b74a831fab19..7e4b2c1b4a56 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -448,6 +448,9 @@ static int btrfs_rmdir(struct inode *dir, struct dentry *dentry) char *goodnames = ".."; unsigned long nr; + if (inode->i_size > BTRFS_EMPTY_DIR_SIZE) ...
18f16f7ba62a01c29e09b40ac6ad6d92a8955859
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix for insert_inline_extent to handle offset != 0
Problem Details: This modifies inline extent size calculation, so that insert_inline_extent can handle the case that parameter 'offset' is not zero; it also a few codes to zero uninitialized area in inline extent. Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 96df1b10cb60..9260d3478aad 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -108,7 +108,6 @@ static int insert_inline_extent(struct btrfs_trans_handle *trans, key.objectid = inode->i_ino; key.offset = offset; btrfs_set_key_type(&key, BTRFS_EXTENT_D...
cc0c55384796b422133ff1f21646835b31590f88
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix split_leaf to detect when it is extending an item
Problem Details: When making room for a new item, it is ok to create an empty leaf, but when making room to extend an item, split_leaf needs to make sure it keeps the item we're extending in the path and make sure we don't end up with an empty leaf. Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 53e40b5c084d..3eb5a9f30d14 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -26,7 +26,7 @@ static int split_node(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, int level); static int split_leaf(struct bt...
65555a06b4d1ae116ce223dc4b82d6068b36df96
Analyze and fix the following issue in the Linux kernel code: Btrfs: Off by one fixes in extent_map.c
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index a61379230dd2..c44989a1e520 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c @@ -2045,7 +2045,7 @@ struct extent_buffer *alloc_extent_buffer(struct extent_map_tree *tree, struct extent_buffer *eb; struct page *p; struct address_...
5ee78ac70f6c01f2a5acf662c2af975665710edc
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix split_leaf to avoid incorrect double splits
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index e8466940fa30..53e40b5c084d 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -1865,7 +1865,11 @@ static int split_leaf(struct btrfs_trans_handle *trans, struct btrfs_root return ret; } mid = slot; - double_split = 1; + if (mid != nrit...
59d169e2b3d69ba0beca0fa0936789080c8d61a9
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix read/write_extent_buffer to use KM_USER1 instead of KM_USER0
Problem Details: This avoids recursive use of KM_USER0 during btrfs_file_write Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index c0f834563ced..3c81f5eab155 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c @@ -2378,9 +2378,9 @@ void read_extent_buffer(struct extent_buffer *eb, void *dstv, WARN_ON(!PageUptodate(page)); cur = min(len, (PAGE_CACHE_SIZE - o...
0a2118dfd4c328e8823cdcfebf839dff73ac21e9
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix bi_end_io() functions on > 2.6.23 kernels
Problem Details: It now returns void and it is never called for partial completions, so the bio->bi_size check must go. Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index 89d0ebd0ea83..c0f834563ced 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c @@ -9,6 +9,7 @@ #include <linux/spinlock.h> #include <linux/blkdev.h> #include <linux/swap.h> +#include <linux/version.h> #include "extent_map.h" /* t...
6d7231f7d33fc14f2d41abc3b9cb28dcb208735d
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix typo: owner is a 64 bit field
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 37bccb1a9a75..1d2b54150075 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -522,12 +522,12 @@ BTRFS_SETGET_FUNCS(timespec_nsec, struct btrfs_inode_timespec, nsec, 32); /* struct btrfs_extent_item */ BTRFS_SETGET_FUNCS(extent_refs, struct btrfs_e...
e19caa5f0e34b571ed0c2617554af5c43cb124d1
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix allocation routines to avoid intermixing data and metadata allocations
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 0b0c947194ae..72e6b274a450 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -165,7 +165,7 @@ static u64 find_search_start(struct btrfs_root *root, { int ret; struct btrfs_block_group_cache *cache = *cache_ret; - u64 last ...
f510cfecfc98759d75283823cfccf0cc0d59a4c6
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix extent_buffer and extent_state leaks
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 9427b79c5d79..50ef351ef6b3 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -87,6 +87,7 @@ static int __btrfs_cow_block(struct btrfs_trans_handle *trans, if (IS_ERR(cow)) return PTR_ERR(cow); + cow->alloc_addr = (unsigned long)__builtin_return...
8e1cd766643f040fd88b9c4221353a3f6b77db1e
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix double free and off by one in inode.c
Problem Details: The first change removes potential double free, the second fix a off by one error. Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 43bf4337859c..88b3ef20be69 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -206,7 +206,6 @@ void btrfs_read_locked_inode(struct inode *inode) memcpy(&location, &BTRFS_I(inode)->location, sizeof(location)); ret = btrfs_lookup_inode(NULL, root, pa...
a61721d5b771d1735415a6b4c75409ab1fc9c845
Analyze and fix the following issue in the Linux kernel code: fix found_type decrement in btrfs_truncate_in_trans
Problem Details: found_type has already been decreased by codes above the change, I think decrease it by one again doesn't make sense. Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index bd00df33fb3f..211ca32c65c5 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -581,7 +581,7 @@ static int btrfs_truncate_in_trans(struct btrfs_trans_handle *trans, } else { break; } - btrfs_set_key_type(&key, found_type - 1); + btrfs_s...
cf67582bb2ec364d71b3e4f8e49de98d8c3c832e
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix duplicate ENOSPC checks in find_free_extent
Problem Details: find_free_extent would fail to wrap around to the start of the drive because it was doing the enospc case checking twice in some cases, causing it to return -ENOSPC early. Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index fe772f9b06cf..f261a8326cdf 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -1111,20 +1111,9 @@ check_pending: btrfs_release_path(root, path); BUG_ON(ins->objectid < search_start); - if (ins->objectid + num_blocks >= sea...
399ccdc1cd4e92e541d4dacbbf18c52bd693418b
Analyze and fix the following issue in the Linux kernel code: ALSA: fix locking in snd_pcm_open*() and snd_rawmidi_open*()
Problem Details: The PCM and rawmidi open callbacks have a lock against card->controls_list but it takes a wrong one, card->controls_rwsem, instead of a right one card->ctl_files_rwlock. This patch fixes them. This change also fixes automatically the potential deadlocks due to mm->mmap_sem in munmap and copy_from/to_...
```diff diff --git a/sound/core/pcm.c b/sound/core/pcm.c index 9dd9bc73fe1d..ece25c718e95 100644 --- a/sound/core/pcm.c +++ b/sound/core/pcm.c @@ -781,7 +781,7 @@ int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream, return -ENODEV; card = pcm->card; - down_read(&card->controls_rwsem); + read_lock(&card-...
ecef533ea68b2fb3baaf459beb2f802a240bdb16
Analyze and fix the following issue in the Linux kernel code: revert "x86: make GART to respect device's dma_mask about virtual mappings"
Problem Details: This reverts: commit bee44f294efd8417f5e68553778a6cc957af1547 Author: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Date: Fri Sep 12 19:42:35 2008 +0900 x86: make GART to respect device's dma_mask about virtual mappings I wrote the above commit to fix a GART alloc_coherent regression, that c...
```diff diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c index 9e390f1bd46a..7e08e466b8ad 100644 --- a/arch/x86/kernel/pci-gart_64.c +++ b/arch/x86/kernel/pci-gart_64.c @@ -83,34 +83,23 @@ static unsigned long next_bit; /* protected by iommu_bitmap_lock */ static int need_flush; /* global f...
fec12a62d74dc93a36c9ce1c3bce9ba045e44846
Analyze and fix the following issue in the Linux kernel code: Documentation: fix the now deprecated reference to {set,reset}_scoop_gpio
Problem Details: Due to recent patches removing the now deprecated references to {set,reset}_scoop_gpio() and converting them to the generic GPIO API, the references in the documentation also need to be fixed. Signed-off-by: Eric Miao <eric.miao@marvell.com> Cc: Liam Girdwood <lrg@kernel.org> Signed-off-by: Russell Ki...
```diff diff --git a/Documentation/sound/alsa/soc/dapm.txt b/Documentation/sound/alsa/soc/dapm.txt index b2ed6983f40d..46f9684d0b29 100644 --- a/Documentation/sound/alsa/soc/dapm.txt +++ b/Documentation/sound/alsa/soc/dapm.txt @@ -135,11 +135,7 @@ when the Mic is inserted:- static int spitz_mic_bias(struct snd_soc_d...
b22596726bd37c7a4df4a43406a9a60f617d3d02
Analyze and fix the following issue in the Linux kernel code: drivers/net/bonding: sparse fixes for exported tables
Problem Details: The following sparse warnings are being generated because bonding.h is missing definitons for items declared in bond_main.c but also used in bond_sysfs.h Also export bond_dev_list as this is also declared in bond_main but used elsewhere in drivers/net/bonding. bond_main.c:105:20: warning: symbol 'bon...
```diff diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index f7b40edabfd8..ffb668dd6d3b 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h @@ -333,5 +333,13 @@ void bond_change_active_slave(struct bonding *bond, struct slave *new_active); void bond_register_arp(s...
1545e205db6e797861d644e3459339109f7573ff
Analyze and fix the following issue in the Linux kernel code: forcedeth fix: take phy out of reset during power up
Problem Details: This patch will add the phy reset bit into the power up mask which is used during power up. Certain BIOSes will place the phy in reset and therefore the driver must take the phy out of reset when it loads. Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com...
```diff diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 0b6ecef9a849..35e582d3fd2a 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c @@ -337,7 +337,7 @@ enum { NvRegMSIXIrqStatus = 0x3f0, NvRegPowerState2 = 0x600, -#define NVREG_POWERSTATE2_POWERUP_MASK 0x0F11 +#define NVREG...
6c2a9efadec464f848b18216e41783d3c01c7d10
Analyze and fix the following issue in the Linux kernel code: e1000e: avoid duplicated output of device name in kernel warning
Problem Details: With 2.6.27-rc3 I noticed the following messages in my boot log: 0000:01:00.0: 0000:01:00.0: Warning: detected DSPD enabled in EEPROM 0000:01:00.0: eth0: (PCI Express:2.5GB/s:Width x1) 00:16:76:04:ff:09 The second seems correct, but the first has a silly repetition of the PCI device before the actual...
```diff diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 0925204cd2d8..24d05cb70055 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c @@ -4671,13 +4671,15 @@ static void e1000_eeprom_checks(struct e1000_adapter *adapter) ret_val = e1000_read_nvm(hw, NVM_INIT_CONTRO...
ac7198bb124e7007cfd48990d382678341886dba
Analyze and fix the following issue in the Linux kernel code: gianfar: free/iounmap memory after an error in mii bus initialization
Problem Details: Recent changes to MII bus initialization code added exit points which didn't free or iounmap the bus before returning. Addresses http://bugzilla.kernel.org/show_bug.cgi?id=11372. Signed-off-by: Andy Fleming <afleming@freescale.com> Reported-by: Daniel Marjamki <danielm77@spray.se> Cc: Jeff Garzik <je...
```diff diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c index 906aba2757e7..678f48c69119 100644 --- a/drivers/net/gianfar_mii.c +++ b/drivers/net/gianfar_mii.c @@ -211,19 +211,21 @@ static int gfar_mdio_probe(struct device *dev) gfar_write(&enet_regs->tbipa, 0); for (i = PHY_MAX_ADDR; i > 0; i--)...
fbb80230bf1c1dcc81339e991b172006243333e9
Analyze and fix the following issue in the Linux kernel code: ne.c: fix rmmod, platform driver improvements
Problem Details: Removing the module would cause a kernel oops as platform_driver_probe failed to detect a device and unregistered the platform driver on module init, and cleanup_module would unregister the already unregistered driver. The suspend and resume functions weren't being called. platform_driver support was ...
```diff diff --git a/drivers/net/ne.c b/drivers/net/ne.c index 79599900c4b5..eb681c0d51ba 100644 --- a/drivers/net/ne.c +++ b/drivers/net/ne.c @@ -64,6 +64,25 @@ static const char version2[] = /* Do we support clones that don't adhere to 14,15 of the SAprom ? */ #define SUPPORT_NE_BAD_CLONES +/* 0xbad = bad sig or ...
baac03d9bb7b8aa3c33a2dbf5f459ea6ce8abaf4
Analyze and fix the following issue in the Linux kernel code: gianfar: Fix error in mdio reset timeout
Problem Details: The loop with the timeout used "while (... && timeout--)", which means than when the timeout occurs, "timeout" will be -1 after the loop has exited. The code that checks if the looped exited because of a timeout used "if (timeout <= 0)". Seems ok, except timeout is unsigned, and (unsigned)-1 isn't l...
```diff diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c index ebcfb27a904e..906aba2757e7 100644 --- a/drivers/net/gianfar_mii.c +++ b/drivers/net/gianfar_mii.c @@ -136,12 +136,12 @@ static int gfar_mdio_reset(struct mii_bus *bus) /* Wait until the bus is free */ while ((gfar_read(&regs->miimind...
4b75a442d2affb2ed20422054b1c640bd3b9c36a
Analyze and fix the following issue in the Linux kernel code: enic: bug fix: don't set netdev->name too early
Problem Details: Bug fix: don't set netdev->name early before netdev registration. Setting netdev->name early with dev_alloc_name() would occasionally cause netdev registration to fail returning error that device was already registered. Since we're using netdev->name to name MSI-X vectors, we now need to move the requ...
```diff diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h index 9e0d484deb20..7f677e89a788 100644 --- a/drivers/net/enic/enic.h +++ b/drivers/net/enic/enic.h @@ -33,7 +33,7 @@ #define DRV_NAME "enic" #define DRV_DESCRIPTION "Cisco 10G Ethernet Driver" -#define DRV_VERSION "0.0.1.18163.472" +#define ...
8f4d248cb7c1873275608f267e525e08bcbd543b
Analyze and fix the following issue in the Linux kernel code: enic: Bug fix: Free MSI intr with correct data handle
Problem Details: Bug fix: Free MSI intr with correct data handle Use davem proposed naming for MSI-X tx/rx vectors (ethX-tx-0, ethX-rx-0) Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 03b646a5aec8..d403ce29a141 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -1133,9 +1133,11 @@ static void enic_free_intr(struct enic *enic) switch (vnic_dev_get_intr_mode(enic->vdev)) { case VNI...
25f0a061d9e491c4b17976065443271e2ddd383f
Analyze and fix the following issue in the Linux kernel code: enic: fixes for review items from Ben Hutchings
Problem Details: Fixes for review items from Ben Hutchings: - use netdev->net_stats rather than private net_stats - use ethtool op .get_sset_count rather than .get_stats_count - err out if setting Tx/Rx csum or TSO using ethtool and setting is not enabled for device. - pass in jiffies + constant to round_jiffies...
```diff diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h index fb83c926da58..9e0d484deb20 100644 --- a/drivers/net/enic/enic.h +++ b/drivers/net/enic/enic.h @@ -75,7 +75,6 @@ struct enic { struct vnic_enet_config config; struct vnic_dev_bar bar0; struct vnic_dev *vdev; - struct net_device_stats net_...
3b060be0582373be3c380629d7a6de5f06a311ed
Analyze and fix the following issue in the Linux kernel code: r6040: fix wrong assignment in r6040_free_txbufs
Problem Details: This patch fixes a wrong assignment in r6040_free_txbufs on a receive skb pointer while we should actually do this on the transmit skb pointer. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c index 025f526558bc..34fe7ef8e5ed 100644 --- a/drivers/net/r6040.c +++ b/drivers/net/r6040.c @@ -265,7 +265,7 @@ static void r6040_free_txbufs(struct net_device *dev) le32_to_cpu(lp->tx_insert_ptr->buf), MAX_BUF_SIZE, PCI_DMA_TODEVICE); dev_kfr...
5050015597efb5e52a0b21e30a8adb2f7d7b7fba
Analyze and fix the following issue in the Linux kernel code: sundance: set carrier status on link change events
Problem Details: Check if the link is available when a changed interrupt has been received and set the carrier status appropriately. The code is copied nearly verbatim from the dl2k module. The link status could be used in more places in the driver, but this is enough to get the carrier status reported to userspace. ...
```diff diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c index 7d5561b8241c..f860ea150395 100644 --- a/drivers/net/sundance.c +++ b/drivers/net/sundance.c @@ -409,6 +409,7 @@ static int change_mtu(struct net_device *dev, int new_mtu); static int eeprom_read(void __iomem *ioaddr, int location); static in...
2eefbd63d0c85daa1317636474c226e236beba81
Analyze and fix the following issue in the Linux kernel code: ehea: fix mutex and spinlock use
Problem Details: Looks like to me that the ehea_fw_handles.lock mutex and the ehea_bcmc_regs.lock spinlock are taken much longer than necessary and could as well be pushed inside the functions that need them (ehea_update_firmware_handles() and ehea_update_bcmc_registrations()) rather than at each callsite. Signed-off-...
```diff diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index b70c5314f537..c765ec609462 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c @@ -219,9 +219,11 @@ static void ehea_update_firmware_handles(void) } out_update: + mutex_lock(&ehea_fw_handles.lock); kfr...
d100ba33f8d2c4dbb53b05f5ac49c39a0dd9dd76
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix DCA dependency in Kconfig
Problem Details: ixgbe can depend on dca IF it is enabled. So if we are compiled as IXGBE=y, and DCA is enabled, then we must force INTEL_IOATDMA and therefore DCA to be =y also. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff ...
```diff diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 69c81da48ebc..c25f0d6817a2 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -2411,6 +2411,7 @@ config IXGBE tristate "Intel(R) 10GbE PCI Express adapters support" depends on PCI && INET select INET_LRO + select INTEL_IOATDMA ---he...
c431f97ef96026e6da7032a871a0789cf5a2eaea
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix ring reallocation in ethtool
Problem Details: changing ring sizes in ethtool needs to be robust. If an allocation fails the driver must continue operation, with the previous settings. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.c...
```diff diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h index 71ddac6ac4f4..27db64f5c860 100644 --- a/drivers/net/ixgbe/ixgbe.h +++ b/drivers/net/ixgbe/ixgbe.h @@ -336,5 +336,9 @@ extern int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter, struct ixgbe_ring *rxdr); extern int ixgbe_s...
ff819cfb5d95c4945811f5e33aa57274885c7527
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix bug with lots of tx queues
Problem Details: when using more than 8 tx queues you can overrun the 8 bit v_idx field, so change it to 16 bits to represent the maximum number of queues (one for each bit) Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik...
```diff diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h index 5ba03845c3e3..064af675a941 100644 --- a/drivers/net/ixgbe/ixgbe.h +++ b/drivers/net/ixgbe/ixgbe.h @@ -152,9 +152,9 @@ struct ixgbe_ring { struct net_lro_mgr lro_mgr; bool lro_used; struct ixgbe_queue_stats stats; - u8 v_idx; /* maps ...
30efa5a363d18f1c284455879cb67fb1bf547bdc
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix initial interrupt throttle settings
Problem Details: ixgbe was incorrectly setting the throttle rate setting for all tx queues and the driver has been refreshed to better handle a dynamic interrupt mode as well as multiple queues. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h index 2b827a67c9c5..5ba03845c3e3 100644 --- a/drivers/net/ixgbe/ixgbe.h +++ b/drivers/net/ixgbe/ixgbe.h @@ -62,11 +62,6 @@ #define IXGBE_MAX_RXQ 1 #define IXGBE_MIN_RXQ 1 -#define IXGBE_DEFAULT_ITR_RX_USECS 125 /* 8k irqs/...
3d3d6d3cc2ad1e77516f3ad3f79d5988ebc361cf
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix ethtool disable csum for ipv6
Problem Details: ethtool was not disabling the correct netif flags when setting checksum disable. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index 64460b4c50ca..2506f9eae58e 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c @@ -241,7 +241,7 @@ static int ixgbe_set_tx_csum(struct net_device *netdev, u32 data) if (data) netdev->...
05857980cf15d96dd9eb47dd444b0634f436ba34
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix pci_resource allocation as in other drivers
Problem Details: Form: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 2c8895e9daed..0269115593e3 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -3605,7 +3605,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, struct ixgbe_adapter *adapter = NULL; st...
98c00a1c5de23295aebe7e46a61d85e05ee82855
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix ethtool register dump
Problem Details: 1) reading some of the registers in our hardware causes them to clear, so don't read ICR in the ethtool register dump function. 2) several register iterators were not iterating Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed...
```diff diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index 8f0e3f93e6b1..64460b4c50ca 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c @@ -315,7 +315,9 @@ static void ixgbe_get_regs(struct net_device *netdev, regs_buff[17] = IXGBE_READ_REG(hw...
f47cf66e9cc778d21533c681e89b4034ed2d8666
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix bug with shared interrupts
Problem Details: fix ixgbe bug reported with shared legacy interrupts Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 11bf86b93622..cfaa3ca28f51 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -1245,8 +1245,13 @@ static irqreturn_t ixgbe_intr(int irq, void *data) /* for NAPI, using EIAM to auto-mask tx/rx in...
cf8280ee7be3aaf44d32e389f15c725b850e5e32
Analyze and fix the following issue in the Linux kernel code: ixgbe: Update watchdog thread to accomodate longerlink_up events
Problem Details: This patch updates the link_up code and watchdog thread so that link_up doesn't cause stack overflows due to long waits in interrupt context. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher ...
```diff diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h index 90b53830196c..2b827a67c9c5 100644 --- a/drivers/net/ixgbe/ixgbe.h +++ b/drivers/net/ixgbe/ixgbe.h @@ -309,6 +309,12 @@ struct ixgbe_adapter { u64 lro_aggregated; u64 lro_flushed; u64 lro_no_desc; + + u32 link_speed; + bool link_up; +...
ce94bf469edf84228771b58489944cf654aeb496
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix multicast address update
Problem Details: after the most recent patches, the driver was not using the correct iterator for updating the receive address registers (RAR) Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c index 9c0d0a1964eb..f5b2617111aa 100644 --- a/drivers/net/ixgbe/ixgbe_common.c +++ b/drivers/net/ixgbe/ixgbe_common.c @@ -896,6 +896,7 @@ static void ixgbe_set_mta(struct ixgbe_hw *hw, u8 *mc_addr) static void ixgbe_add_mc_addr(st...
a1f96ee7cce0dce583ff2f32de6376495ef51e4d
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix dca defines to not have spaces
Problem Details: Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index c67211c91cb6..904819586e2a 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -80,7 +80,7 @@ static struct pci_device_id ixgbe_pci_tbl[] = { }; MODULE_DEVICE_TABLE(pci, ixgbe_pci_tbl); -#if de...
af72166f31662850e10d1d1c734654efb2ae4357
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix bug where using wake queue instead of start
Problem Details: Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 362541aa946e..c67211c91cb6 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -3377,7 +3377,7 @@ static int __ixgbe_maybe_stop_tx(struct net_device *netdev, return -EBUSY; /* A reprieve! - ...
7fb614bcc7136875c436a8866072fae23bbd2a0c
Analyze and fix the following issue in the Linux kernel code: smc911x: remove duplicate debug printout
Problem Details: Remove duplicated debug printout. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index c5871624f972..e15abc3606cd 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c @@ -1174,8 +1174,6 @@ static irqreturn_t smc911x_interrupt(int irq, void *dev_id) spin_unlock_irqrestore(&lp->lock, flags); - DBG(3, "%s: Interrupt don...
c1d69937ee5818bcde3bed8c012c9f07d60e492e
Analyze and fix the following issue in the Linux kernel code: r6040: fix bad usage of udelay
Problem Details: This patch fixes the bad usage of udelay(5000), which in turns is a mdelay(5). It causes compilation for ARM where udelay maximum value is checked. Reported-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu> Signed-off-by: Jeff Garzik <jgarzik@redhat...
```diff diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c index 5d86281d9363..025f526558bc 100644 --- a/drivers/net/r6040.c +++ b/drivers/net/r6040.c @@ -370,7 +370,7 @@ static void r6040_init_mac_regs(struct net_device *dev) /* Reset internal state machine */ iowrite16(2, ioaddr + MAC_SM); iowrite16(0, ioad...
31b760202a0911384fa07796df9d1905e9e89a7f
Analyze and fix the following issue in the Linux kernel code: sfc: Fix type of FALCON_SPI_MAX_LEN
Problem Details: FALCON_SPI_MAX_LEN has type size_t while other SPI lengths have type unsigned int. This results in warnings from min() on 64-bit architectures where they are different. Add a cast to make it match. From: Steve Hodgson <shodgson@solarflare.com> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>...
```diff diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c index d30c938d0fbf..31ed1f49de00 100644 --- a/drivers/net/sfc/falcon.c +++ b/drivers/net/sfc/falcon.c @@ -1605,7 +1605,7 @@ void falcon_fini_interrupt(struct efx_nic *efx) *************************************************************************...
6bc5d3a9334401d788e1adf8b71add211265bc8b
Analyze and fix the following issue in the Linux kernel code: sfc: Make queue flushes more reliable
Problem Details: Increase the potential retry count for RX flushes from 5 to 100. Stop polling the RX_DESC_PTR_TBL to infer that a flush might have happened. Instead absolutely rely on the flush events, unless bug 7803 applies (Falcon rev A only). To keep things quick, request flushes for every TX and RX queue up fro...
```diff diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c index f65e313c2be2..06ea71c7e34e 100644 --- a/drivers/net/sfc/efx.c +++ b/drivers/net/sfc/efx.c @@ -445,10 +445,17 @@ static void efx_fini_channels(struct efx_nic *efx) struct efx_channel *channel; struct efx_tx_queue *tx_queue; struct efx_rx_queu...
ef08af03ef85373901a2ca0241617e6e7e42685d
Analyze and fix the following issue in the Linux kernel code: sfc: Remove workaround for old firmware bug
Problem Details: There was a bug in XAUI synchronisation in early 10Xpress firmware versions. This is fixed in released firmware and we do not need to work around it. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c index 6d3eb823488e..f65e313c2be2 100644 --- a/drivers/net/sfc/efx.c +++ b/drivers/net/sfc/efx.c @@ -1750,7 +1750,6 @@ static struct efx_phy_operations efx_dummy_phy_operations = { .check_hw = efx_port_dummy_op_int, .fini = efx_port_dummy_op...
e1074a0d966ac372bb0abd5eee926a0b57316582
Analyze and fix the following issue in the Linux kernel code: sfc: Fix memory BAR release call on error path
Problem Details: Match pci_request_region() with pci_release_region(), not release_mem_region(). From: Steve Hodgson <shodgson@solarflare.com> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c index 0d47d6ffe68a..6d3eb823488e 100644 --- a/drivers/net/sfc/efx.c +++ b/drivers/net/sfc/efx.c @@ -780,7 +780,7 @@ static int efx_init_io(struct efx_nic *efx) return 0; fail4: - release_mem_region(efx->membase_phys, efx->type->mem_map_size); + pc...
da8de3929da9396977b3c9096f36b173f3d9085a
Analyze and fix the following issue in the Linux kernel code: 8139too: [cosmetic] fix incorrect register for flash-rom
Problem Details: I would like to submit a correction to the driver drivers/net/8139too.c, which in no way changes the compiled driver, but does change the value of a previously incorrect value for the configuration register address of Flash PROM on the network processor rtl8139C. This corrected value is in accor...
```diff diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index f6ca99774cc2..32e66f0d4344 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c @@ -309,7 +309,7 @@ enum RTL8139_registers { Cfg9346 = 0x50, Config0 = 0x51, Config1 = 0x52, - FlashReg = 0x54, + TimerInt = 0x54, MediaStatus = 0...
cd0fce0322cd10ab39ace584be12f809988a1b9a
Analyze and fix the following issue in the Linux kernel code: s2io: Fix enabling VLAN tag stripping at driver initialization
Problem Details: VLAN doesn't work except if you'd opened the interface in promiscuous mode before. This happens because VLAN tag stripping is not correctly marked as enabled at device startup Also, the vlan_strip_flag field was moved to the private network structure. Signed-off-by: Breno Leitao <leitao@linux.vnet.i...
```diff diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 243db33042a8..a2d50fad61a1 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -371,9 +371,6 @@ static void s2io_vlan_rx_register(struct net_device *dev, flags[i]); } -/* A flag indicating whether 'RX_PA_CFG_STRIP_VLAN_TAG' bit is set or...
52845c3fd80c09f8ceac54513ae9cffac219cff7
Analyze and fix the following issue in the Linux kernel code: cs89x0: fix warning release_irq label
Problem Details: release_irq label is only used when ALLOW_DMA is defined. drivers/net/cs89x0.c: In function 'net_open': drivers/net/cs89x0.c:1401: warning: label 'release_irq' defined but not used Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index ea6144a9565e..b0b66766ed27 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c @@ -1397,9 +1397,7 @@ net_open(struct net_device *dev) release_dma: #if ALLOW_DMA free_dma(dev->dma); -#endif release_irq: -#if ALLOW_DMA release_dma_bu...
e57b641dfafc10ce23d26cf271fd2638589fdb3f
Analyze and fix the following issue in the Linux kernel code: [netdrvr/usb] hso_create_bulk_serial_device(): fix a double free
Problem Details: hso_serial_common_free() mustn't be called if hso_serial_common_create() fails. Reported-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 6e42b5a8c22b..8b2b947b6757 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c @@ -2211,14 +2211,14 @@ static struct hso_device *hso_create_bulk_serial_device( USB_DIR_IN); if (!serial->in_endp) { dev_err(&interface->dev,...
54069511633ca9d5b4e5d45cf32ffea06697c88b
Analyze and fix the following issue in the Linux kernel code: wan/hdlc_x25.c: fix a NULL dereference
Problem Details: WAN: fixes a NULL dereference in hdlc_x25. Reported-by: Adrian Bunk <bunk@kernel.org>. Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c index 8b7e5d2e2ac9..cbcbf6f0414c 100644 --- a/drivers/net/wan/hdlc_x25.c +++ b/drivers/net/wan/hdlc_x25.c @@ -163,15 +163,17 @@ static void x25_close(struct net_device *dev) static int x25_rx(struct sk_buff *skb) { + struct net_device *dev...
70666c71957b62c8e9ea5c0d999a4bfd214c80d2
Analyze and fix the following issue in the Linux kernel code: ehea: Fix DLPAR memory handling
Problem Details: The ehea busmap must be allocated only once in the first of many calls of the ehea_create_busmap_callback. Signed-off-by: Hannes Hering <hering2@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/net/ehea/ehea_qmr.c b/drivers/net/ehea/ehea_qmr.c index 140f05baafd8..db8a9257e680 100644 --- a/drivers/net/ehea/ehea_qmr.c +++ b/drivers/net/ehea/ehea_qmr.c @@ -595,7 +595,8 @@ static int ehea_create_busmap_callback(unsigned long pfn, end_section = start_section + ((nr_pages * PAGE_SIZE)...
539b06fc73b1d470b9ecb3fe7af6d5f439322c08
Analyze and fix the following issue in the Linux kernel code: [netdrvr] ne: Fix suspend and resume for ISA PnP cards.
Problem Details: A call to pnp_stop_dev and pnp_start_dev now shuts down and initializes plug and play devices for suspend and resume. Signed-off-by: David Fries <david@fries.net> Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Paul Gortmaker <p_gortmaker@yahoo.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Jeff Garzik...
```diff diff --git a/drivers/net/ne.c b/drivers/net/ne.c index fa3ceca4e15c..79599900c4b5 100644 --- a/drivers/net/ne.c +++ b/drivers/net/ne.c @@ -844,8 +844,12 @@ static int ne_drv_suspend(struct platform_device *pdev, pm_message_t state) { struct net_device *dev = platform_get_drvdata(pdev); - if (netif_running(...
533763d34862101090f8563aa9da202583b2423d
Analyze and fix the following issue in the Linux kernel code: [netdrvr] au1000_eth: Spinlock initialisation fix
Problem Details: Seems like the spinlock for the AU1x00 ethernet device is initialised too late, as it is already used in enable_mac(), which is called via mii_probe() before the init takes place. The attached patch is working here for a Linux Au1100 2.6.22.6 kernel, and as far as I checked should also be applicable t...
```diff diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c index 5ee1b0557a02..92c16c37ff23 100644 --- a/drivers/net/au1000_eth.c +++ b/drivers/net/au1000_eth.c @@ -653,6 +653,8 @@ static struct net_device * au1000_probe(int port_num) aup = dev->priv; + spin_lock_init(&aup->lock); + /* Allocate th...
d6bc372ea1196066b618908dc522b08cd28993df
Analyze and fix the following issue in the Linux kernel code: smc91x: fix nowait printout
Problem Details: Commit c4f0e76747e80578a8f7fddd82fd0ce8127bd2f8 added nowait platform data support. The printout code was however not updated, so the value of SMC_NOWAIT is still used. This patch makes sure that nowait is printed accordingly to platform data. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by...
```diff diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index 24768c10cadb..53c2dda1dc89 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c @@ -1961,7 +1961,8 @@ static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr, if (dev->dma != (unsigned char)-1) printk(" DMA %d", dev->...
523a609496dbc3897e530db2a2f27650d125ea00
Analyze and fix the following issue in the Linux kernel code: r8169: fix RxMissed register access
Problem Details: - the register is defined for the 8169 chipset only and there is no 8169 beyond RTL_GIGA_MAC_VER_06. - only the lower 3 bytes of the register are valid Fixes: 1. http://bugzilla.kernel.org/show_bug.cgi?id=10180 2. http://bugzilla.kernel.org/show_bug.cgi?id=11062 (bits of) Tested by Hermann Gaustere...
```diff diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 1822491f19cb..f28c2022f3b2 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -2286,8 +2286,6 @@ static void rtl_hw_start_8168(struct net_device *dev) RTL_R8(IntrMask); - RTL_W32(RxMissed, 0); - rtl_set_rx_mode(dev); RTL_W8(Chip...
e93dcb11dd6468000f2f018bd887e94b074ce931
Analyze and fix the following issue in the Linux kernel code: ehea: fix phyp debugging typo
Problem Details: Fix typo in ehea_h_query_ehea() which prevents building when DEBUG is on. Signed-off-by: Sebastien Dugue <sebastien.dugue@bull.net> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/net/ehea/ehea_phyp.c b/drivers/net/ehea/ehea_phyp.c index 156eb6320b4e..2a33a613d9e6 100644 --- a/drivers/net/ehea/ehea_phyp.c +++ b/drivers/net/ehea/ehea_phyp.c @@ -535,7 +535,7 @@ u64 ehea_h_query_ehea(const u64 adapter_handle, void *cb_addr) cb_logaddr, /* R5 */ ...
7c0965e614f076331bf4628fae005c844d2f1f69
Analyze and fix the following issue in the Linux kernel code: tulip: Fix dead 21041 ethernet after ifconfig down
Problem Details: The de2104x did a pci_disable_device() in it's close function, but the open function never does a pci_enable_device() and assumes that the device is already enabled. Considering that downing the interface is just a temporary thing the pci_disable_device() isn't a pretty good idea and removing it from t...
```diff diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index 9281d06d5aaa..f54c45049d50 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c @@ -1418,7 +1418,6 @@ static int de_close (struct net_device *dev) de_free_rings(de); de_adapter_sleep(de); - pci_disable_devic...
9bf2b5cdc5fe5e3136ceeecc85141765023ded6e
Analyze and fix the following issue in the Linux kernel code: powerpc: Fixes for CONFIG_PTE_64BIT for SMP support
Problem Details: There are some minor issues with support 64-bit PTEs on a 32-bit processor when dealing with SMP. * We need to order the stores in set_pte_at to make sure the flag word is set second. * Change pte_clear to use pte_update so only the flag word is cleared * Added a WARN_ON to set_pte_at to ensure the ...
```diff diff --git a/arch/powerpc/include/asm/highmem.h b/arch/powerpc/include/asm/highmem.h index 5d99b6489d56..91c589520c0a 100644 --- a/arch/powerpc/include/asm/highmem.h +++ b/arch/powerpc/include/asm/highmem.h @@ -84,7 +84,7 @@ static inline void *kmap_atomic_prot(struct page *page, enum km_type type, pgpro #ifde...
16ec4700127d479143c77fd9128dfa17ab572963
Analyze and fix the following issue in the Linux kernel code: 9p: fix put_data error handling
Problem Details: Abhishek Kulkarni pointed out an inconsistency in the way errors are returned from p9_put_data. On deeper exploration it seems the error handling for this path was completely wrong. This patch adds checks for allocation problems and propagates errors correctly. Signed-off-by: Eric Van Hensbergen <eri...
```diff diff --git a/net/9p/conv.c b/net/9p/conv.c index 44547201f5bc..5ad3a3bd73b2 100644 --- a/net/9p/conv.c +++ b/net/9p/conv.c @@ -451,8 +451,10 @@ p9_put_data(struct cbuf *bufp, const char *data, int count, unsigned char **pdata) { *pdata = buf_alloc(bufp, count); + if (*pdata == NULL) + return -ENOMEM; ...
62aa528e0299ffef8e138d9d92d13e631d06c5ff
Analyze and fix the following issue in the Linux kernel code: 9p: use an IS_ERR test rather than a NULL test
Problem Details: In case of error, the function p9_client_walk returns an ERR pointer, but never returns a NULL pointer. So a NULL test that comes after an IS_ERR test should be deleted. The semantic match that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @match_bad_null_test@ e...
```diff diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index c95295c65045..e83aa5ebe861 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -626,8 +626,7 @@ static struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry, return NULL; error: - if (fid) - p9_client_clunk(fid); + p9_client_...
206ca50de77033c6cc17d0e14fbb12d119a67b01
Analyze and fix the following issue in the Linux kernel code: 9p-trans_fd: fix and clean up module init/exit paths
Problem Details: trans_fd leaked p9_mux_wq on module unload. Fix it. While at it, collapse p9_mux_global_init() into p9_trans_fd_init(). It's easier to follow this way and the global poll_tasks array is about to removed anyway. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Eric Van Hensbergen <ericvh@gmai...
```diff diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c index f6d4af16cb19..0b4eb5f78356 100644 --- a/net/9p/trans_fd.c +++ b/net/9p/trans_fd.c @@ -238,22 +238,6 @@ static int p9_conn_rpcnb(struct p9_conn *m, struct p9_fcall *tc, static void p9_conn_cancel(struct p9_conn *m, int err); -static int p9_mux_global_...
7dc5d24be06a5ed874af035d52a083a7b61ef1bd
Analyze and fix the following issue in the Linux kernel code: 9p-trans_fd: fix trans_fd::p9_conn_destroy()
Problem Details: p9_conn_destroy() first kills all current requests by calling p9_conn_cancel(), then waits for the request list to be cleared by waiting on p9_conn->equeue. After that, polling is stopped and the trans is destroyed. This sequence has a few problems. * Read and write works were never cancelled and th...
```diff diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c index 6a32ffdb9429..ee0d151da31a 100644 --- a/net/9p/trans_fd.c +++ b/net/9p/trans_fd.c @@ -151,7 +151,6 @@ struct p9_mux_poll_task { * @trans: reference to transport instance for this connection * @tagpool: id accounting for transactions * @err: error st...
72029fe85d8d060b3f966f2dbc36b3c75b5a6532
Analyze and fix the following issue in the Linux kernel code: 9p: implement proper trans module refcounting and unregistration
Problem Details: 9p trans modules aren't refcounted nor were they unregistered properly. Fix it. * Add 9p_trans_module->owner and reference the module on each trans instance creation and put it on destruction. * Protect v9fs_trans_list with a spinlock. This isn't strictly necessary as the list is manipulated on...
```diff diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index b3d3e27c6299..c3626c0ba9d3 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h @@ -596,4 +596,5 @@ int p9_idpool_check(int id, struct p9_idpool *p); int p9_error_init(void); int p9_errstr2errno(char *, int); int p9_trans_fd_init(void); +void...
47cbb1107e4172f3632713d74dc8651a32ceb294
Analyze and fix the following issue in the Linux kernel code: pcmcia: Fix up legacy driver IRQs
Problem Details: The PCMCIA layer obsoleted asking for per device private IRQS some years ago and all the drivers by inspection correctly use dev_id and handle shared interrupts [they get em anyway in most PCI bridged PCMCIA/Cardbus] so can be adjusted. This gets rid of the various bugs reported where there is spewage...
```diff diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c index f12355398fe7..fd72e427cb28 100644 --- a/drivers/net/wireless/airo_cs.c +++ b/drivers/net/wireless/airo_cs.c @@ -147,7 +147,7 @@ static int airo_probe(struct pcmcia_device *p_dev) DEBUG(0, "airo_attach()\n"); /* Interrupt se...
acaf908d408ccd49f13aeb46cbd4428a4db174d1
Analyze and fix the following issue in the Linux kernel code: rt2x00: Fix HW crypto key handling
Problem Details: When a crypto key is being removed, rt2x00mac should not reset the key->hw_key_idx value because that will prevent the driver from removing the correct key from the hardware. Furthermore ffz() starts counting at 0 instead of 1, so we don't need to substract 1 from the resulting value. Signed-off-by: ...
```diff diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 485c40de5cc0..2c6cc5c374ff 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c @@ -543,7 +543,8 @@ int rt2x00mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd c...
4492bea656b70dad6a9ae7b59b1430fa38ba3345
Analyze and fix the following issue in the Linux kernel code: mac80211: fix led behavior in IBSS
Problem Details: This patch fixes the led behavior in IBSS. After we joined an IBSS cell we need to inform the led that we got associated. Although there is no 802.11 association in IBSS mode, the semantic of "There is a link" is relevant. This allows the led to blink in IBSS mode (at least this solves a bug for iwlwif...
```diff diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 52a648133018..e859a0ab6162 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1452,6 +1452,8 @@ static int ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, ifsta->state = IEEE80211_STA_MLME_IBSS_JOINED; mod_timer(&ifsta->ti...