Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix some typos #60

Closed
wants to merge 1 commit into from
Closed

fix some typos #60

wants to merge 1 commit into from

Conversation

yang-le
Copy link

@yang-le yang-le commented Dec 1, 2013

No description provided.

zeitgeist87 pushed a commit to zeitgeist87/linux that referenced this pull request Mar 14, 2014
…loop-during-umount-checkpatch-fixes

ERROR: code indent should use tabs where possible
torvalds#56: FILE: fs/ocfs2/dlm/dlmmaster.c:3087:
+                       if (tmp->type == DLM_MLE_MASTER) {$

WARNING: please, no spaces at the start of a line
torvalds#56: FILE: fs/ocfs2/dlm/dlmmaster.c:3087:
+                       if (tmp->type == DLM_MLE_MASTER) {$

WARNING: suspect code indent for conditional statements (23, 31)
torvalds#56: FILE: fs/ocfs2/dlm/dlmmaster.c:3087:
+                       if (tmp->type == DLM_MLE_MASTER) {
+                               ret = DLM_MIGRATE_RESPONSE_MASTERY_REF;

ERROR: code indent should use tabs where possible
torvalds#57: FILE: fs/ocfs2/dlm/dlmmaster.c:3088:
+                               ret = DLM_MIGRATE_RESPONSE_MASTERY_REF;$

WARNING: please, no spaces at the start of a line
torvalds#57: FILE: fs/ocfs2/dlm/dlmmaster.c:3088:
+                               ret = DLM_MIGRATE_RESPONSE_MASTERY_REF;$

ERROR: code indent should use tabs where possible
#58: FILE: fs/ocfs2/dlm/dlmmaster.c:3089:
+                               mlog(0, "%s:%.*s: master=%u, newmaster=%u, "$

WARNING: please, no spaces at the start of a line
#58: FILE: fs/ocfs2/dlm/dlmmaster.c:3089:
+                               mlog(0, "%s:%.*s: master=%u, newmaster=%u, "$

WARNING: quoted string split across lines
torvalds#59: FILE: fs/ocfs2/dlm/dlmmaster.c:3090:
+                               mlog(0, "%s:%.*s: master=%u, newmaster=%u, "
+                                               "telling master to get ref "

ERROR: code indent should use tabs where possible
torvalds#59: FILE: fs/ocfs2/dlm/dlmmaster.c:3090:
+                                               "telling master to get ref "$

WARNING: please, no spaces at the start of a line
torvalds#59: FILE: fs/ocfs2/dlm/dlmmaster.c:3090:
+                                               "telling master to get ref "$

WARNING: quoted string split across lines
torvalds#60: FILE: fs/ocfs2/dlm/dlmmaster.c:3091:
+                                               "telling master to get ref "
+                                               "for cleared out mle during "

ERROR: code indent should use tabs where possible
torvalds#60: FILE: fs/ocfs2/dlm/dlmmaster.c:3091:
+                                               "for cleared out mle during "$

WARNING: please, no spaces at the start of a line
torvalds#60: FILE: fs/ocfs2/dlm/dlmmaster.c:3091:
+                                               "for cleared out mle during "$

WARNING: quoted string split across lines
torvalds#61: FILE: fs/ocfs2/dlm/dlmmaster.c:3092:
+                                               "for cleared out mle during "
+                                               "migration\n", dlm->name,

ERROR: code indent should use tabs where possible
torvalds#61: FILE: fs/ocfs2/dlm/dlmmaster.c:3092:
+                                               "migration\n", dlm->name,$

WARNING: please, no spaces at the start of a line
torvalds#61: FILE: fs/ocfs2/dlm/dlmmaster.c:3092:
+                                               "migration\n", dlm->name,$

ERROR: code indent should use tabs where possible
torvalds#62: FILE: fs/ocfs2/dlm/dlmmaster.c:3093:
+                                               namelen, name, master,$

WARNING: please, no spaces at the start of a line
torvalds#62: FILE: fs/ocfs2/dlm/dlmmaster.c:3093:
+                                               namelen, name, master,$

ERROR: code indent should use tabs where possible
torvalds#63: FILE: fs/ocfs2/dlm/dlmmaster.c:3094:
+                                               new_master);$

WARNING: please, no spaces at the start of a line
torvalds#63: FILE: fs/ocfs2/dlm/dlmmaster.c:3094:
+                                               new_master);$

ERROR: code indent should use tabs where possible
torvalds#64: FILE: fs/ocfs2/dlm/dlmmaster.c:3095:
+                       }$

WARNING: please, no spaces at the start of a line
torvalds#64: FILE: fs/ocfs2/dlm/dlmmaster.c:3095:
+                       }$

total: 9 errors, 13 warnings, 20 lines checked

NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or
      scripts/cleanfile

./patches/ocfs2-do-not-return-dlm_migrate_response_mastery_ref-to-avoid-endlessloop-during-umount.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Joel Becker <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Xue jiufei <[email protected]>
Cc: jiangyiwen <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
swarren pushed a commit to swarren/linux-tegra that referenced this pull request Mar 19, 2014
…loop-during-umount-checkpatch-fixes

ERROR: code indent should use tabs where possible
torvalds#56: FILE: fs/ocfs2/dlm/dlmmaster.c:3087:
+                       if (tmp->type == DLM_MLE_MASTER) {$

WARNING: please, no spaces at the start of a line
torvalds#56: FILE: fs/ocfs2/dlm/dlmmaster.c:3087:
+                       if (tmp->type == DLM_MLE_MASTER) {$

WARNING: suspect code indent for conditional statements (23, 31)
torvalds#56: FILE: fs/ocfs2/dlm/dlmmaster.c:3087:
+                       if (tmp->type == DLM_MLE_MASTER) {
+                               ret = DLM_MIGRATE_RESPONSE_MASTERY_REF;

ERROR: code indent should use tabs where possible
torvalds#57: FILE: fs/ocfs2/dlm/dlmmaster.c:3088:
+                               ret = DLM_MIGRATE_RESPONSE_MASTERY_REF;$

WARNING: please, no spaces at the start of a line
torvalds#57: FILE: fs/ocfs2/dlm/dlmmaster.c:3088:
+                               ret = DLM_MIGRATE_RESPONSE_MASTERY_REF;$

ERROR: code indent should use tabs where possible
#58: FILE: fs/ocfs2/dlm/dlmmaster.c:3089:
+                               mlog(0, "%s:%.*s: master=%u, newmaster=%u, "$

WARNING: please, no spaces at the start of a line
#58: FILE: fs/ocfs2/dlm/dlmmaster.c:3089:
+                               mlog(0, "%s:%.*s: master=%u, newmaster=%u, "$

WARNING: quoted string split across lines
torvalds#59: FILE: fs/ocfs2/dlm/dlmmaster.c:3090:
+                               mlog(0, "%s:%.*s: master=%u, newmaster=%u, "
+                                               "telling master to get ref "

ERROR: code indent should use tabs where possible
torvalds#59: FILE: fs/ocfs2/dlm/dlmmaster.c:3090:
+                                               "telling master to get ref "$

WARNING: please, no spaces at the start of a line
torvalds#59: FILE: fs/ocfs2/dlm/dlmmaster.c:3090:
+                                               "telling master to get ref "$

WARNING: quoted string split across lines
torvalds#60: FILE: fs/ocfs2/dlm/dlmmaster.c:3091:
+                                               "telling master to get ref "
+                                               "for cleared out mle during "

ERROR: code indent should use tabs where possible
torvalds#60: FILE: fs/ocfs2/dlm/dlmmaster.c:3091:
+                                               "for cleared out mle during "$

WARNING: please, no spaces at the start of a line
torvalds#60: FILE: fs/ocfs2/dlm/dlmmaster.c:3091:
+                                               "for cleared out mle during "$

WARNING: quoted string split across lines
torvalds#61: FILE: fs/ocfs2/dlm/dlmmaster.c:3092:
+                                               "for cleared out mle during "
+                                               "migration\n", dlm->name,

ERROR: code indent should use tabs where possible
torvalds#61: FILE: fs/ocfs2/dlm/dlmmaster.c:3092:
+                                               "migration\n", dlm->name,$

WARNING: please, no spaces at the start of a line
torvalds#61: FILE: fs/ocfs2/dlm/dlmmaster.c:3092:
+                                               "migration\n", dlm->name,$

ERROR: code indent should use tabs where possible
torvalds#62: FILE: fs/ocfs2/dlm/dlmmaster.c:3093:
+                                               namelen, name, master,$

WARNING: please, no spaces at the start of a line
torvalds#62: FILE: fs/ocfs2/dlm/dlmmaster.c:3093:
+                                               namelen, name, master,$

ERROR: code indent should use tabs where possible
torvalds#63: FILE: fs/ocfs2/dlm/dlmmaster.c:3094:
+                                               new_master);$

WARNING: please, no spaces at the start of a line
torvalds#63: FILE: fs/ocfs2/dlm/dlmmaster.c:3094:
+                                               new_master);$

ERROR: code indent should use tabs where possible
torvalds#64: FILE: fs/ocfs2/dlm/dlmmaster.c:3095:
+                       }$

WARNING: please, no spaces at the start of a line
torvalds#64: FILE: fs/ocfs2/dlm/dlmmaster.c:3095:
+                       }$

total: 9 errors, 13 warnings, 20 lines checked

NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or
      scripts/cleanfile

./patches/ocfs2-do-not-return-dlm_migrate_response_mastery_ref-to-avoid-endlessloop-during-umount.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Joel Becker <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Xue jiufei <[email protected]>
Cc: jiangyiwen <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
swarren pushed a commit to swarren/linux-tegra that referenced this pull request Apr 18, 2014
…nabled

With bigalloc enabled we must use EXT4_CLUSTERS_PER_GROUP() instead of
EXT4_BLOCKS_PER_GROUP() otherwise we will go beyond the allocated buffer.

$ mount -t ext4 /dev/vde /vde
[   70.573993] EXT4-fs DEBUG (fs/ext4/mballoc.c, 2346): ext4_mb_alloc_groupinfo:
[   70.575174] allocated s_groupinfo array for 1 meta_bg's
[   70.576172] EXT4-fs DEBUG (fs/ext4/super.c, 2092): ext4_check_descriptors:
[   70.576972] Checking group descriptorsBUG: unable to handle kernel paging request at ffff88006ab56000
[   72.463686] IP: [<ffffffff81394eb9>] __bitmap_weight+0x2a/0x7f
[   72.464168] PGD 295e067 PUD 2961067 PMD 7fa8e067 PTE 800000006ab56060
[   72.464738] Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
[   72.465139] Modules linked in:
[   72.465402] CPU: 1 PID: 3560 Comm: mount Tainted: G        W    3.14.0-rc2-00069-ge57bce1 torvalds#60
[   72.466079] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[   72.466505] task: ffff88007ce6c8a0 ti: ffff88006b7f0000 task.ti: ffff88006b7f0000
[   72.466505] RIP: 0010:[<ffffffff81394eb9>]  [<ffffffff81394eb9>] __bitmap_weight+0x2a/0x7f
[   72.466505] RSP: 0018:ffff88006b7f1c00  EFLAGS: 00010206
[   72.466505] RAX: 0000000000000000 RBX: 000000000000050a RCX: 0000000000000040
[   72.466505] RDX: 0000000000000000 RSI: 0000000000080000 RDI: 0000000000000000
[   72.466505] RBP: ffff88006b7f1c28 R08: 0000000000000002 R09: 0000000000000000
[   72.466505] R10: 000000000000babe R11: 0000000000000400 R12: 0000000000080000
[   72.466505] R13: 0000000000000200 R14: 0000000000002000 R15: ffff88006ab55000
[   72.466505] FS:  00007f43ba1fa840(0000) GS:ffff88007f800000(0000) knlGS:0000000000000000
[   72.466505] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[   72.466505] CR2: ffff88006ab56000 CR3: 000000006b7e6000 CR4: 00000000000006e0
[   72.466505] Stack:
[   72.466505]  ffff88006ab65000 0000000000000000 0000000000000000 0000000000010000
[   72.466505]  ffff88006ab6f400 ffff88006b7f1c58 ffffffff81396bb8 0000000000010000
[   72.466505]  0000000000000000 ffff88007b869a90 ffff88006a48a000 ffff88006b7f1c70
[   72.466505] Call Trace:
[   72.466505]  [<ffffffff81396bb8>] memweight+0x5f/0x8a
[   72.466505]  [<ffffffff811c3b19>] ext4_count_free+0x13/0x21
[   72.466505]  [<ffffffff811c396c>] ext4_count_free_clusters+0xdb/0x171
[   72.466505]  [<ffffffff811e3bdd>] ext4_fill_super+0x117c/0x28ef
[   72.466505]  [<ffffffff81391569>] ? vsnprintf+0x1c7/0x3f7
[   72.466505]  [<ffffffff8114d8dc>] mount_bdev+0x145/0x19c
[   72.466505]  [<ffffffff811e2a61>] ? ext4_calculate_overhead+0x2a1/0x2a1
[   72.466505]  [<ffffffff811dab1d>] ext4_mount+0x15/0x17
[   72.466505]  [<ffffffff8114e3aa>] mount_fs+0x67/0x150
[   72.466505]  [<ffffffff811637ea>] vfs_kern_mount+0x64/0xde
[   72.466505]  [<ffffffff81165d19>] do_mount+0x6fe/0x7f5
[   72.466505]  [<ffffffff81126cc8>] ? strndup_user+0x3a/0xd9
[   72.466505]  [<ffffffff8116604b>] SyS_mount+0x85/0xbe
[   72.466505]  [<ffffffff81619e90>] tracesys+0xdd/0xe2
[   72.466505] Code: c3 89 f0 b9 40 00 00 00 55 99 48 89 e5 41 57 f7 f9 41 56 49 89 ff 41 55 45 31 ed 41 54 41 89 f4 53 31 db 41 89 c6 45 39 ee 7e 10 <4b> 8b 3c ef 49 ff c5 e8 bf ff ff ff 01 c3 eb eb 31 c0 45 85 f6
[   72.466505] RIP  [<ffffffff81394eb9>] __bitmap_weight+0x2a/0x7f
[   72.466505]  RSP <ffff88006b7f1c00>
[   72.466505] CR2: ffff88006ab56000
[   72.466505] ---[ end trace 7d051a08ae138573 ]---
Killed

Signed-off-by: "Theodore Ts'o" <[email protected]>
torvalds pushed a commit that referenced this pull request Apr 21, 2014
…nabled

With bigalloc enabled we must use EXT4_CLUSTERS_PER_GROUP() instead of
EXT4_BLOCKS_PER_GROUP() otherwise we will go beyond the allocated buffer.

$ mount -t ext4 /dev/vde /vde
[   70.573993] EXT4-fs DEBUG (fs/ext4/mballoc.c, 2346): ext4_mb_alloc_groupinfo:
[   70.575174] allocated s_groupinfo array for 1 meta_bg's
[   70.576172] EXT4-fs DEBUG (fs/ext4/super.c, 2092): ext4_check_descriptors:
[   70.576972] Checking group descriptorsBUG: unable to handle kernel paging request at ffff88006ab56000
[   72.463686] IP: [<ffffffff81394eb9>] __bitmap_weight+0x2a/0x7f
[   72.464168] PGD 295e067 PUD 2961067 PMD 7fa8e067 PTE 800000006ab56060
[   72.464738] Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
[   72.465139] Modules linked in:
[   72.465402] CPU: 1 PID: 3560 Comm: mount Tainted: G        W    3.14.0-rc2-00069-ge57bce1 #60
[   72.466079] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[   72.466505] task: ffff88007ce6c8a0 ti: ffff88006b7f0000 task.ti: ffff88006b7f0000
[   72.466505] RIP: 0010:[<ffffffff81394eb9>]  [<ffffffff81394eb9>] __bitmap_weight+0x2a/0x7f
[   72.466505] RSP: 0018:ffff88006b7f1c00  EFLAGS: 00010206
[   72.466505] RAX: 0000000000000000 RBX: 000000000000050a RCX: 0000000000000040
[   72.466505] RDX: 0000000000000000 RSI: 0000000000080000 RDI: 0000000000000000
[   72.466505] RBP: ffff88006b7f1c28 R08: 0000000000000002 R09: 0000000000000000
[   72.466505] R10: 000000000000babe R11: 0000000000000400 R12: 0000000000080000
[   72.466505] R13: 0000000000000200 R14: 0000000000002000 R15: ffff88006ab55000
[   72.466505] FS:  00007f43ba1fa840(0000) GS:ffff88007f800000(0000) knlGS:0000000000000000
[   72.466505] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[   72.466505] CR2: ffff88006ab56000 CR3: 000000006b7e6000 CR4: 00000000000006e0
[   72.466505] Stack:
[   72.466505]  ffff88006ab65000 0000000000000000 0000000000000000 0000000000010000
[   72.466505]  ffff88006ab6f400 ffff88006b7f1c58 ffffffff81396bb8 0000000000010000
[   72.466505]  0000000000000000 ffff88007b869a90 ffff88006a48a000 ffff88006b7f1c70
[   72.466505] Call Trace:
[   72.466505]  [<ffffffff81396bb8>] memweight+0x5f/0x8a
[   72.466505]  [<ffffffff811c3b19>] ext4_count_free+0x13/0x21
[   72.466505]  [<ffffffff811c396c>] ext4_count_free_clusters+0xdb/0x171
[   72.466505]  [<ffffffff811e3bdd>] ext4_fill_super+0x117c/0x28ef
[   72.466505]  [<ffffffff81391569>] ? vsnprintf+0x1c7/0x3f7
[   72.466505]  [<ffffffff8114d8dc>] mount_bdev+0x145/0x19c
[   72.466505]  [<ffffffff811e2a61>] ? ext4_calculate_overhead+0x2a1/0x2a1
[   72.466505]  [<ffffffff811dab1d>] ext4_mount+0x15/0x17
[   72.466505]  [<ffffffff8114e3aa>] mount_fs+0x67/0x150
[   72.466505]  [<ffffffff811637ea>] vfs_kern_mount+0x64/0xde
[   72.466505]  [<ffffffff81165d19>] do_mount+0x6fe/0x7f5
[   72.466505]  [<ffffffff81126cc8>] ? strndup_user+0x3a/0xd9
[   72.466505]  [<ffffffff8116604b>] SyS_mount+0x85/0xbe
[   72.466505]  [<ffffffff81619e90>] tracesys+0xdd/0xe2
[   72.466505] Code: c3 89 f0 b9 40 00 00 00 55 99 48 89 e5 41 57 f7 f9 41 56 49 89 ff 41 55 45 31 ed 41 54 41 89 f4 53 31 db 41 89 c6 45 39 ee 7e 10 <4b> 8b 3c ef 49 ff c5 e8 bf ff ff ff 01 c3 eb eb 31 c0 45 85 f6
[   72.466505] RIP  [<ffffffff81394eb9>] __bitmap_weight+0x2a/0x7f
[   72.466505]  RSP <ffff88006b7f1c00>
[   72.466505] CR2: ffff88006ab56000
[   72.466505] ---[ end trace 7d051a08ae138573 ]---
Killed

Signed-off-by: "Theodore Ts'o" <[email protected]>
ddstreet pushed a commit to ddstreet/linux that referenced this pull request Apr 26, 2014
GIT 1aae31c8306e5f1bdeafd87b2cd9e3f0df3709e5

commit ae4bedf0679d99f0a9b80a7ea9b8dd205de05d06
Author: Jordan Rife <[email protected]>
Date:   Tue Apr 22 17:44:51 2014 -0700

    Input: elantech - add support for newer elantech touchpads
    
    Newer elantech touchpads are not recognized by the current driver, since it
    fails to detect their firmware version number. This prevents more advanced
    touchpad features from being usable such as two-finger scrolling. This
    patch allows newer touchpads to be detected and be fully functional. Tested
    on Sony Vaio SVF13N17PXB.
    
    Signed-off-by: Jordan Rife <[email protected]>
    Signed-off-by: Dmitry Torokhov <[email protected]>

commit 7740fc52105c9e6d2beac389a9ae0ce7138cf5ab
Author: Lejun Zhu <[email protected]>
Date:   Tue Apr 22 22:47:13 2014 -0700

    Input: soc_button_array - fix a crash during rmmod
    
    When the system has zero or one button available, trying to rmmod
    soc_button_array will cause crash. Fix this by properly handling -ENODEV
    in probe().
    
    Signed-off-by: Lejun Zhu <[email protected]>
    Signed-off-by: Dmitry Torokhov <[email protected]>

commit 1b17844b29ae042576bea588164f2f1e9590a8bc
Author: Linus Torvalds <[email protected]>
Date:   Tue Apr 22 13:49:40 2014 -0700

    mm: make fixup_user_fault() check the vma access rights too
    
    fixup_user_fault() is used by the futex code when the direct user access
    fails, and the futex code wants it to either map in the page in a usable
    form or return an error.  It relied on handle_mm_fault() to map the
    page, and correctly checked the error return from that, but while that
    does map the page, it doesn't actually guarantee that the page will be
    mapped with sufficient permissions to be then accessed.
    
    So do the appropriate tests of the vma access rights by hand.
    
    [ Side note: arguably handle_mm_fault() could just do that itself, but
      we have traditionally done it in the caller, because some callers -
      notably get_user_pages() - have been able to access pages even when
      they are mapped with PROT_NONE.  Maybe we should re-visit that design
      decision, but in the meantime this is the minimal patch. ]
    
    Found by Dave Jones running his trinity tool.
    
    Reported-by: Dave Jones <[email protected]>
    Acked-by: Hugh Dickins <[email protected]>
    Cc: [email protected]
    Signed-off-by: Linus Torvalds <[email protected]>

commit 73acacc7397fe854ed2ab75f1c940fa00faaf15e
Author: Alex Deucher <[email protected]>
Date:   Tue Apr 15 12:44:35 2014 -0400

    drm/radeon: don't allow runpm=1 on systems with out ATPX
    
    vgaswitcheroo and the ATPX ACPI methods are required to
    power down the dGPU.
    
    bug:
    https://bugzilla.kernel.org/show_bug.cgi?id=73901
    
    Signed-off-by: Alex Deucher <[email protected]>
    Cc: [email protected]

commit e9a4099a59cc598a44006059dd775c25e422b772
Author: Alex Deucher <[email protected]>
Date:   Tue Apr 15 12:44:34 2014 -0400

    drm/radeon: fix ATPX detection on non-VGA GPUs
    
    Some newer PX laptops have the pci device class
    set to DISPLAY_OTHER rather than DISPLAY_VGA.  This
    properly detects ATPX on those laptops.
    
    Based on a patch from: Pali Rohár <[email protected]>
    
    Signed-off-by: Alex Deucher <[email protected]>
    Cc: [email protected]
    Cc: [email protected]

commit 3ed9a335cfc64b2c83545f341cdddf2347b12b97
Author: Alex Deucher <[email protected]>
Date:   Tue Apr 15 12:44:33 2014 -0400

    drm/radeon/pm: don't walk the crtc list before it has been initialized (v2)
    
    Avoids a crash in certain cases when thermal irqs are generated
    before the display structures have been initialized.
    
    v2: fix the vblank and vrefresh helpers as well
    
    bug:
    https://bugzilla.kernel.org/show_bug.cgi?id=73931
    
    Signed-off-by: Alex Deucher <[email protected]>
    Cc: [email protected]

commit cb3e4e7c59e4b43ac378631f6101f5c8de3a27a5
Author: Alex Deucher <[email protected]>
Date:   Tue Apr 15 12:44:32 2014 -0400

    drm/radeon: properly unregister hwmon interface (v2)
    
    Need to properly unregister the hwmon device on driver
    unload.
    
    v2: minor clean up
    
    bug:
    https://bugzilla.kernel.org/show_bug.cgi?id=73931
    
    Signed-off-by: Alex Deucher <[email protected]>
    Cc: [email protected]

commit 7e95cfb0b797678cd3493ca0322ef2675547a0bc
Author: Alex Deucher <[email protected]>
Date:   Tue Apr 22 08:17:18 2014 -0400

    drm/radeon: fix count in cik_sdma_ring_test()
    
    Should be 5 rather than 4.
    
    Noticed-by: Mathias Fröhlich <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Cc: [email protected]
    Signed-off-by: Christian König <[email protected]>

commit ad47b8fa5a679b7acaae831635e40d2e4887e9e7
Author: Alex Deucher <[email protected]>
Date:   Tue Apr 22 02:02:06 2014 -0400

    drm/radeon/aux: fix hpd assignment for aux bus
    
    The hpd (hot plug detect) pin assignment got lost
    in the conversion to to the common i2c over aux
    code.  Without this information, aux transactions
    do not work properly.  Fixes DP failures.
    
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Christian König <[email protected]>

commit 0565103d1adbd765ca45248d04c327c076dd1571
Author: Anton Ivanov <[email protected]>
Date:   Fri Mar 7 18:37:47 2014 +0000

    um: Memory corruption on startup
    
    The reverse case of this race (you must msync before read) is
    well known. This is the not so common one.
    
    It can be triggered only on systems which do a lot of task
    switching and only at UML startup. If you are starting 200+ UMLs
    ~ 0.5% will always die without this fix.
    
    Signed-off-by: Anton Ivanov <[email protected]>
    [rw: minor whitespace fixes]
    Signed-off-by: Richard Weinberger <[email protected]>

commit 9fcb663be42e4727c1beabc7c80e2d839199e6b1
Author: Anton Ivanov <[email protected]>
Date:   Fri Mar 7 18:37:46 2014 +0000

    um: Missing pipe handling
    
    UML does not handle sigpipe. As a result when running it under
    expect or redirecting the IO from the console to an external program
    it will crash if the program stops or exits.
    
    Signed-off-by: Anton Ivanov <[email protected]>
    Signed-off-by: Richard Weinberger <[email protected]>

commit 0d71832e3004a0833938cc28a096823cd55b8e79
Author: Tristan Schmelcher <[email protected]>
Date:   Mon Nov 11 13:03:06 2013 -0500

    uml: Simplify tempdir logic.
    
    Inferring the mount hierarchy correctly from /proc/mounts is hard when MS_MOVE
    may have been used, and the previous code did it wrongly. This change simplifies
    the logic to only require that /dev/shm be _on_ tmpfs (which can be checked
    trivially with statfs) rather than that it be a _mountpoint_ of tmpfs, since
    there isn't a compelling reason to be that strict. We also now check for tmpfs
    on whatever directory we ultimately use so that the user is better informed.
    
    This change also moves the more standard TMPDIR environment variable check ahead
    of the others.
    
    Applies to 3.12.
    
    Signed-off-by: Tristan Schmelcher <[email protected]>
    Signed-off-by: Richard Weinberger <[email protected]>

commit c2fb3094669a3205f16a32f4119d0afe40b1a1fd
Author: Christian König <[email protected]>
Date:   Sun Apr 20 13:24:32 2014 +0200

    drm/radeon: improve PLL limit handling in post div calculation
    
    This improves the PLL parameters when we work at
    the limits of the allowed ranges.
    
    Signed-off-by: Christian König <[email protected]>

commit 46a2986ebbe18757c2d8c352f8fb6e0f4f0754e3
Author: Hans de Goede <[email protected]>
Date:   Sat Apr 19 22:31:18 2014 -0700

    Input: synaptics - add min/max quirk for ThinkPad T431s, L440, L540, S1 Yoga and X1
    
    We expect that all the Haswell series will need such quirks, sigh.
    
    The T431s seems to be T430 hardware in a T440s case, using the T440s touchpad,
    with the same min/max issue.
    
    The X1 Carbon 3rd generation name says 2nd while it is a 3rd generation.
    
    The X1 and T431s share a PnPID with the T540p, but the reported ranges are
    closer to those of the T440s.
    
    HdG: Squashed 5 quirk patches into one. T431s + L440 + L540 are written by me,
    S1 Yoga and X1 are written by Benjamin Tissoires.
    
    Hdg: Standardized S1 Yoga and X1 values, Yoga uses the same touchpad as the
    X240, X1 uses the same touchpad as the T440.
    
    Cc: [email protected]
    Signed-off-by: Benjamin Tissoires <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    Signed-off-by: Dmitry Torokhov <[email protected]>

commit 43e19888b1fe2a3e8a5543030c5b286cde38b3f5
Author: Hans de Goede <[email protected]>
Date:   Sat Apr 19 22:26:41 2014 -0700

    Input: synaptics - report INPUT_PROP_TOPBUTTONPAD property
    
    Check PNP ID of the PS/2 AUX port and report INPUT_PROP_TOPBUTTONPAD
    property for for touchpads with top button areas.
    
    Signed-off-by: Hans de Goede <[email protected]>
    Signed-off-by: Dmitry Torokhov <[email protected]>

commit f37c013409bb78ebb958821aa10d069e707cabac
Author: Hans de Goede <[email protected]>
Date:   Sat Apr 19 22:25:45 2014 -0700

    Input: Add INPUT_PROP_TOPBUTTONPAD device property
    
    On some newer laptops with a trackpoint the physical buttons for the
    trackpoint have been removed to allow for a larger touchpad. On these
    laptops the buttonpad has clearly marked areas on the top which are to be
    used as trackpad buttons.
    
    Users of the event device-node need to know about this, so that they can
    properly interpret BTN_LEFT events as being a left / right / middle click
    depending on where on the button pad the clicking finger is.
    
    This commits adds a INPUT_PROP_TOPBUTTONPAD device property which drivers
    for such buttonpads will use to signal to the user that this buttonpad not
    only has the normal bottom button area, but also a top button area.
    
    Signed-off-by: Hans de Goede <[email protected]>
    Signed-off-by: Dmitry Torokhov <[email protected]>

commit a7c5868c3482127cb308c779b8a6460a3353c17f
Author: Hans de Goede <[email protected]>
Date:   Sat Apr 19 20:47:35 2014 -0700

    Input: i8042 - add firmware_id support
    
    Fill in the new serio firmware_id sysfs attribute for pnp instantiated
    8042 serio ports.
    
    Signed-off-by: Hans de Goede <[email protected]>
    Acked-by: Peter Hutterer <[email protected]>
    Signed-off-by: Dmitry Torokhov <[email protected]>

commit 0456c66f4e905e1ca839318219c770988b47975c
Author: Hans de Goede <[email protected]>
Date:   Sat Apr 19 20:39:35 2014 -0700

    Input: serio - add firmware_id sysfs attribute
    
    serio devices exposed via platform firmware interfaces such as ACPI may
    provide additional identifying information of use to userspace.
    
    We don't associate the serio devices with the firmware device (we don't
    set it as parent), so there's no way for userspace to make use of this
    information.
    
    We cannot change the parent for serio devices instantiated though a
    firmware interface as that would break suspend / resume ordering.
    
    Therefore this patch adds a new firmware_id sysfs attribute so that
    userspace can get a string from there with any additional identifying
    information the firmware interface may provide.
    
    Signed-off-by: Hans de Goede <[email protected]>
    Acked-by: Peter Hutterer <[email protected]>
    Signed-off-by: Dmitry Torokhov <[email protected]>

commit 38a1807badd26d413e8f2b0393a0c5bfdf9e912b
Author: Jason Gerecke <[email protected]>
Date:   Sat Apr 19 13:51:41 2014 -0700

    Input: wacom - handle 1024 pressure levels in wacom_tpc_pen
    
    Some tablet PC sensors (e.g. the 0xEC found in the Thinkpad Yoga) report
    more than 256 pressure levels and will experience wraparound unless the
    full range is read.
    
    Signed-off-by: Jason Gerecke <[email protected]>
    Tested-by: Aaron Skomra <[email protected]>
    Reviewed-by: Carl Worth <[email protected]>
    Signed-off-by: Dmitry Torokhov <[email protected]>

commit 74b634178e5f0e2d8d2d26f308c440687930274b
Author: Jason Gerecke <[email protected]>
Date:   Sat Apr 19 13:50:22 2014 -0700

    Input: wacom - references to 'wacom->data' should use 'unsigned char*'
    
    'wacom->data' contains raw binary data and can lead to unexpected behavior
    if a byte under examination happens to have its MSB set.
    
    Signed-off-by: Jason Gerecke <[email protected]>
    Tested-by: Aaron Skomra <[email protected]>
    Reviewed-by: Carl Worth <[email protected]>
    Signed-off-by: Dmitry Torokhov <[email protected]>

commit e9fc413f4a5ebd9f0f7bdf923c43191e99fc1970
Author: Jason Gerecke <[email protected]>
Date:   Sat Apr 19 13:49:37 2014 -0700

    Input: wacom - override 'pressure_max' with value from HID_USAGE_PRESSURE
    
    The 0xEC sensor is used in multiple tablet PCs and curiously has versions
    that report 256 levels of pressure (Samsung Slate 7) as well as versions
    that report 1024 levels (Lenovo Thinkpad Yoga).  To allow both versions to
    work properly, we allow the value of HID_USAGE_PRESSURE reported to
    override pressure_max.
    
    Signed-off-by: Jason Gerecke <[email protected]>
    Tested-by: Aaron Skomra <[email protected]>
    Reviewed-by: Carl Worth <[email protected]>
    Signed-off-by: Dmitry Torokhov <[email protected]>

commit 5866d9e3b7ecdf96a6089d12bb65736d7c473bce
Author: Jason Gerecke <[email protected]>
Date:   Sat Apr 19 13:46:40 2014 -0700

    Input: wacom - use full 32-bit HID Usage value in switch statement
    
    A HID Usage is a 32-bit value: an upper 16-bit "page" and a lower 16-bit
    ID. While the two halves are normally reported seperately, only the
    combination uniquely idenfifes a particular HID Usage.
    
    The existing code performs the comparison in two steps, first performing a
    switch on the ID and then verifying the page within each case. While this
    works fine, it is very akward to handle two Usages that share a single ID,
    such as HID_USAGE_PRESSURE and HID_USAGE_X because the case statement can
    only have a single identifier.
    
    To work around this, we now check the full 32-bit HID Usage directly rather
    than first checking the ID and then the page.  This allows the switch
    statement to have distinct cases for e.g. HID_USAGE_PRESSURE and
    HID_USAGE_X.
    
    Signed-off-by: Jason Gerecke <[email protected]>
    Tested-by: Aaron Skomra <[email protected]>
    Reviewed-by: Carl Worth <[email protected]>
    Signed-off-by: Dmitry Torokhov <[email protected]>

commit 91ae0e77836b4a13f511b4fc62dc31c523858187
Author: Ping Cheng <[email protected]>
Date:   Sat Apr 12 13:43:25 2014 -0700

    Input: wacom - missed the last bit of expresskey for DTU-1031
    
    Signed-off-by: Ping Cheng <[email protected]>
    Signed-off-by: Dmitry Torokhov <[email protected]>

commit 2fdf4cd9a2afb113e566dfe6ee5df55ada8c0631
Author: Alexander Stein <[email protected]>
Date:   Sat Apr 12 13:42:24 2014 -0700

    Input: ads7846 - fix device usage within attribute show
    
    With commit e585c40ba (Input: ads7846 - convert to
    hwmon_device_register_with_groups()) the device passed to the attribute's
    show function isn't the spi device as before.
    So fixup the passed device to ads7846_read12_ser.
    
    Signed-off-by: Alexander Stein <[email protected]>
    Acked-by: Guenter Roeck <[email protected]>
    Signed-off-by: Dmitry Torokhov <[email protected]>

commit 06491e84f0f95dbe105b74fef32e7063e349f2d7
Author: Adam Thomson <[email protected]>
Date:   Tue Apr 8 13:55:17 2014 -0700

    Input: da9055_onkey - remove use of regmap_irq_get_virq()
    
    Using platform_get_irq_byname() to retrieve the IRQ number returns the
    VIRQ number rather than the local IRQ number for the device.  Passing that
    value then into regmap_irq_get_virq() causes a failure because the
    function is expecting the local IRQ number (e.g.  0, 1, 2, 3, etc).
    
    This patch removes use of regmap_irq_get_virq() to prevent this failure
    from happening.
    
    Signed-off-by: Adam Thomson <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Dmitry Torokhov <[email protected]>

commit 0a04b248532b358b27a8da050642da6f5f304b03
Author: Namjae Jeon <[email protected]>
Date:   Sat Apr 19 16:38:21 2014 -0400

    ext4: disable COLLAPSE_RANGE for bigalloc
    
    Once COLLAPSE RANGE is be disable for ext4 with bigalloc feature till finding
    root-cause of problem. It will be enable with fixing that regression of
    xfstest(generic 075 and 091) again.
    
    Signed-off-by: Namjae Jeon <[email protected]>
    Signed-off-by: Ashish Sangwan <[email protected]>
    Reviewed-by: Lukas Czerner <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>

commit a8680e0d5efd46aa54d7085e5b4a268f726922c7
Author: Namjae Jeon <[email protected]>
Date:   Sat Apr 19 16:37:31 2014 -0400

    ext4: fix COLLAPSE_RANGE failure with 1KB block size
    
    When formatting with 1KB or 2KB(not aligned with PAGE SIZE) block
    size, xfstests generic/075 and 091 are failing. The offset supplied to
    function truncate_pagecache_range is block size aligned. In this
    function start offset is re-aligned to PAGE_SIZE by rounding_up to the
    next page boundary.  Due to this rounding up, old data remains in the
    page cache when blocksize is less than page size and start offset is
    not aligned with page size.  In case of collapse range, we need to
    align start offset to page size boundary by doing a round down
    operation instead of round up.
    
    Signed-off-by: Namjae Jeon <[email protected]>
    Signed-off-by: Ashish Sangwan <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>

commit 24315814239a3fdb306244c99bd076bc79db4ade
Author: Christian König <[email protected]>
Date:   Sat Apr 19 18:57:14 2014 +0200

    drm/radeon: use fixed PPL ref divider if needed
    
    Signed-off-by: Christian König <[email protected]>

commit 76e6dcece841faebbee78895780e8209ff40d922
Author: Alex Deucher <[email protected]>
Date:   Fri Apr 18 09:08:11 2014 -0400

    drm/radeon: disable dpm on rv770 by default
    
    There seem to be stability issues on a number of cards.
    
    bugs:
    https://bugs.freedesktop.org/show_bug.cgi?id=76286
    https://bugzilla.redhat.com/show_bug.cgi?id=1085785
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741619
    
    Signed-off-by: Alex Deucher <[email protected]>
    Cc: [email protected]
    Cc: [email protected]
    Cc: [email protected]

commit 86f1ca3889142d5959362c5694db3f3dc26f377a
Author: Theodore Ts'o <[email protected]>
Date:   Fri Apr 18 11:52:11 2014 -0400

    ext4: use EINVAL if not a regular file in ext4_collapse_range()
    
    Signed-off-by: "Theodore Ts'o" <[email protected]>

commit 6c5e73d3a26b73bfcac0b4a932cb918177d067f2
Author: jon ernst <[email protected]>
Date:   Fri Apr 18 11:50:35 2014 -0400

    ext4: enforce we are operating on a regular file in ext4_zero_range()
    
    Signed-off-by: Jon Ernst <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>

commit 6dd834effc12ba71092d9d1e4944530234b58ab1
Author: Lukas Czerner <[email protected]>
Date:   Fri Apr 18 10:55:24 2014 -0400

    ext4: fix extent merging in ext4_ext_shift_path_extents()
    
    There is a bug in ext4_ext_shift_path_extents() where if we actually
    manage to merge a extent we would skip shifting the next extent. This
    will result in in one extent in the extent tree not being properly
    shifted.
    
    This is causing failure in various xfstests tests using fsx or fsstress
    with collapse range support. It will also cause file system corruption
    which looks something like:
    
     e2fsck 1.42.9 (4-Feb-2014)
     Pass 1: Checking inodes, blocks, and sizes
     Inode 20 has out of order extents
            (invalid logical block 3, physical block 492938, len 2)
     Clear? yes
     ...
    
    when running e2fsck.
    
    It's also very easily reproducible just by running fsx without any
    parameters. I can usually hit the problem within a minute.
    
    Fix it by increasing ex_start only if we're not merging the extent.
    
    Signed-off-by: Lukas Czerner <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>
    Reviewed-by: Namjae Jeon <[email protected]>

commit ef24f6c234de9a03aed9368163dbaad9a4f6391f
Author: Lukas Czerner <[email protected]>
Date:   Fri Apr 18 10:50:23 2014 -0400

    ext4: discard preallocations after removing space
    
    Currently in ext4_collapse_range() and ext4_punch_hole() we're
    discarding preallocation twice. Once before we attempt to do any changes
    and second time after we're done with the changes.
    
    While the second call to ext4_discard_preallocations() in
    ext4_punch_hole() case is not needed, we need to discard preallocation
    right after ext4_ext_remove_space() in collapse range case because in
    the case we had to restart a transaction in the middle of removing space
    we might have new preallocations created.
    
    Remove unneeded ext4_discard_preallocations() ext4_punch_hole() and move
    it to the better place in ext4_collapse_range()
    
    Signed-off-by: Lukas Czerner <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>

commit 9337d5d31ab798f0c74150506371551a9195251a
Author: Lukas Czerner <[email protected]>
Date:   Fri Apr 18 10:48:25 2014 -0400

    ext4: no need to truncate pagecache twice in collapse range
    
    We're already calling truncate_pagecache() before we attempt to do any
    actual job so there is not need to truncate pagecache once more using
    truncate_setsize() after we're finished.
    
    Remove truncate_setsize() and replace it just with i_size_write() note
    that we're holding appropriate locks.
    
    Signed-off-by: Lukas Czerner <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>

commit 2c1d23289bc2f7cfa358bc856b87a992dcb11ad5
Author: Lukas Czerner <[email protected]>
Date:   Fri Apr 18 10:43:21 2014 -0400

    ext4: fix removing status extents in ext4_collapse_range()
    
    Currently in ext4_collapse_range() when calling ext4_es_remove_extent() to
    remove status extents we're passing (EXT_MAX_BLOCKS - punch_start - 1)
    in order to remove all extents from start of the collapse range to the
    end of the file. However this is wrong because we might miss the
    possible extent covering the last block of the file.
    
    Fix it by removing the -1.
    
    Signed-off-by: Lukas Czerner <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>
    Reviewed-by: Namjae Jeon <[email protected]>

commit 1a66c7c3bea52ba0f7596b8940d74fce75281d16
Author: Lukas Czerner <[email protected]>
Date:   Fri Apr 18 10:41:52 2014 -0400

    ext4: use filemap_write_and_wait_range() correctly in collapse range
    
    Currently we're passing -1 as lend argumnet for
    filemap_write_and_wait_range() which is wrong since lend is signed type
    so it would cause some confusion and we might not write_and_wait for the
    entire range we're expecting to write.
    
    Fix it by using LLONG_MAX instead.
    
    Signed-off-by: Lukas Czerner <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>

commit 694c793fc1ade0946149c5f8d43f71e0728c4e81
Author: Lukas Czerner <[email protected]>
Date:   Fri Apr 18 10:21:15 2014 -0400

    ext4: use truncate_pagecache() in collapse range
    
    We should be using truncate_pagecache() instead of
    truncate_pagecache_range() in the collapse range because we're
    truncating page cache from offset to the end of file.
    truncate_pagecache() also get rid of the private COWed pages from the
    range because we're going to shift the end of the file.
    
    Signed-off-by: Lukas Czerner <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>

commit 50e02fd84543d82e663000e780e0ec0cfde52283
Author: Theodore Ts'o <[email protected]>
Date:   Mon Apr 14 23:37:35 2014 -0400

    ext4: remove temporary shim used to merge COLLAPSE_RANGE and ZERO_RANGE
    
    In retrospect, this was a bad way to handle things, since it limited
    testing of these patches.  We should just get the VFS level changes
    merged in first.
    
    Signed-off-by: "Theodore Ts'o" <[email protected]>

commit 036acea2ceabd19cb5734ae7a9d64c0a5ef90484
Author: Azat Khuzhin <[email protected]>
Date:   Mon Apr 14 23:36:15 2014 -0400

    ext4: fix ext4_count_free_clusters() with EXT4FS_DEBUG and bigalloc enabled
    
    With bigalloc enabled we must use EXT4_CLUSTERS_PER_GROUP() instead of
    EXT4_BLOCKS_PER_GROUP() otherwise we will go beyond the allocated buffer.
    
    $ mount -t ext4 /dev/vde /vde
    [   70.573993] EXT4-fs DEBUG (fs/ext4/mballoc.c, 2346): ext4_mb_alloc_groupinfo:
    [   70.575174] allocated s_groupinfo array for 1 meta_bg's
    [   70.576172] EXT4-fs DEBUG (fs/ext4/super.c, 2092): ext4_check_descriptors:
    [   70.576972] Checking group descriptorsBUG: unable to handle kernel paging request at ffff88006ab56000
    [   72.463686] IP: [<ffffffff81394eb9>] __bitmap_weight+0x2a/0x7f
    [   72.464168] PGD 295e067 PUD 2961067 PMD 7fa8e067 PTE 800000006ab56060
    [   72.464738] Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
    [   72.465139] Modules linked in:
    [   72.465402] CPU: 1 PID: 3560 Comm: mount Tainted: G        W    3.14.0-rc2-00069-ge57bce1 #60
    [   72.466079] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
    [   72.466505] task: ffff88007ce6c8a0 ti: ffff88006b7f0000 task.ti: ffff88006b7f0000
    [   72.466505] RIP: 0010:[<ffffffff81394eb9>]  [<ffffffff81394eb9>] __bitmap_weight+0x2a/0x7f
    [   72.466505] RSP: 0018:ffff88006b7f1c00  EFLAGS: 00010206
    [   72.466505] RAX: 0000000000000000 RBX: 000000000000050a RCX: 0000000000000040
    [   72.466505] RDX: 0000000000000000 RSI: 0000000000080000 RDI: 0000000000000000
    [   72.466505] RBP: ffff88006b7f1c28 R08: 0000000000000002 R09: 0000000000000000
    [   72.466505] R10: 000000000000babe R11: 0000000000000400 R12: 0000000000080000
    [   72.466505] R13: 0000000000000200 R14: 0000000000002000 R15: ffff88006ab55000
    [   72.466505] FS:  00007f43ba1fa840(0000) GS:ffff88007f800000(0000) knlGS:0000000000000000
    [   72.466505] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    [   72.466505] CR2: ffff88006ab56000 CR3: 000000006b7e6000 CR4: 00000000000006e0
    [   72.466505] Stack:
    [   72.466505]  ffff88006ab65000 0000000000000000 0000000000000000 0000000000010000
    [   72.466505]  ffff88006ab6f400 ffff88006b7f1c58 ffffffff81396bb8 0000000000010000
    [   72.466505]  0000000000000000 ffff88007b869a90 ffff88006a48a000 ffff88006b7f1c70
    [   72.466505] Call Trace:
    [   72.466505]  [<ffffffff81396bb8>] memweight+0x5f/0x8a
    [   72.466505]  [<ffffffff811c3b19>] ext4_count_free+0x13/0x21
    [   72.466505]  [<ffffffff811c396c>] ext4_count_free_clusters+0xdb/0x171
    [   72.466505]  [<ffffffff811e3bdd>] ext4_fill_super+0x117c/0x28ef
    [   72.466505]  [<ffffffff81391569>] ? vsnprintf+0x1c7/0x3f7
    [   72.466505]  [<ffffffff8114d8dc>] mount_bdev+0x145/0x19c
    [   72.466505]  [<ffffffff811e2a61>] ? ext4_calculate_overhead+0x2a1/0x2a1
    [   72.466505]  [<ffffffff811dab1d>] ext4_mount+0x15/0x17
    [   72.466505]  [<ffffffff8114e3aa>] mount_fs+0x67/0x150
    [   72.466505]  [<ffffffff811637ea>] vfs_kern_mount+0x64/0xde
    [   72.466505]  [<ffffffff81165d19>] do_mount+0x6fe/0x7f5
    [   72.466505]  [<ffffffff81126cc8>] ? strndup_user+0x3a/0xd9
    [   72.466505]  [<ffffffff8116604b>] SyS_mount+0x85/0xbe
    [   72.466505]  [<ffffffff81619e90>] tracesys+0xdd/0xe2
    [   72.466505] Code: c3 89 f0 b9 40 00 00 00 55 99 48 89 e5 41 57 f7 f9 41 56 49 89 ff 41 55 45 31 ed 41 54 41 89 f4 53 31 db 41 89 c6 45 39 ee 7e 10 <4b> 8b 3c ef 49 ff c5 e8 bf ff ff ff 01 c3 eb eb 31 c0 45 85 f6
    [   72.466505] RIP  [<ffffffff81394eb9>] __bitmap_weight+0x2a/0x7f
    [   72.466505]  RSP <ffff88006b7f1c00>
    [   72.466505] CR2: ffff88006ab56000
    [   72.466505] ---[ end trace 7d051a08ae138573 ]---
    Killed
    
    Signed-off-by: "Theodore Ts'o" <[email protected]>

commit b5539fa2d59d697b7b8e28b4d08da844ff60f7cf
Author: Mika Westerberg <[email protected]>
Date:   Tue Apr 1 13:03:00 2014 +0300

    gpio / ACPI: Prevent potential wrap of GPIO value on OpRegion read
    
    Dan Carpenter's static code checker reports:
    
     The patch 473ed7be0da0: "gpio / ACPI: Add support for ACPI GPIO
     operation regions" from Mar 14, 2014, leads to the following static
     checker warning:
    
      drivers/gpio/gpiolib-acpi.c:454 acpi_gpio_adr_space_handler()
      warn: should 'gpiod_get_raw_value(desc) << i' be a 64 bit type?
    
    This is due the fact that *value is of type u64 and gpiod_get_raw_value()
    returns int. Since i can be larger than 31, it is possible that the value
    returned gets wrapped.
    
    Fix this by casting the return of gpiod_get_raw_value() to u64 first before
    shift.
    
    Reported-by: Dan Carpenter <[email protected]>
    Signed-off-by: Mika Westerberg <[email protected]>
    Signed-off-by: Linus Walleij <[email protected]>

commit e9595f84a6273dffc5b75564d9b12a77630c529e
Author: Mika Westerberg <[email protected]>
Date:   Mon Mar 31 15:16:49 2014 +0300

    gpio / ACPI: Don't crash on NULL chip->dev
    
    Commit aa92b6f689ac (gpio / ACPI: Allocate ACPI specific data directly in
    acpi_gpiochip_add()) moved ACPI handle checking to acpi_gpiochip_add() but
    forgot to check whether chip->dev is NULL before dereferencing it.
    
    Since chip->dev pointer is optional we can end up with crash like following:
    
     BUG: unable to handle kernel NULL pointer dereference at 00000138
     IP: [<c126c2b3>] acpi_gpiochip_add+0x13/0x190
     *pde = 00000000
     Oops: 0000 [#1] PREEMPT SMP
     Modules linked in: ssb(+) ...
     CPU: 0 PID: 512 Comm: modprobe Tainted: G        W     3.14.0-rc7-next-20140324-t1 #24
     Hardware name: Dell Inc. Latitude D830                   /0UY141, BIOS A02 06/07/2007
     task: f5799900 ti: f543e000 task.ti: f543e000
     EIP: 0060:[<c126c2b3>] EFLAGS: 00010282 CPU: 0
     EIP is at acpi_gpiochip_add+0x13/0x190
     EAX: 00000000 EBX: f57824c4 ECX: 00000000 EDX: 00000000
     ESI: f57824c4 EDI: 00000010 EBP: f543fc54 ESP: f543fc40
      DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
     CR0: 8005003b CR2: 00000138 CR3: 355f8000 CR4: 000007d0
     Stack:
      f543fc5c fd1f7790 f57824c4 000000be 00000010 f543fc84 c1269f4e f543fc74
      fd1f78bd 00008002 f57822b0 f5782090 fd1f8400 00000286 fd1f9994 00000000
      f5782000 f543fc8c fd1f7e39 f543fcc8 fd1f0bd8 000000c0 00000000 00000000
     Call Trace:
      [<fd1f7790>] ? ssb_pcie_mdio_write+0xa0/0xd0 [ssb]
      [<c1269f4e>] gpiochip_add+0xee/0x300
      [<fd1f78bd>] ? ssb_pcicore_serdes_workaround+0xfd/0x140 [ssb]
      [<fd1f7e39>] ssb_gpio_init+0x89/0xa0 [ssb]
      [<fd1f0bd8>] ssb_attach_queued_buses+0xc8/0x2d0 [ssb]
      [<fd1f0f65>] ssb_bus_register+0x185/0x1f0 [ssb]
      [<fd1f3120>] ? ssb_pci_xtal+0x220/0x220 [ssb]
      [<fd1f106c>] ssb_bus_pcibus_register+0x2c/0x80 [ssb]
      [<fd1f40dc>] ssb_pcihost_probe+0x9c/0x110 [ssb]
      [<c1276c8f>] pci_device_probe+0x6f/0xc0
      [<c11bdb55>] ? sysfs_create_link+0x25/0x40
      [<c131d8b9>] driver_probe_device+0x79/0x360
      [<c1276512>] ? pci_match_device+0xb2/0xc0
      [<c131dc51>] __driver_attach+0x71/0x80
      [<c131dbe0>] ? __device_attach+0x40/0x40
      [<c131bd87>] bus_for_each_dev+0x47/0x80
      [<c131d3ae>] driver_attach+0x1e/0x20
      [<c131dbe0>] ? __device_attach+0x40/0x40
      [<c131d007>] bus_add_driver+0x157/0x230
      [<c131e219>] driver_register+0x59/0xe0
      ...
    
    Fix this by checking chip->dev pointer against NULL first. Also we can now
    remove redundant check in acpi_gpiochip_request/free_interrupts().
    
    Reported-by: Sabrina Dubroca <[email protected]>
    Signed-off-by: Mika Westerberg <[email protected]>
    Tested-by: Sabrina Dubroca <[email protected]>
    Acked-by: Alexandre Courbot <[email protected]>
    Tested-by: Josh Boyer <[email protected]>
    Signed-off-by: Linus Walleij <[email protected]>

commit 7633fb959b711a8d91548911eb087fb931c7b8e4
Author: Linus Walleij <[email protected]>
Date:   Wed Apr 9 13:20:38 2014 +0200

    gpio: set data first, then chip and handler
    
    During irq mapping, in irq_set_chip_and_handler() the process
    of setting this up may incur calls to lock the irqchip, which
    in turn may need to dereference and use the chip data. So set
    the data first, then set the chip and handler.
    
    Signed-off-by: Linus Walleij <[email protected]>

commit a18ed359bdddcded4f97ff5e2f07793ff9336913
Author: Dmitry Monakhov <[email protected]>
Date:   Sun Apr 13 15:41:13 2014 -0400

    ext4: always check ext4_ext_find_extent result
    
    Where are some places where logic guaranties us that extent we are
    searching exits, but this may not be true due to on-disk data
    corruption. If such corruption happens we must prevent possible
    null pointer dereferences.
    
    Signed-off-by: Dmitry Monakhov <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>

commit 8dc79ec4c0537e1b83c0739af82a7babefb30012
Author: Dmitry Monakhov <[email protected]>
Date:   Sun Apr 13 15:05:42 2014 -0400

    ext4: fix error handling in ext4_ext_shift_extents
    
    Fix error handling by adding some.  :-)
    
    Signed-off-by: Dmitry Monakhov <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>

commit e2cbd587418251bb73c4c1e8e2c7c1816d7a98d9
Author: jon ernst <[email protected]>
Date:   Sat Apr 12 23:01:28 2014 -0400

    ext4: silence sparse check warning for function ext4_trim_extent
    
    This fixes the following sparse warning:
    
         CHECK   fs/ext4/mballoc.c
       fs/ext4/mballoc.c:5019:9: warning: context imbalance in
       'ext4_trim_extent' - unexpected unlock
    
    Signed-off-by: "Jon Ernst" <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>

commit 40c406c74eb9eed58ae7d4d12a0197f7279c9499
Author: Theodore Ts'o <[email protected]>
Date:   Sat Apr 12 22:53:53 2014 -0400

    ext4: COLLAPSE_RANGE only works on extent-based files
    
    Unfortunately, we weren't checking to make sure of this the inode was
    extent-based before attempt operate on it.  Hilarity ensues.
    
    Signed-off-by: "Theodore Ts'o" <[email protected]>
    Cc: Namjae Jeon <[email protected]>

commit 847c6c422aa0ae81a5517a9558ec2737806dca48
Author: Zheng Liu <[email protected]>
Date:   Sat Apr 12 12:45:55 2014 -0400

    ext4: fix byte order problems introduced by the COLLAPSE_RANGE patches
    
    This commit tries to fix some byte order issues that is found by sparse
    check.
    
    $ make M=fs/ext4 C=2 CF=-D__CHECK_ENDIAN__
    ...
      CHECK   fs/ext4/extents.c
    fs/ext4/extents.c:5232:41: warning: restricted __le32 degrades to integer
    fs/ext4/extents.c:5236:52: warning: bad assignment (-=) to restricted __le32
    fs/ext4/extents.c:5258:45: warning: bad assignment (-=) to restricted __le32
    fs/ext4/extents.c:5303:28: warning: restricted __le32 degrades to integer
    fs/ext4/extents.c:5318:18: warning: incorrect type in assignment (different base types)
    fs/ext4/extents.c:5318:18:    expected unsigned int [unsigned] [usertype] ex_start
    fs/ext4/extents.c:5318:18:    got restricted __le32 [usertype] ee_block
    fs/ext4/extents.c:5319:24: warning: restricted __le32 degrades to integer
    fs/ext4/extents.c:5334:31: warning: incorrect type in assignment (different base types)
    ...
    
    Cc: Andreas Dilger <[email protected]>
    Cc: Namjae Jeon <[email protected]>
    Signed-off-by: Zheng Liu <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>

commit 6e6358fc3c3c862bfe9a5bc029d3f8ce43dc9765
Author: Theodore Ts'o <[email protected]>
Date:   Sat Apr 12 12:45:25 2014 -0400

    ext4: use i_size_read in ext4_unaligned_aio()
    
    We haven't taken i_mutex yet, so we need to use i_size_read().
    
    Signed-off-by: "Theodore Ts'o" <[email protected]>
    Cc: [email protected]

commit 0790b31b69374ddadefebb156251b319e5b43345
Author: Lukas Czerner <[email protected]>
Date:   Sat Apr 12 10:05:37 2014 -0400

    fs: disallow all fallocate operation on active swapfile
    
    Currently some file system have IS_SWAPFILE check in their fallocate
    implementations and some do not. However we should really prevent any
    fallocate operation on swapfile so move the check to vfs and remove the
    redundant checks from the file systems fallocate implementations.
    
    Signed-off-by: Lukas Czerner <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>

commit 23fffa925ea2c9a2bcb1a4453e2c542635aa3545
Author: Lukas Czerner <[email protected]>
Date:   Sat Apr 12 09:56:41 2014 -0400

    fs: move falloc collapse range check into the filesystem methods
    
    Currently in do_fallocate in collapse range case we're checking
    whether offset + len is not bigger than i_size.  However there is
    nothing which would prevent i_size from changing so the check is
    pointless.  It should be done in the file system itself and the file
    system needs to make sure that i_size is not going to change.  The
    i_size check for the other fallocate modes are also done in the
    filesystems.
    
    As it is now we can easily crash the kernel by having two processes
    doing truncate and fallocate collapse range at the same time.  This
    can be reproduced on ext4 and it is theoretically possible on xfs even
    though I was not able to trigger it with this simple test.
    
    This commit removes the check from do_fallocate and adds it to the
    file system.
    
    Signed-off-by: Lukas Czerner <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>
    Acked-by: Dave Chinner <[email protected]>
    Reviewed-by: Christoph Hellwig <[email protected]>

commit 8fc61d92630d1c96057a94c61e1643475045b25b
Author: Lukas Czerner <[email protected]>
Date:   Sat Apr 12 09:51:34 2014 -0400

    fs: prevent doing FALLOC_FL_ZERO_RANGE on append only file
    
    Currently punch hole and collapse range fallocate operation are not
    allowed on append only file. This should be case for zero range as well.
    Fix it by allowing only pure fallocate (possibly with keep size set).
    
    Signed-off-by: Lukas Czerner <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>

commit 9ef06cec7c96f6bf59f1dd8b64b9645820099051
Author: Lukas Czerner <[email protected]>
Date:   Sat Apr 12 09:47:00 2014 -0400

    ext4: remove unnecessary check for APPEND and IMMUTABLE
    
    All the checks IS_APPEND and IS_IMMUTABLE for the fallocate operation on
    the inode are done in vfs. No need to do this again in ext4. Remove it.
    
    Signed-off-by: Lukas Czerner <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>

commit 622cad1325e404598fe3b148c3fa640dbaabc235
Author: Theodore Ts'o <[email protected]>
Date:   Fri Apr 11 10:35:17 2014 -0400

    ext4: move ext4_update_i_disksize() into mpage_map_and_submit_extent()
    
    The function ext4_update_i_disksize() is used in only one place, in
    the function mpage_map_and_submit_extent().  Move its code to simplify
    the code paths, and also move the call to ext4_mark_inode_dirty() into
    the i_data_sem's critical region, to be consistent with all of the
    other places where we update i_disksize.  That way, we also keep the
    raw_inode's i_disksize protected, to avoid the following race:
    
          CPU #1                                 CPU #2
    
       down_write(&i_data_sem)
       Modify i_disk_size
       up_write(&i_data_sem)
                                            down_write(&i_data_sem)
                                            Modify i_disk_size
                                            Copy i_disk_size to on-disk inode
                                            up_write(&i_data_sem)
       Copy i_disk_size to on-disk inode
    
    Signed-off-by: "Theodore Ts'o" <[email protected]>
    Reviewed-by: Jan Kara <[email protected]>
    Cc: [email protected]

commit c57ab39b9658315a742b6e61fdc86bb4d20cf566
Author: Younger Liu <[email protected]>
Date:   Thu Apr 10 23:03:43 2014 -0400

    ext4: return ENOMEM rather than EIO when find_###_page() fails
    
    Return ENOMEM rather than EIO when find_get_page() fails in
    ext4_mb_get_buddy_page_lock() and find_or_create_page() fails in
    ext4_mb_load_buddy().
    
    Signed-off-by: Younger Liu <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>

commit 1ce01c4a199c50b023802be25261c0c02b2f0214
Author: Namjae Jeon <[email protected]>
Date:   Thu Apr 10 22:58:20 2014 -0400

    ext4: fix COLLAPSE_RANGE test failure in data journalling mode
    
    When mounting ext4 with data=journal option, xfstest shared/002 and
    shared/004 are currently failing as checksum computed for testfile
    does not match with the checksum computed in other journal modes.
    In case of data=journal mode, a call to filemap_write_and_wait_range
    will not flush anything to disk as buffers are not marked dirty in
    write_end. In collapse range this call is followed by a call to
    truncate_pagecache_range. Due to this, when checksum is computed,
    a portion of file is re-read from disk which replace valid data with
    NULL bytes and hence the reason for the difference in checksum.
    
    Calling ext4_force_commit before filemap_write_and_wait_range solves
    the issue as it will mark the buffers dirty during commit transaction
    which can be later synced by a call to filemap_write_and_wait_range.
    
    Signed-off-by: Namjae Jeon <[email protected]>
    Signed-off-by: Ashish Sangwan <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>

commit 87f7e41636ff201148443551d06bc74497160aac
Author: Theodore Ts'o <[email protected]>
Date:   Tue Apr 8 11:38:28 2014 -0400

    ext4: update PF_MEMALLOC handling in ext4_write_inode()
    
    The special handling of PF_MEMALLOC callers in ext4_write_inode()
    shouldn't be necessary as there shouldn't be any. Warn about it. Also
    update comment before the function as it seems somewhat outdated.
    
    (Changes modeled on an ext3 patch posted by Jan Kara to the linux-ext4
    mailing list on Februaryt 28, 2014, which apparently never went into
    the ext3 tree.)
    
    Signed-off-by: "Theodore Ts'o" <[email protected]>
    Cc: Jan Kara <[email protected]>

commit ec4cb1aa2b7bae18dd8164f2e9c7c51abcf61280
Author: Jan Kara <[email protected]>
Date:   Mon Apr 7 10:54:21 2014 -0400

    ext4: fix jbd2 warning under heavy xattr load
    
    When heavily exercising xattr code the assertion that
    jbd2_journal_dirty_metadata() shouldn't return error was triggered:
    
    WARNING: at /srv/autobuild-ceph/gitbuilder.git/build/fs/jbd2/transaction.c:1237
    jbd2_journal_dirty_metadata+0x1ba/0x260()
    
    CPU: 0 PID: 8877 Comm: ceph-osd Tainted: G    W 3.10.0-ceph-00049-g68d04c9 #1
    Hardware name: Dell Inc. PowerEdge R410/01V648, BIOS 1.6.3 02/07/2011
     ffffffff81a1d3c8 ffff880214469928 ffffffff816311b0 ffff880214469968
     ffffffff8103fae0 ffff880214469958 ffff880170a9dc30 ffff8802240fbe80
     0000000000000000 ffff88020b366000 ffff8802256e7510 ffff880214469978
    Call Trace:
     [<ffffffff816311b0>] dump_stack+0x19/0x1b
     [<ffffffff8103fae0>] warn_slowpath_common+0x70/0xa0
     [<ffffffff8103fb2a>] warn_slowpath_null+0x1a/0x20
     [<ffffffff81267c2a>] jbd2_journal_dirty_metadata+0x1ba/0x260
     [<ffffffff81245093>] __ext4_handle_dirty_metadata+0xa3/0x140
     [<ffffffff812561f3>] ext4_xattr_release_block+0x103/0x1f0
     [<ffffffff81256680>] ext4_xattr_block_set+0x1e0/0x910
     [<ffffffff8125795b>] ext4_xattr_set_handle+0x38b/0x4a0
     [<ffffffff810a319d>] ? trace_hardirqs_on+0xd/0x10
     [<ffffffff81257b32>] ext4_xattr_set+0xc2/0x140
     [<ffffffff81258547>] ext4_xattr_user_set+0x47/0x50
     [<ffffffff811935ce>] generic_setxattr+0x6e/0x90
     [<ffffffff81193ecb>] __vfs_setxattr_noperm+0x7b/0x1c0
     [<ffffffff811940d4>] vfs_setxattr+0xc4/0xd0
     [<ffffffff8119421e>] setxattr+0x13e/0x1e0
     [<ffffffff811719c7>] ? __sb_start_write+0xe7/0x1b0
     [<ffffffff8118f2e8>] ? mnt_want_write_file+0x28/0x60
     [<ffffffff8118c65c>] ? fget_light+0x3c/0x130
     [<ffffffff8118f2e8>] ? mnt_want_write_file+0x28/0x60
     [<ffffffff8118f1f8>] ? __mnt_want_write+0x58/0x70
     [<ffffffff811946be>] SyS_fsetxattr+0xbe/0x100
     [<ffffffff816407c2>] system_call_fastpath+0x16/0x1b
    
    The reason for the warning is that buffer_head passed into
    jbd2_journal_dirty_metadata() didn't have journal_head attached. This is
    caused by the following race of two ext4_xattr_release_block() calls:
    
    CPU1                                CPU2
    ext4_xattr_release_block()          ext4_xattr_release_block()
    lock_buffer(bh);
    /* False */
    if (BHDR(bh)->h_refcount == cpu_to_le32(1))
    } else {
      le32_add_cpu(&BHDR(bh)->h_refcount, -1);
      unlock_buffer(bh);
                                        lock_buffer(bh);
                                        /* True */
                                        if (BHDR(bh)->h_refcount == cpu_to_le32(1))
                                          get_bh(bh);
                                          ext4_free_blocks()
                                            ...
                                            jbd2_journal_forget()
                                              jbd2_journal_unfile_buffer()
                                              -> JH is gone
      error = ext4_handle_dirty_xattr_block(handle, inode, bh);
      -> triggers the warning
    
    We fix the problem by moving ext4_handle_dirty_xattr_block() under the
    buffer lock. Sadly this cannot be done in nojournal mode as that
    function can call sync_dirty_buffer() which would deadlock. Luckily in
    nojournal mode the race is harmless (we only dirty already freed buffer)
    and thus for nojournal mode we leave the dirtying outside of the buffer
    lock.
    
    Reported-by: Sage Weil <[email protected]>
    Signed-off-by: Jan Kara <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>
    Cc: [email protected]

commit 9503c67c93ed0b95ba62d12d1fd09da6245dbdd6
Author: Matthew Wilcox <[email protected]>
Date:   Mon Apr 7 10:54:20 2014 -0400

    ext4: note the error in ext4_end_bio()
    
    ext4_end_bio() currently throws away the error that it receives.  Chances
    are this is part of a spate of errors, one of which will end up getting
    the error returned to userspace somehow, but we shouldn't take that risk.
    Also print out the errno to aid in debug.
    
    Signed-off-by: Matthew Wilcox <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>
    Reviewed-by: Jan Kara <[email protected]>
    Cc: [email protected]

commit 007649375f6af242d5b1df2c15996949714303ba
Author: Azat Khuzhin <[email protected]>
Date:   Mon Apr 7 10:54:20 2014 -0400

    ext4: initialize multi-block allocator before checking block descriptors
    
    With EXT4FS_DEBUG ext4_count_free_clusters() will call
    ext4_read_block_bitmap() without s_group_info initialized, so we need to
    initialize multi-block allocator before.
    
    And dependencies that must be solved, to allow this:
    - multi-block allocator needs in group descriptors
    - need to install s_op before initializing multi-block allocator,
      because in ext4_mb_init_backend() new inode is created.
    - initialize number of group desc blocks (s_gdb_count) otherwise
      number of clusters returned by ext4_free_clusters_after_init() is not correct.
      (see ext4_bg_num_gdb_nometa())
    
    Here is the stack backtrace:
    
    (gdb) bt
     #0  ext4_get_group_info (group=0, sb=0xffff880079a10000) at ext4.h:2430
     #1  ext4_validate_block_bitmap (sb=sb@entry=0xffff880079a10000,
         desc=desc@entry=0xffff880056510000, block_group=block_group@entry=0,
         bh=bh@entry=0xffff88007bf2b2d8) at balloc.c:358
     #2  0xffffffff81232202 in ext4_wait_block_bitmap (sb=sb@entry=0xffff880079a10000,
         block_group=block_group@entry=0,
         bh=bh@entry=0xffff88007bf2b2d8) at balloc.c:476
     #3  0xffffffff81232eaf in ext4_read_block_bitmap (sb=sb@entry=0xffff880079a10000,
         block_group=block_group@entry=0) at balloc.c:489
     #4  0xffffffff81232fc0 in ext4_count_free_clusters (sb=sb@entry=0xffff880079a10000) at balloc.c:665
     #5  0xffffffff81259ffa in ext4_check_descriptors (first_not_zeroed=<synthetic pointer>,
         sb=0xffff880079a10000) at super.c:2143
     #6  ext4_fill_super (sb=sb@entry=0xffff880079a10000, data=<optimized out>,
         data@entry=0x0 <irq_stack_union>, silent=silent@entry=0) at super.c:3851
         ...
    
    Signed-off-by: Azat Khuzhin <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>

commit 4adb6ab3e0fa71363a5ef229544b2d17de6600d7
Author: Kazuya Mio <[email protected]>
Date:   Mon Apr 7 10:53:28 2014 -0400

    ext4: FIBMAP ioctl causes BUG_ON due to handle EXT_MAX_BLOCKS
    
    When we try to get 2^32-1 block of the file which has the extent
    (ee_block=2^32-2, ee_len=1) with FIBMAP ioctl, it causes BUG_ON
    in ext4_ext_put_gap_in_cache().
    
    To avoid the problem, ext4_map_blocks() needs to check the file logical block
    number. ext4_ext_put_gap_in_cache() called via ext4_map_blocks() cannot
    handle 2^32-1 because the maximum file logical block number is 2^32-2.
    
    Note that ext4_ind_map_blocks() returns -EIO when the block number is invalid.
    So ext4_map_blocks() should also return the same errno.
    
    Signed-off-by: Kazuya Mio <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>
    Cc: [email protected]

commit 666525dfbdca09bbd4848ac711e4a4dbd6921325
Author: Chen Gang <[email protected]>
Date:   Mon Apr 7 10:18:56 2014 -0400

    ext4: fix 64-bit number truncation warning
    
    '0x7FDEADBEEF' will be truncated to 32-bit number under unicore32. Need
    append 'ULL' for it.
    
    The related warning (with allmodconfig under unicore32):
    
        CC [M]  fs/ext4/extents_status.o
      fs/ext4/extents_status.c: In function "__es_remove_extent":
      fs/ext4/extents_status.c:813: warning: integer constant is too large for "long" type
    
    Signed-off-by: Chen Gang <[email protected]>
    Signed-off-by: "Theodore Ts'o" <[email protected]>

commit 378ed3ccd2a0404d031e771b65aa3af221ea8aea
Author: Andy Lutomirski <[email protected]>
Date:   Thu Apr 3 10:53:43 2014 -0700

    x86, vdso: Make the vdso linker script compatible with Gold
    
    Gold can't parse the script due to:
    https://sourceware.org/bugzilla/show_bug.cgi?id=16804
    
    With a workaround in place for that issue, Gold 2.23 crashes due to:
    https://sourceware.org/bugzilla/show_bug.cgi?id=15355
    
    This works around the former bug and avoids the second by removing
    the unnecessary vvar and hpet sections and segments.  The vdso and
    hpet symbols are still there, and nothing needed the sections or
    segments.
    
    Reported-by: Markus Trippelsdorf <[email protected]>
    Signed-off-by: Andy Lutomirski <[email protected]>
    Link: http://lkml.kernel.org/r/243fa205098d112ec759c9b1b26785c09f399833.1396547532.git.luto@amacapital.net
    Signed-off-by: H. Peter Anvin <[email protected]>
brianlilly pushed a commit to crystalfontz/cfa_10036_kernel that referenced this pull request May 9, 2014
commit b07c265 upstream.

The combination of two commits:
commit 8e4e171
("openvswitch: Simplify datapath locking.")
commit 2537b4d
("openvswitch:: link upper device for port devices")

introduced a bug where upper_dev wasn't unlinked upon
netdev_unregister notification

The following steps:

  modprobe openvswitch
  ovs-dpctl add-dp test
  ip tuntap add dev tap1 mode tap
  ovs-dpctl add-if test tap1
  ip tuntap del dev tap1 mode tap

are causing multiple warnings:

[   62.747557] gre: GRE over IPv4 demultiplexor driver
[   62.749579] openvswitch: Open vSwitch switching datapath
[   62.755087] device test entered promiscuous mode
[   62.765911] device tap1 entered promiscuous mode
[   62.766033] IPv6: ADDRCONF(NETDEV_UP): tap1: link is not ready
[   62.769017] ------------[ cut here ]------------
[   62.769022] WARNING: CPU: 1 PID: 3267 at net/core/dev.c:5501 rollback_registered_many+0x20f/0x240()
[   62.769023] Modules linked in: openvswitch gre vxlan ip_tunnel libcrc32c ip6table_filter ip6_tables ebtable_nat ebtables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_CHECKSUM iptable_mangle ipt_REJECT xt_tcpudp iptable_filter ip_tables x_tables bridge stp llc vhost_net macvtap macvlan vhost kvm_intel kvm dm_crypt iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi hid_generic mxm_wmi eeepc_wmi asus_wmi sparse_keymap dm_multipath psmouse serio_raw usbhid hid parport_pc ppdev firewire_ohci lpc_ich firewire_core e1000e crc_itu_t binfmt_misc igb dca ptp pps_core mac_hid wmi lp parport i2o_config i2o_block video
[   62.769051] CPU: 1 PID: 3267 Comm: ip Not tainted 3.12.0-rc3+ torvalds#60
[   62.769052] Hardware name: System manufacturer System Product Name/P8Z77 WS, BIOS 3007 07/26/2012
[   62.769053]  0000000000000009 ffff8807f25cbd28 ffffffff8175e575 0000000000000006
[   62.769055]  0000000000000000 ffff8807f25cbd68 ffffffff8105314c ffff8807f25cbd58
[   62.769057]  ffff8807f2634000 ffff8807f25cbdc8 ffff8807f25cbd88 ffff8807f25cbdc8
[   62.769059] Call Trace:
[   62.769062]  [<ffffffff8175e575>] dump_stack+0x55/0x76
[   62.769065]  [<ffffffff8105314c>] warn_slowpath_common+0x8c/0xc0
[   62.769067]  [<ffffffff8105319a>] warn_slowpath_null+0x1a/0x20
[   62.769069]  [<ffffffff8162a04f>] rollback_registered_many+0x20f/0x240
[   62.769071]  [<ffffffff8162a101>] rollback_registered+0x31/0x40
[   62.769073]  [<ffffffff8162a488>] unregister_netdevice_queue+0x58/0x90
[   62.769075]  [<ffffffff8154f900>] __tun_detach+0x140/0x340
[   62.769077]  [<ffffffff8154fb36>] tun_chr_close+0x36/0x60
[   62.769080]  [<ffffffff811bddaf>] __fput+0xff/0x260
[   62.769082]  [<ffffffff811bdf5e>] ____fput+0xe/0x10
[   62.769084]  [<ffffffff8107b515>] task_work_run+0xb5/0xe0
[   62.769087]  [<ffffffff810029b9>] do_notify_resume+0x59/0x80
[   62.769089]  [<ffffffff813a41fe>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[   62.769091]  [<ffffffff81770f5a>] int_signal+0x12/0x17
[   62.769093] ---[ end trace 838756c62e156ffb ]---
[   62.769481] ------------[ cut here ]------------
[   62.769485] WARNING: CPU: 1 PID: 92 at fs/sysfs/inode.c:325 sysfs_hash_and_remove+0xa9/0xb0()
[   62.769486] sysfs: can not remove 'master', no directory
[   62.769486] Modules linked in: openvswitch gre vxlan ip_tunnel libcrc32c ip6table_filter ip6_tables ebtable_nat ebtables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_CHECKSUM iptable_mangle ipt_REJECT xt_tcpudp iptable_filter ip_tables x_tables bridge stp llc vhost_net macvtap macvlan vhost kvm_intel kvm dm_crypt iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi hid_generic mxm_wmi eeepc_wmi asus_wmi sparse_keymap dm_multipath psmouse serio_raw usbhid hid parport_pc ppdev firewire_ohci lpc_ich firewire_core e1000e crc_itu_t binfmt_misc igb dca ptp pps_core mac_hid wmi lp parport i2o_config i2o_block video
[   62.769514] CPU: 1 PID: 92 Comm: kworker/1:2 Tainted: G        W    3.12.0-rc3+ torvalds#60
[   62.769515] Hardware name: System manufacturer System Product Name/P8Z77 WS, BIOS 3007 07/26/2012
[   62.769518] Workqueue: events ovs_dp_notify_wq [openvswitch]
[   62.769519]  0000000000000009 ffff880807ad3ac8 ffffffff8175e575 0000000000000006
[   62.769521]  ffff880807ad3b18 ffff880807ad3b08 ffffffff8105314c ffff880807ad3b28
[   62.769523]  0000000000000000 ffffffff81a87a1f ffff8807f2634000 ffff880037038500
[   62.769525] Call Trace:
[   62.769528]  [<ffffffff8175e575>] dump_stack+0x55/0x76
[   62.769529]  [<ffffffff8105314c>] warn_slowpath_common+0x8c/0xc0
[   62.769531]  [<ffffffff81053236>] warn_slowpath_fmt+0x46/0x50
[   62.769533]  [<ffffffff8123e7e9>] sysfs_hash_and_remove+0xa9/0xb0
[   62.769535]  [<ffffffff81240e96>] sysfs_remove_link+0x26/0x30
[   62.769538]  [<ffffffff81631ef7>] __netdev_adjacent_dev_remove+0xf7/0x150
[   62.769540]  [<ffffffff81632037>] __netdev_adjacent_dev_unlink_lists+0x27/0x50
[   62.769542]  [<ffffffff8163213a>] __netdev_adjacent_dev_unlink_neighbour+0x3a/0x50
[   62.769544]  [<ffffffff8163218d>] netdev_upper_dev_unlink+0x3d/0x140
[   62.769548]  [<ffffffffa033c2db>] netdev_destroy+0x4b/0x80 [openvswitch]
[   62.769550]  [<ffffffffa033b696>] ovs_vport_del+0x46/0x60 [openvswitch]
[   62.769552]  [<ffffffffa0335314>] ovs_dp_detach_port+0x44/0x60 [openvswitch]
[   62.769555]  [<ffffffffa0336574>] ovs_dp_notify_wq+0xb4/0x150 [openvswitch]
[   62.769557]  [<ffffffff81075c28>] process_one_work+0x1d8/0x6a0
[   62.769559]  [<ffffffff81075bc8>] ? process_one_work+0x178/0x6a0
[   62.769562]  [<ffffffff8107659b>] worker_thread+0x11b/0x370
[   62.769564]  [<ffffffff81076480>] ? rescuer_thread+0x350/0x350
[   62.769566]  [<ffffffff8107f44a>] kthread+0xea/0xf0
[   62.769568]  [<ffffffff8107f360>] ? flush_kthread_worker+0x150/0x150
[   62.769570]  [<ffffffff81770bac>] ret_from_fork+0x7c/0xb0
[   62.769572]  [<ffffffff8107f360>] ? flush_kthread_worker+0x150/0x150
[   62.769573] ---[ end trace 838756c62e156ffc ]---
[   62.769574] ------------[ cut here ]------------
[   62.769576] WARNING: CPU: 1 PID: 92 at fs/sysfs/inode.c:325 sysfs_hash_and_remove+0xa9/0xb0()
[   62.769577] sysfs: can not remove 'upper_test', no directory
[   62.769577] Modules linked in: openvswitch gre vxlan ip_tunnel libcrc32c ip6table_filter ip6_tables ebtable_nat ebtables nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_CHECKSUM iptable_mangle ipt_REJECT xt_tcpudp iptable_filter ip_tables x_tables bridge stp llc vhost_net macvtap macvlan vhost kvm_intel kvm dm_crypt iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi hid_generic mxm_wmi eeepc_wmi asus_wmi sparse_keymap dm_multipath psmouse serio_raw usbhid hid parport_pc ppdev firewire_ohci lpc_ich firewire_core e1000e crc_itu_t binfmt_misc igb dca ptp pps_core mac_hid wmi lp parport i2o_config i2o_block video
[   62.769603] CPU: 1 PID: 92 Comm: kworker/1:2 Tainted: G        W    3.12.0-rc3+ torvalds#60
[   62.769604] Hardware name: System manufacturer System Product Name/P8Z77 WS, BIOS 3007 07/26/2012
[   62.769606] Workqueue: events ovs_dp_notify_wq [openvswitch]
[   62.769607]  0000000000000009 ffff880807ad3ac8 ffffffff8175e575 0000000000000006
[   62.769609]  ffff880807ad3b18 ffff880807ad3b08 ffffffff8105314c ffff880807ad3b58
[   62.769611]  0000000000000000 ffff880807ad3bd9 ffff8807f2634000 ffff880037038500
[   62.769613] Call Trace:
[   62.769615]  [<ffffffff8175e575>] dump_stack+0x55/0x76
[   62.769617]  [<ffffffff8105314c>] warn_slowpath_common+0x8c/0xc0
[   62.769619]  [<ffffffff81053236>] warn_slowpath_fmt+0x46/0x50
[   62.769621]  [<ffffffff8123e7e9>] sysfs_hash_and_remove+0xa9/0xb0
[   62.769622]  [<ffffffff81240e96>] sysfs_remove_link+0x26/0x30
[   62.769624]  [<ffffffff81631f22>] __netdev_adjacent_dev_remove+0x122/0x150
[   62.769627]  [<ffffffff81632037>] __netdev_adjacent_dev_unlink_lists+0x27/0x50
[   62.769629]  [<ffffffff8163213a>] __netdev_adjacent_dev_unlink_neighbour+0x3a/0x50
[   62.769631]  [<ffffffff8163218d>] netdev_upper_dev_unlink+0x3d/0x140
[   62.769633]  [<ffffffffa033c2db>] netdev_destroy+0x4b/0x80 [openvswitch]
[   62.769636]  [<ffffffffa033b696>] ovs_vport_del+0x46/0x60 [openvswitch]
[   62.769638]  [<ffffffffa0335314>] ovs_dp_detach_port+0x44/0x60 [openvswitch]
[   62.769640]  [<ffffffffa0336574>] ovs_dp_notify_wq+0xb4/0x150 [openvswitch]
[   62.769642]  [<ffffffff81075c28>] process_one_work+0x1d8/0x6a0
[   62.769644]  [<ffffffff81075bc8>] ? process_one_work+0x178/0x6a0
[   62.769646]  [<ffffffff8107659b>] worker_thread+0x11b/0x370
[   62.769648]  [<ffffffff81076480>] ? rescuer_thread+0x350/0x350
[   62.769650]  [<ffffffff8107f44a>] kthread+0xea/0xf0
[   62.769652]  [<ffffffff8107f360>] ? flush_kthread_worker+0x150/0x150
[   62.769654]  [<ffffffff81770bac>] ret_from_fork+0x7c/0xb0
[   62.769656]  [<ffffffff8107f360>] ? flush_kthread_worker+0x150/0x150
[   62.769657] ---[ end trace 838756c62e156ffd ]---
[   62.769724] device tap1 left promiscuous mode

This patch also affects moving devices between net namespaces.

OVS used to ignore netns move notifications which caused problems.
Like:
  ovs-dpctl add-if test tap1
  ip link set tap1 netns 3512
and then removing tap1 inside the namespace will cause hang on missing dev_put.

With this patch OVS will detach dev upon receiving netns move event.

Signed-off-by: Alexei Starovoitov <[email protected]>
Signed-off-by: Jesse Gross <[email protected]>
Signed-off-by: Jiri Slaby <[email protected]>
sr105 referenced this pull request in RealDigitalMedia/linux-shuttle Jun 3, 2014
The pdata->pdev is initialized at platform code, if init
fails at first, it will be not initialized, and platform exit
will not be called. This also fixes an oop when config usb
module wrongly:

Unable to handle kernel NULL pointer dereference at virtual address 0000005
pgd = ba1c4000
[0000005] *pgd=4a145831, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [Freescale#1] PREEMPT SMP
Modules linked in: ehci_hcd(+) usbcore
CPU: 1    Not tainted  (3.0.35-02451-ge361da1 Freescale#60)
PC is at fsl_usb_host_uninit_ext+0xc/0x28
LR is at usb_hcd_fsl_probe+0x2c8/0x44c [ehci_hcd]
pc : [<80062b58>]    lr : [<7f060934>]    psr: a0000013
sp : ba11be80  ip : 00005027  fp : 000a76e0
r10: 00000048  r9 : ba11a000  r8 : bfd4d608
r7 : ffffffed  r6 : bfd4d600  r5 : bfc84400  r4 : 80aaee48
r3 : 80062b4c  r2 : 00000000  r1 : 60000093  r0 : 00000000
Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 10c53c7d  Table: 4a1c404a  DAC: 00000015
Process modprobe (pid: 1555, stack limit = 0xba11a2f0)
Stack: (0xba11be80 to 0xba11c000)
be80: bfd97600 7f060934 00000000 00000000 bfd4d608 bfd4d608 80aca808 bfd4d63c
bea0: 7f062bd4 80041704 ba11a000 00000000 000a76e0 802a5cec bfd4d608 802a4a14
bec0: bfd4d608 7f062bd4 bfd4d63c 00000000 80041704 802a4bac 7f062bd4 ba11bee
bee0: 802a4b2 802a4254 bffd4040 bff03f38 7f065000 7f062bd4 80a934c8 bfc8cd20
bf00: 00000000 802a3be0 7f062b1c 7f062bd4 00000000 7f017ec8 7f062bd4 00000000
bf20: 7f065000 80041704 00000000 802a51a0 7f017ec8 80aae500 00000000 7f065000
bf40: 80041704 7f065058 000a79e8 8003b4c4 00000000 00000000 00000000 80a14834
bf60: 000a79e8 000a79e8 7f062c20 00000000 0000e67b 80041704 ba11a000 00000000
bf80: 000a76e0 800aa428 ba076740 800f58dc 000a79e8 0000e67b 00000000 000a75d0
bfa0: 00000080 80041580 0000e67b 00000000 000a79e8 0000e67b 000a75d0 000a76e0
bfc0: 0000e67b 00000000 000a75d0 00000080 000a6a78 00000008 000a76a0 000a76e0
bfe0: 7ec7ab50 7ec7ab40 0001a32c 2ace6490 20000010 000a79e8 4fffe821 4fffec21
[<80062b58>] (fsl_usb_host_uninit_ext+0xc/0x28) from [<7f060934>]
	(usb_hcd_fsl_probe+0x2c8/0x44c [ehci_hcd])
[<7f060934>] (usb_hcd_fsl_probe+0x2c8/0x44c [ehci_hcd]) from [<802a5cec>]
	(platform_drv_probe+0x18/0x1c)
[<802a5cec>] (platform_drv_probe+0x18/0x1c) from [<802a4a14>]
	(driver_probe_device+0x98/0x1a4)
[<802a4a14>] (driver_probe_device+0x98/0x1a4) from [<802a4bac>]
	(__driver_attach+0x8c/0x90)
[<802a4bac>] (__driver_attach+0x8c/0x90) from [<802a4254>]
	(bus_for_each_dev+0x60/0x8c)
[<802a4254>] (bus_for_each_dev+0x60/0x8c) from [<802a3be0>]
	(bus_add_driver+0x184/0x25c)
[<802a3be0>] (bus_add_driver+0x184/0x25c) from [<802a51a0>]
	(driver_register+0x78/0x13c)
[<802a51a0>] (driver_register+0x78/0x13c) from [<7f065058>]
	(ehci_hcd_init+0x58/0x88 [ehci_hcd])
[<7f065058>] (ehci_hcd_init+0x58/0x88 [ehci_hcd]) from [<8003b4c4>]
	(do_one_initcall+0x30/0x16c)
[<8003b4c4>] (do_one_initcall+0x30/0x16c) from [<800aa428>]
	(sys_init_module+0x84/0x19c)
[<800aa428>] (sys_init_module+0x84/0x19c) from [<80041580>]
	(ret_fast_syscall+0x0/0x30)
Code: 80aaee48 e92d4010 e30e4e48 e34840aa (e590005c)
---[ end trace 719afdfe4af3a442 ]---

Signed-off-by: Peter Chen <[email protected]>
swarren pushed a commit to swarren/linux-tegra that referenced this pull request Jun 23, 2014
WARNING: quoted string split across lines
torvalds#60: FILE: fs/isofs/compress.c:163:
 					       " page idx = %d, bh idx = %d,"
+					       " avail_in = %ld,"

WARNING: quoted string split across lines
torvalds#61: FILE: fs/isofs/compress.c:164:
+					       " avail_in = %ld,"
+					       " avail_out = %ld\n",

WARNING: missing space after return type
torvalds#76: FILE: include/linux/decompress/bunzip2.h:5:
+	    long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#77: FILE: include/linux/decompress/bunzip2.h:6:
+	    long(*flush)(void*, unsigned long),

WARNING: missing space after return type
torvalds#94: FILE: include/linux/decompress/generic.h:5:
+			      long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#95: FILE: include/linux/decompress/generic.h:6:
+			      long(*flush)(void*, unsigned long),

WARNING: missing space after return type
torvalds#122: FILE: include/linux/decompress/inflate.h:5:
+	   long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#123: FILE: include/linux/decompress/inflate.h:6:
+	   long(*flush)(void*, unsigned long),

WARNING: missing space after return type
torvalds#140: FILE: include/linux/decompress/unlz4.h:5:
+	long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#141: FILE: include/linux/decompress/unlz4.h:6:
+	long(*flush)(void*, unsigned long),

WARNING: missing space after return type
torvalds#158: FILE: include/linux/decompress/unlzma.h:5:
+	   long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#159: FILE: include/linux/decompress/unlzma.h:6:
+	   long(*flush)(void*, unsigned long),

WARNING: missing space after return type
torvalds#177: FILE: include/linux/decompress/unlzo.h:5:
+	long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#178: FILE: include/linux/decompress/unlzo.h:6:
+	long(*flush)(void*, unsigned long),

WARNING: please, no spaces at the start of a line
torvalds#210: FILE: include/linux/zlib.h:86:
+    uLong     avail_in;  /* number of bytes available at next_in */$

WARNING: please, no spaces at the start of a line
torvalds#215: FILE: include/linux/zlib.h:90:
+    uLong     avail_out; /* remaining free space at next_out */$

WARNING: __initdata should be placed after count
torvalds#259: FILE: init/initramfs.c:177:
+static __initdata unsigned long count;

WARNING: __initdata should be placed after remains
torvalds#268: FILE: init/initramfs.c:189:
+static __initdata long remains;

WARNING: missing space after return type
torvalds#385: FILE: lib/decompress_bunzip2.c:679:
+			long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#386: FILE: lib/decompress_bunzip2.c:680:
+			long(*flush)(void*, unsigned long),

WARNING: missing space after return type
torvalds#401: FILE: lib/decompress_bunzip2.c:747:
+			long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#402: FILE: lib/decompress_bunzip2.c:748:
+			long(*flush)(void*, unsigned long),

WARNING: missing space after return type
torvalds#427: FILE: lib/decompress_inflate.c:37:
+		       long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#428: FILE: lib/decompress_inflate.c:38:
+		       long(*flush)(void*, unsigned long),

WARNING: Unnecessary space before function pointer arguments
torvalds#456: FILE: lib/decompress_unlz4.c:35:
+				long (*fill) (void *, unsigned long),

WARNING: Unnecessary space before function pointer arguments
torvalds#457: FILE: lib/decompress_unlz4.c:36:
+				long (*flush) (void *, unsigned long),

WARNING: missing space after return type
torvalds#479: FILE: lib/decompress_unlz4.c:179:
+			      long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#480: FILE: lib/decompress_unlz4.c:180:
+			      long(*flush)(void*, unsigned long),

WARNING: missing space after return type
torvalds#529: FILE: lib/decompress_unlzma.c:283:
+	long(*flush)(void*, unsigned long);

WARNING: missing space after return type
torvalds#541: FILE: lib/decompress_unlzma.c:538:
+			      long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#542: FILE: lib/decompress_unlzma.c:539:
+			      long(*flush)(void*, unsigned long),

WARNING: missing space after return type
torvalds#557: FILE: lib/decompress_unlzma.c:671:
+			      long(*fill)(void*, unsigned long),

WARNING: missing space after return type
torvalds#558: FILE: lib/decompress_unlzma.c:672:
+			      long(*flush)(void*, unsigned long),

WARNING: Unnecessary space before function pointer arguments
torvalds#586: FILE: lib/decompress_unlzo.c:112:
+				long (*fill) (void *, unsigned long),

WARNING: Unnecessary space before function pointer arguments
torvalds#587: FILE: lib/decompress_unlzo.c:113:
+				long (*flush) (void *, unsigned long),

total: 0 errors, 35 warnings, 479 lines checked

./patches/initramfs-support-initramfs-that-is-more-than-2g.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Yinghai Lu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
JoonsooKim pushed a commit to JoonsooKim/linux that referenced this pull request Jul 4, 2014
checkpatch's $Type variable does not match declarations
of multiple const * types.

This can produce false positives for things like:

$ ./scripts/checkpatch.pl -f drivers/staging/comedi/comedidev.h
WARNING: Missing a blank line after declarations
torvalds#60: FILE: drivers/staging/comedi/comedidev.h:60:
+       const struct comedi_lrange *range_table;
+       const struct comedi_lrange *const *range_table_list;

Fix the $Type variable to support matching multiple "* const" uses.

Signed-off-by: Joe Perches <[email protected]>
Reported-by: Hartley Sweeten <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
ddstreet pushed a commit to ddstreet/linux that referenced this pull request Jul 25, 2014
checkpatch's $Type variable does not match declarations
of multiple const * types.

This can produce false positives for things like:

$ ./scripts/checkpatch.pl -f drivers/staging/comedi/comedidev.h
WARNING: Missing a blank line after declarations
torvalds#60: FILE: drivers/staging/comedi/comedidev.h:60:
+       const struct comedi_lrange *range_table;
+       const struct comedi_lrange *const *range_table_list;

Fix the $Type variable to support matching multiple "* const" uses.

Signed-off-by: Joe Perches <[email protected]>
Reported-by: Hartley Sweeten <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
torvalds pushed a commit that referenced this pull request Aug 7, 2014
checkpatch's $Type variable does not match declarations of multiple
const * types.

This can produce false positives for things like:

  $ ./scripts/checkpatch.pl -f drivers/staging/comedi/comedidev.h
  WARNING: Missing a blank line after declarations
  #60: FILE: drivers/staging/comedi/comedidev.h:60:
  +       const struct comedi_lrange *range_table;
  +       const struct comedi_lrange *const *range_table_list;

Fix the $Type variable to support matching multiple "* const" uses.

Signed-off-by: Joe Perches <[email protected]>
Reported-by: Hartley Sweeten <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
pstglia pushed a commit to pstglia/linux that referenced this pull request Oct 6, 2014
…nabled

With bigalloc enabled we must use EXT4_CLUSTERS_PER_GROUP() instead of
EXT4_BLOCKS_PER_GROUP() otherwise we will go beyond the allocated buffer.

$ mount -t ext4 /dev/vde /vde
[   70.573993] EXT4-fs DEBUG (fs/ext4/mballoc.c, 2346): ext4_mb_alloc_groupinfo:
[   70.575174] allocated s_groupinfo array for 1 meta_bg's
[   70.576172] EXT4-fs DEBUG (fs/ext4/super.c, 2092): ext4_check_descriptors:
[   70.576972] Checking group descriptorsBUG: unable to handle kernel paging request at ffff88006ab56000
[   72.463686] IP: [<ffffffff81394eb9>] __bitmap_weight+0x2a/0x7f
[   72.464168] PGD 295e067 PUD 2961067 PMD 7fa8e067 PTE 800000006ab56060
[   72.464738] Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
[   72.465139] Modules linked in:
[   72.465402] CPU: 1 PID: 3560 Comm: mount Tainted: G        W    3.14.0-rc2-00069-ge57bce1 torvalds#60
[   72.466079] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[   72.466505] task: ffff88007ce6c8a0 ti: ffff88006b7f0000 task.ti: ffff88006b7f0000
[   72.466505] RIP: 0010:[<ffffffff81394eb9>]  [<ffffffff81394eb9>] __bitmap_weight+0x2a/0x7f
[   72.466505] RSP: 0018:ffff88006b7f1c00  EFLAGS: 00010206
[   72.466505] RAX: 0000000000000000 RBX: 000000000000050a RCX: 0000000000000040
[   72.466505] RDX: 0000000000000000 RSI: 0000000000080000 RDI: 0000000000000000
[   72.466505] RBP: ffff88006b7f1c28 R08: 0000000000000002 R09: 0000000000000000
[   72.466505] R10: 000000000000babe R11: 0000000000000400 R12: 0000000000080000
[   72.466505] R13: 0000000000000200 R14: 0000000000002000 R15: ffff88006ab55000
[   72.466505] FS:  00007f43ba1fa840(0000) GS:ffff88007f800000(0000) knlGS:0000000000000000
[   72.466505] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[   72.466505] CR2: ffff88006ab56000 CR3: 000000006b7e6000 CR4: 00000000000006e0
[   72.466505] Stack:
[   72.466505]  ffff88006ab65000 0000000000000000 0000000000000000 0000000000010000
[   72.466505]  ffff88006ab6f400 ffff88006b7f1c58 ffffffff81396bb8 0000000000010000
[   72.466505]  0000000000000000 ffff88007b869a90 ffff88006a48a000 ffff88006b7f1c70
[   72.466505] Call Trace:
[   72.466505]  [<ffffffff81396bb8>] memweight+0x5f/0x8a
[   72.466505]  [<ffffffff811c3b19>] ext4_count_free+0x13/0x21
[   72.466505]  [<ffffffff811c396c>] ext4_count_free_clusters+0xdb/0x171
[   72.466505]  [<ffffffff811e3bdd>] ext4_fill_super+0x117c/0x28ef
[   72.466505]  [<ffffffff81391569>] ? vsnprintf+0x1c7/0x3f7
[   72.466505]  [<ffffffff8114d8dc>] mount_bdev+0x145/0x19c
[   72.466505]  [<ffffffff811e2a61>] ? ext4_calculate_overhead+0x2a1/0x2a1
[   72.466505]  [<ffffffff811dab1d>] ext4_mount+0x15/0x17
[   72.466505]  [<ffffffff8114e3aa>] mount_fs+0x67/0x150
[   72.466505]  [<ffffffff811637ea>] vfs_kern_mount+0x64/0xde
[   72.466505]  [<ffffffff81165d19>] do_mount+0x6fe/0x7f5
[   72.466505]  [<ffffffff81126cc8>] ? strndup_user+0x3a/0xd9
[   72.466505]  [<ffffffff8116604b>] SyS_mount+0x85/0xbe
[   72.466505]  [<ffffffff81619e90>] tracesys+0xdd/0xe2
[   72.466505] Code: c3 89 f0 b9 40 00 00 00 55 99 48 89 e5 41 57 f7 f9 41 56 49 89 ff 41 55 45 31 ed 41 54 41 89 f4 53 31 db 41 89 c6 45 39 ee 7e 10 <4b> 8b 3c ef 49 ff c5 e8 bf ff ff ff 01 c3 eb eb 31 c0 45 85 f6
[   72.466505] RIP  [<ffffffff81394eb9>] __bitmap_weight+0x2a/0x7f
[   72.466505]  RSP <ffff88006b7f1c00>
[   72.466505] CR2: ffff88006ab56000
[   72.466505] ---[ end trace 7d051a08ae138573 ]---
Killed

Signed-off-by: "Theodore Ts'o" <[email protected]>
andy-shev pushed a commit to andy-shev/linux that referenced this pull request Jan 24, 2015
Running a heavy fs workload, I ran into a situation where we pass
down a page for writeback/swap that doesn't have an inode mapping:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000028
IP: [<ffffffff8119589f>] inode_to_bdi+0xf/0x50
PGD 0
Oops: 0000 [#1] PREEMPT SMP
Modules linked in: wl(O) tun cfg80211 btusb joydev hid_apple hid_generic usbhid hid bcm5974 usb_storage nouveau snd_hda_codec_hdmi snd_hda_codec_cirrus snd_hda_codec_generic x86_pkg_temp_thermal snd_hda_intel kvm_intel snd_hda_controller snd_hda_codec kvm snd_hwdep snd_pcm applesmc input_polldev snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq snd_timer snd_seq_device snd xhci_pci xhci_hcd ttm thunderbolt soundcore apple_gmux apple_bl bluetooth binfmt_misc fuse nls_iso8859_1 nls_cp437 vfat fat [last unloaded: wl]
CPU: 4 PID: 50 Comm: kswapd0 Tainted: G     U     O   3.19.0-rc5+ torvalds#60
Hardware name: Apple Inc. MacBookPro11,3/Mac-2BD1B31983FE1663, BIOS MBP112.88Z.0138.B02.1310181745 10/18/2013
task: ffff880462e917f0 ti: ffff880462edc000 task.ti: ffff880462edc000
RIP: 0010:[<ffffffff8119589f>]  [<ffffffff8119589f>] inode_to_bdi+0xf/0x50
RSP: 0000:ffff880462edf8e8  EFLAGS: 00010282
RAX: ffffffff81c4cd80 RBX: ffffea0001b3abc0 RCX: 0000000000000000
RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffff880462edf8f8 R08: 00000000001e8500 R09: ffff880460f7cb68
R10: ffff880462edfa00 R11: 0000000000000101 R12: 0000000000000000
R13: ffffffff81c4cd98 R14: 0000000000000000 R15: ffff880460f7c9c0
FS:  0000000000000000(0000) GS:ffff88047f300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000028 CR3: 00000002b6341000 CR4: 00000000001407e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Stack:
 ffffea0001b3abc0 ffffffff81c4cd80 ffff880462edf948 ffffffff811244aa
 ffffffff811565b0 ffff880460f7c9c0 ffff880462edf948 ffffea0001b3abc0
 0000000000000001 ffff880462edfb40 ffff880008b999c0 ffff880460f7c9c0
Call Trace:
 [<ffffffff811244aa>] __test_set_page_writeback+0x3a/0x170
 [<ffffffff811565b0>] ? SyS_madvise+0x790/0x790
 [<ffffffff81156bb6>] __swap_writepage+0x216/0x280
 [<ffffffff8133d592>] ? radix_tree_insert+0x32/0xe0
 [<ffffffff81157741>] ? swap_info_get+0x61/0xf0
 [<ffffffff81159bfc>] ? page_swapcount+0x4c/0x60
 [<ffffffff81156c4d>] swap_writepage+0x2d/0x50
 [<ffffffff81131658>] shmem_writepage+0x198/0x2c0
 [<ffffffff8112cae4>] shrink_page_list+0x464/0xa00
 [<ffffffff8112d666>] shrink_inactive_list+0x266/0x500
 [<ffffffff8112e215>] shrink_lruvec+0x5d5/0x720
 [<ffffffff8112e3bb>] shrink_zone+0x5b/0x190
 [<ffffffff8112ee3f>] kswapd+0x48f/0x8d0
 [<ffffffff8112e9b0>] ? try_to_free_pages+0x4c0/0x4c0
 [<ffffffff81067be2>] kthread+0xd2/0xf0
 [<ffffffff81060000>] ? workqueue_congested+0x30/0x80
 [<ffffffff81067b10>] ? kthread_create_on_node+0x180/0x180
 [<ffffffff816b556c>] ret_from_fork+0x7c/0xb0
 [<ffffffff81067b10>] ? kthread_create_on_node+0x180/0x180
Code: 00 48 c7 c7 8d 8d a4 81 e8 3f 62 eb ff e9 fc fe ff ff 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 48 89 e5 41 54 49 89 fc 53 <48> 8b 5f 28 48 89 df e8 15 f8 00 00 85 c0 75 11 48 8b 83 d8 00
RIP  [<ffffffff8119589f>] inode_to_bdi+0xf/0x50
 RSP <ffff880462edf8e8>
CR2: 0000000000000028
---[ end trace eb0e21aa7dad3ddf ]---

Handle this in inode_to_bdi() by punting it to noop_backing_dev_info,
if mapping->host is NULL.

Signed-off-by: Jens Axboe <[email protected]>
elettronicagf pushed a commit to elettronicagf/kernel-omap3 that referenced this pull request Mar 2, 2015
L'aggiunta di nuovi monitor in produzione ha dimostrato che la scelta fatta ad hoc
per il monitor 193V5LSB2/10 di usare il pll con granularita' migliore, genera disturbi
e peggiore qualita' in altri monitor. Il pll con miglior risoluzione ha infatti un jitter piu'
elevato che rovina il segnale e rende piu' difficile l'auto calibrazione dei display.
Si e' deciso quindi di ritornare al vecchio clock, ma, per ovviare al problema del 193V5,
agire sui timer orizzontali in modo da allineare la frequenza del vertical refresh a 37.87 Khz,
che altrimenti sarebbe risultata errata per via degli arrotondamenti del prescaler.
In questa modalita' i monitor lavorano a
torvalds#60.2 Hz   37.871Hz
I monitor testati sono i sequenti.
#193V5LSB
#196V4LSB2
#203V5LSB26
#ASUS VW22A
Per ogni monitor e' stata effettuata l'auto calibrazione dalla schermata di help
di calibrazione ruota.
Le prestazioni sono accettabile, ma il risultato migliore lo si ottiene solo
calibrando il monitor con una schermata reticolo fatta ad hoc, che per il momento
pero' non e' possibile aggiungere all'applicativo.
L'immagine di calibrazione e' stata aggiunta nella root del kernel.


# Bisogna agire manualmente su Fase/Clock/Posizione
# Fissare una fase
# Cambiare il Clock finche' non si vedono piu' bande
hzhuang1 pushed a commit to hzhuang1/linux that referenced this pull request May 22, 2015
aejsmith pushed a commit to aejsmith/linux that referenced this pull request Jul 30, 2015
verygreen pushed a commit to verygreen/linux that referenced this pull request Aug 1, 2015
In the patch which changed the serverdown logic to by synchronous, we
were
mistakenly holding on to devdata->priv_lock in the call to
visornic_serverdown_complete(), which ultimately ended up recursively
attempting to grab the same lock via the path:

    --> dev_close
        --> visornic_close()
            --> visornic_disable_with_timeout()

Evidence:

    BUG: spinlock recursion on CPU#0, kworker/u2:0/1567
     lock: 0xffff88002d7e4c90, .magic: dead4ead, .owner: kworker/
     .owner_cpu: 0
    CPU: 0 PID: 1567 Comm: kworker/u2:0 Tainted: G        WC
         4.2.0-rc3-ARCH+ torvalds#60
    Hardware name: Dell Inc. PowerEdge T110/ , BIOS 1.23 12/15/2009
    Workqueue: visorchipset_controlvm controlvm_periodic_work [visorbus]
     ffff8800216a9380 ffff88002d167878 ffffffff81476874 000000000000061f
     ffff88002d7e4c90 ffff88002d167898 ffffffff8109e2bc ffff88002d7e4c90
     ffffffff81763d7c ffff88002d1678b8 ffffffff8109e330 ffff88002d7e4c90
    Call Trace:
     [<ffffffff81476874>] dump_stack+0x4f/0x73
     [<ffffffff8109e2bc>] spin_dump+0x7c/0xc0
     [<ffffffff8109e330>] spin_bug+0x30/0x40
     [<ffffffff8109e547>] do_raw_spin_lock+0x127/0x140
     [<ffffffff8147bf8b>] _raw_spin_lock_irqsave+0x4b/0x60
     [<ffffffffa0168a5c>] ? visornic_disable_with_timeout.clone.2+0x3c/
                          [visornic]
     [<ffffffff8147c639>] ? _raw_spin_unlock_bh+0x39/0x40
     [<ffffffffa0168a5c>] visornic_disable_with_timeout.clone.2+0x3c/
                          [visornic]
     [<ffffffffa0168c6e>] visornic_close+0xe/0x20 [visornic]
     [<ffffffff813ae8d2>] __dev_close_many+0x92/0xe0
     [<ffffffff813ae9ea>] dev_close_many+0x7a/0x110
     [<ffffffff81097556>] ? down+0x16/0x50
     [<ffffffff813af01f>] dev_close+0x3f/0x50
     [<ffffffffa0166b61>] visornic_serverdown+0x91/0x1a0 [visornic]
     [<ffffffffa0155760>] ? device_changestate_responder.clone.
                          [visorbus]
     [<ffffffffa0166c85>] visornic_pause+0x15/0x20 [visornic]
     [<ffffffffa015101f>] initiate_chipset_device_pause_resume+0x9f/0xe0
                          [visorbus]
     [<ffffffffa0151093>] chipset_device_pause+0x13/0x20 [visorbus]
     [<ffffffffa0153cbb>] device_epilog+0x12b/0x1a0 [visorbus]
     [<ffffffffa015506b>] handle_command+0x72b/0x970 [visorbus]
     [<ffffffffa015214e>] ? visorchannel_signalremove+0x6e/0x80
[visorbus]
     [<ffffffffa0155521>] controlvm_periodic_work+0x271/0x420 [visorbus]
     [<ffffffff8106cb52>] process_one_work+0x1d2/0x540
     [<ffffffff8106cab9>] ? process_one_work+0x139/0x540
     [<ffffffff814771b7>] ? __schedule+0x807/0xc30
     [<ffffffff8106cf57>] worker_thread+0x57/0x4c0
     [<ffffffff8106cf00>] ? process_scheduled_works+0x40/0x40
     [<ffffffff8106cf00>] ? process_scheduled_works+0x40/0x40
     [<ffffffff81073b19>] kthread+0xe9/0x110
     [<ffffffff81073a30>] ? __init_kthread_worker+0x70/0x70
     [<ffffffff8147cddf>] ret_from_fork+0x3f/0x70
     [<ffffffff81073a30>] ? __init_kthread_worker+0x70/0x70
    BUG: spinlock lockup suspected on CPU#0, kworker/u2:0/1567

Fixes: f2b70efaf48f ("staging: unisys: Make serverdown synchronous")

Signed-off-by: Tim Sell <[email protected]>
Signed-off-by: Benjamin Romer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ddstreet referenced this pull request in ddstreet/linux Aug 6, 2015
GIT 32f494c98c21b03a78c2305cde6ae1b421db576e

commit 32f494c98c21b03a78c2305cde6ae1b421db576e
Author: Stephen Rothwell <[email protected]>
Date:   Wed Aug 5 16:41:48 2015 +1000

    crypto: authenc - select CRYPTO_NULL
    
    Signed-off-by: Stephen Rothwell <[email protected]>

commit aa7c043d9783f538319e77deeae5d90ff5d6907b
Author: Richard Guy Briggs <[email protected]>
Date:   Sat Aug 1 15:41:13 2015 -0400

    audit: eliminate unnecessary extra layer of watch parent references
    
    The audit watch parent count was imbalanced, adding an unnecessary layer of
    watch parent references.  Decrement the additional parent reference when a
    watch is reused, already having a reference to the parent.
    
    audit_find_parent() gets a reference to the parent, if the parent is
    already known.  This additional parental reference is not needed if the
    watch is subsequently found by audit_add_to_parent(), and consumed if
    the watch does not already exist, so we need to put the parent if the
    watch is found, and do nothing if this new watch is added to the parent.
    
    If the parent wasn't already known, it is created with a refcount of 1
    and added to the audit_watch_group, then incremented by one to be
    subsequently consumed by the newly created watch in
    audit_add_to_parent().
    
    The rule points to the watch, not to the parent, so the rule's refcount
    gets bumped, not the parent's.
    
    See LKML, 2015-07-16
    
    Signed-off-by: Richard Guy Briggs <[email protected]>
    Signed-off-by: Paul Moore <[email protected]>

commit f8259b262bedd5ec71e55de5953464ea86ff69d9
Author: Richard Guy Briggs <[email protected]>
Date:   Sat Aug 1 15:41:12 2015 -0400

    audit: eliminate unnecessary extra layer of watch references
    
    The audit watch count was imbalanced, adding an unnecessary layer of watch
    references.  Only add the second reference when it is added to a parent.
    
    Signed-off-by: Richard Guy Briggs <[email protected]>
    Signed-off-by: Paul Moore <[email protected]>

commit 6abc8ca19df0078de17dc38340db3002ed489ce7
Author: Tejun Heo <[email protected]>
Date:   Tue Aug 4 15:20:55 2015 -0400

    cgroup: define controller file conventions
    
    Traditionally, each cgroup controller implemented whatever interface
    it wanted leading to interfaces which are widely inconsistent.
    Examining the requirements of the controllers readily yield that there
    are only a few control schemes shared among all.
    
    Two major controllers already had to implement new interface for the
    unified hierarchy due to significant structural changes.  Let's take
    the chance to establish common conventions throughout all controllers.
    
    This patch defines CGROUP_WEIGHT_MIN/DFL/MAX to be used on all weight
    based control knobs and documents the conventions that controllers
    should follow on the unified hierarchy.  Except for io.weight knob,
    all existing unified hierarchy knobs are already compliant.  A
    follow-up patch will update io.weight.
    
    v2: Added descriptions of min, low and high knobs.
    
    Signed-off-by: Tejun Heo <[email protected]>
    Acked-by: Johannes Weiner <[email protected]>
    Cc: Li Zefan <[email protected]>
    Cc: Peter Zijlstra <[email protected]>

commit 1dadafa86a779884f14a6e7a3ddde1a57b0a0a65
Author: Tim Gardner <[email protected]>
Date:   Tue Aug 4 11:26:04 2015 -0600

    workqueue: Make flush_workqueue() available again to non GPL modules
    
    Commit 37b1ef31a568fc02e53587620226e5f3c66454c8 ("workqueue: move
    flush_scheduled_work() to workqueue.h") moved the exported non GPL
    flush_scheduled_work() from a function to an inline wrapper.
    Unfortunately, it directly calls flush_workqueue() which is a GPL function.
    This has the effect of changing the licensing requirement for this function
    and makes it unavailable to non GPL modules.
    
    See commit ad7b1f841f8a54c6d61ff181451f55b68175e15a ("workqueue: Make
    schedule_work() available again to non GPL modules") for precedent.
    
    Signed-off-by: Tim Gardner <[email protected]>
    Signed-off-by: Tejun Heo <[email protected]>

commit b03ba9e314c12b2127243145b5c1f41b2408de62
Author: Sifan Naeem <[email protected]>
Date:   Wed Jul 29 11:55:26 2015 +0100

    spi: img-spfi: fix multiple calls to request gpio
    
    spfi_setup may be called many times by the spi framework, but
    gpio_request_one can only be called once without freeing, repeatedly
    calling gpio_request_one will cause an error to be thrown, which
    causes the request to spi_setup to be marked as failed.
    
    We can have a per-spi_device flag that indicates whether or not the
    gpio has been requested. If the gpio has already been requested use
    gpio_direction_output to set the direction of the gpio.
    
    Fixes: 8c2c8c03cdcb ("spi: img-spfi: Control CS lines with GPIO")
    Signed-off-by: Sifan Naeem <[email protected]>
    Signed-off-by: Mark Brown <[email protected]>
    Cc: [email protected]

commit d4ea7d86457a8d0ea40ce77bdeda1fc966cc35ec
Author: Ian Campbell <[email protected]>
Date:   Sat Aug 1 18:13:25 2015 +0100

    regulator: axp20x: Add module alias
    
    This allows the module to be autoloaded.
    
    Together with 07949bf9c63c ("cpufreq: dt: allow driver to boot
    automatically") this is sufficient to allow a modular kernel (such
    as Debian's) to enable cpufreq on a Cubietruck.
    
    Signed-off-by: Ian Campbell <[email protected]>
    Signed-off-by: Mark Brown <[email protected]>

commit 5dbe135a153837ce9367bdfacf7aabfc6fb76f4b
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:51 2015 +0200

    usb: gadget: epautoconf: remove ep and desc configuration from ep_matches()
    
    As function ep_matches() is used to match endpoint with usb descriptor it's
    highly unintuitive that it modifies endpoint and descriptor structures fields.
    This patch moves code configuring ep and desc from ep_matches() to
    usb_ep_autoconfig_ss(), so now function ep_matches() does nothing more than
    its name suggests.
    
    [ [email protected] : fix build warning ]
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit b58713d53a8f41d57b24c93de0b1c7e9550ba70f
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:50 2015 +0200

    usb: gadget: epautoconf: remove pxa quirk from ep_matches()
    
    The same effect can be achieved by using capabilities flags, so now we can
    get rid of handling of hardware specific limitations in generic code.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit b86f33a3a371a4c3aa8dbb2f4125634a4e0d09dc
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:49 2015 +0200

    usb: gadget: epautoconf: add endpoint capabilities flags verification
    
    Introduce endpoint matching mechanism basing on endpoint capabilities
    flags. We check if endpoint supports transfer type and direction requested
    in ep descriptor. Since we have this new endpoint matching mechanism
    there is no need to have old code guessing endpoint capabilities basing
    on its name, so we are getting rid of it. Remove also the obsolete comment.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 47bef386511517449e2f24a89a41084af53616f8
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:48 2015 +0200

    usb: gadget: atmel_usba_udc: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 916f7ac5dbc312969a90bc35a5f4fcbfc2965d60
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:47 2015 +0200

    usb: renesas: gadget: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 8501955e888662ca56775eec2eb804e7bc7fce0d
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:46 2015 +0200

    usb: musb: gadget: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit eb4cbc19526d62657b838d6f0b694a000e5b4c81
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:45 2015 +0200

    usb: isp1760: udc: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 927d9f77fe3d5f9261eeb465e2b60768e400ffc9
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:44 2015 +0200

    usb: gadget: udc-xilinx: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 0648772d51c0ff3949397cb0cbcf2435ee32c550
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:43 2015 +0200

    usb: gadget: s3c2410_udc: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit bc1b9f300ae06c64fcd056fb959b3d709ad2ef33
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:42 2015 +0200

    usb: gadget: s3c-hsudc: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 0ec8026d7afee625f52631708d84435ea4735da6
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:41 2015 +0200

    usb: gadget: r8a66597-udc: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit a180e3da97a323510071b2b5e42b5dc07df239da
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:40 2015 +0200

    usb: gadget: pxa27x_udc: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 36411b6b042d350a43fe1e0d3ce78fbda30f4f02
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:39 2015 +0200

    usb: gadget: pxa25x_udc: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 85a4ed003b39f70ba478e613a9be2c334f1079e7
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:38 2015 +0200

    usb: gadget: pch_udc: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 7d4ba80d3a91222de577b652a8936f935de8b409
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:37 2015 +0200

    usb: gadget: omap_udc: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit c23c3c3c3059f3dc47268cd7a28b96b9efdbc1ea
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:36 2015 +0200

    usb: gadget: net2280: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit f95aec51da16250841a4254db36f9771446cdbb6
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:35 2015 +0200

    usb: gadget: net2272: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 43710a8dba9ae607decdeaf7a56a51dd5b42184e
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:34 2015 +0200

    usb: gadget: mv_udc_core: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit c12a30629f8b5fe8c2aba42c3128df702bbc9e83
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:33 2015 +0200

    usb: gadget: mv_u3d_core: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 8ddbf94fd5b536b3adf5ffa631c5951718e7301d
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:32 2015 +0200

    usb: gadget: m66592-udc: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 4d75c8bd613c5ba99ee02cfe38610c82e7fe8362
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:31 2015 +0200

    usb: gadget: lpc32xx_udc: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 892269925991b449ae47dcc0debb324ae451022e
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:30 2015 +0200

    usb: gadget: gr_udc: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit b0bf5fbfbd30ffbb9e45169f78412f0596e16412
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:29 2015 +0200

    usb: gadget: goku_udc: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 455d11c93582c4167f55af0969b83821450be120
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:28 2015 +0200

    usb: gadget: fusb300_udc: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 60a28c63712f190b45e9d8f0ca593c927970fd51
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:27 2015 +0200

    usb: gadget: fsl_udc_core: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit e8fc42f6a19af320d7a4718c05c3f249bf5d3151
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:26 2015 +0200

    usb: gadget: fsl_qe_udc: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 8d29237a436dc8e2b5c44dd0ca662a680f16deb5
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:25 2015 +0200

    usb: gadget: fotg210-udc: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 7a3b8e7098946b44c014f3df0ceef27fb273c142
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:24 2015 +0200

    usb: gadget: dummy-hcd: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit b079dd6156a6544e0383642a9ec97d17485aa244
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:23 2015 +0200

    usb: gadget: bdc: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 1b0ba527702268992a62227dde4911477f057ca5
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:22 2015 +0200

    usb: gadget: bcm63xx_udc: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit b9ed96d7d579416a8fd2e1cef66541bfdad2720f
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:21 2015 +0200

    usb: gadget: at91_udc: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 6f02ac5ac9bba538593e4359dd5e83c4d42822fe
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:20 2015 +0200

    usb: gadget: amd5536udc: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit a474d3b73ba7f22844e672ac004f01cd9b8be159
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:19 2015 +0200

    usb: dwc3: gadget: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 2954522f135246287c36524bc96e9dae8c40f8a9
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:18 2015 +0200

    usb: dwc2: gadget: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit a7e3f1410855db6b67ec29a386e74be2df3cc311
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:17 2015 +0200

    usb: chipidea: udc: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 68b5c947515a252b9e416e419fca4c1382912948
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:16 2015 +0200

    staging: emxx_udc: add ep capabilities support
    
    Convert endpoint configuration to new capabilities model.
    
    Fixed typo in "epc-nulk" to "epc-bulk".
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 80e6e3847f851fc05e63265050115e29e2a50d7e
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:15 2015 +0200

    usb: gadget: add endpoint capabilities helper macros
    
    Add macros useful while initializing array of endpoint capabilities
    structures. These macros makes structure initialization more compact
    to decrease number of code lines and increase readability of code.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 734b5a2addd333829a6d647ee14a3609c7a87c44
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:14 2015 +0200

    usb: gadget: add endpoint capabilities flags
    
    Introduce struct usb_ep_caps which contains information about capabilities
    of usb endpoints - supported transfer types and directions. This structure
    should be filled by UDC driver for each of its endpoints, and will be
    used in epautoconf in new ep matching mechanism which will replace ugly
    guessing of endpoint capabilities basing on its name.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit cc476b42a39d5a66d94f46cade972dcb8ee278df
Author: Robert Baldyga <[email protected]>
Date:   Fri Jul 31 16:00:13 2015 +0200

    usb: gadget: encapsulate endpoint claiming mechanism
    
    So far it was necessary for usb functions to set ep->driver_data in
    endpoint obtained from autoconfig to non-null value, to indicate that
    endpoint is claimed by function (in autoconfig it was checked if endpoint
    has set this field to non-null value, and if it has, it was assumed that
    it is claimed). It could cause bugs because if some function doesn't
    set this field autoconfig could return the same endpoint more than one
    time.
    
    To help to avoid such bugs this patch adds claimed flag to struct usb_ep,
    and  encapsulates endpoint claiming mechanism inside usb_ep_autoconfig_ss()
    and usb_ep_autoconfig_reset(), so now usb functions don't need to perform
    any additional actions to mark endpoint obtained from autoconfig as claimed.
    
    Signed-off-by: Robert Baldyga <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 94e5c23d3c52f58f4051810a15aeacc085127ad1
Author: Axel Lin <[email protected]>
Date:   Tue Aug 4 13:52:22 2015 +0800

    spi: pxa2xx: Add terminating entry for pxa2xx_spi_pci_compound_match
    
    Signed-off-by: Axel Lin <[email protected]>
    Acked-by: Jarkko Nikula <[email protected]>
    Signed-off-by: Mark Brown <[email protected]>

commit 89a6356676eba38e498507b5b67dcc07a714a149
Author: Colin Ian King <[email protected]>
Date:   Fri Jul 31 13:42:29 2015 +0100

    spi: spidev: fix inconsistent indenting
    
    Fix inconsistent indenting in spidev_open, no functional change.
    
    Signed-off-by: Colin Ian King <[email protected]>
    Signed-off-by: Mark Brown <[email protected]>

commit 0f4315a8f1a73f130bbc5dde134b704ea6dda56c
Author: Felipe Balbi <[email protected]>
Date:   Tue Aug 4 11:02:45 2015 -0500

    usb: gadget: f_uac2: fix build warning
    
    commit 913e4a90b6f9 ("usb: gadget: f_uac2:
    finalize wMaxPacketSize according to bandwidth")
    added a possible build warning when calling
    min(). In order to fix the warning, we just
    make sure to call min_t() and tell that its
    arguments should be u16.
    
    Cc: Peter Chen <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 7f352964852ede9e95d18fd3825c5200fb48b3a5
Author: Saurabh Karajgaonkar <[email protected]>
Date:   Tue Aug 4 14:02:28 2015 +0000

    usb: musb: musb_dsps: Simplify return statement
    
    Replace redundant variable use in return statement.
    
    Signed-off-by: Saurabh Karajgaonkar <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit c5673f5ce4c0faa97df419877bcdebbd76d43151
Author: Saurabh Karajgaonkar <[email protected]>
Date:   Tue Aug 4 14:02:03 2015 +0000

    usb: phy: phy-keystone: Simplify return statement
    
    Replace redundant variable use in return statement.
    
    Signed-off-by: Saurabh Karajgaonkar <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 4b68b50fd45e2f429da574c74d9a3788a861434f
Author: Saurabh Karajgaonkar <[email protected]>
Date:   Tue Aug 4 14:01:31 2015 +0000

    usb: phy: phy-mxs-usb: Simplify return statement
    
    Replace redundant variable use in return statement.
    
    Signed-off-by: Saurabh Karajgaonkar <[email protected]>
    Signed-off-by: Felipe Balbi <[email protected]>

commit 5406898354ebfb11f49b955fb5e49a62786a542f
Author: Mengdong Lin <[email protected]>
Date:   Tue Aug 4 15:47:35 2015 +0100

    ASoC: topology: fix typo in soc_tplg_kcontrol_bind_io()
    
    Signed-off-by: Mengdong Lin <[email protected]>
    Signed-off-by: Liam Girdwood <[email protected]>
    Signed-off-by: Mark Brown <[email protected]>

commit 6d3ec14d703c660c4baf8d726538b5415e23b4fb
Author: Lukas Czerner <[email protected]>
Date:   Tue Aug 4 11:21:52 2015 -0400

    jbd2: limit number of reserved credits
    
    Currently there is no limitation on number of reserved credits we can
    ask for. If we ask for more reserved credits than 1/2 of maximum
    transaction size, or if total number of credits exceeds the maximum
    transaction size per operation (which is currently only possible with
    the former) we will spin forever in start_this_handle().
    
    Fix this by adding this limitation at the start of start_this_handle().
    
    This patch also removes the credit limitation 1/2 of maximum transaction
    size, since we really only want to limit the number of reserved credits.
    There is not much point to limit the credits if there is still space in
    the journal.
    
    This accidentally also fixes the online resize, where due to the
    limitation of the journal credits we're unable to grow file systems with
    1k block size and size between 16M and 32M. It has been partially fixed
    by 2c869b262a10ca99cb866d04087d75311587a30c, but not entirely.
    
    Thanks Jan Kara for helping me getting the correct fix.
    
    Signed-off-by: Lukas Czerner <[email protected]>
    Reviewed-by: Jan Kara <[email protected]>
    Signed-off-by: Theodore Ts'o <[email protected]>

commit 21caf3a765b0a88f8fedf63b36e5d15683b73fe5
Author: Lorenzo Nava <[email protected]>
Date:   Thu Jul 2 17:28:03 2015 +0100

    ARM: 8398/1: arm DMA: Fix allocation from CMA for coherent DMA
    
    This patch allows the use of CMA for DMA coherent memory allocation.
    At the moment if the input parameter "is_coherent" is set to true
    the allocation is not made using the CMA, which I think is not the
    desired behaviour.
    The patch covers the allocation and free of memory for coherent
    DMA.
    
    Signed-off-by: Lorenzo Nava <[email protected]>
    Reviewed-by: Catalin Marinas <[email protected]>
    Signed-off-by: Russell King <[email protected]>

commit c0e736629b89ec176ab4dba45943364cbdc135ba
Author: Geert Uytterhoeven <[email protected]>
Date:   Tue Aug 4 15:22:11 2015 +0200

    drm/fb-helper: Move drm_fb_helper_force_kernel_mode() inside #ifdef
    
    If CONFIG_MAGIC_SYSRQ is not set:
    
        drivers/gpu/drm/drm_fb_helper.c:390:13: warning: 'drm_fb_helper_force_kernel_mode' defined but not used [-Wunused-function]
         static bool drm_fb_helper_force_kernel_mode(void)
    		 ^
    
    Move drm_fb_helper_force_kernel_mode() inside the existing #ifdef to fix
    this.
    
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Signed-off-by: Daniel Vetter <[email protected]>

commit b996f201b74e52f9e9da47e1377e0b948d5ba25c
Author: Geert Uytterhoeven <[email protected]>
Date:   Tue Aug 4 15:22:10 2015 +0200

    drm/fb-helper: Clarify drm_fb_helper_restore_fbdev_mode*()
    
    As of commit 5ea1f752ae04be40 ("drm: add
    drm_fb_helper_restore_fbdev_mode_unlocked()"),
    drm_fb_helper_restore_fbdev_mode() is no longer public, and drivers
    should call drm_fb_helper_restore_fbdev_mode_unlocked() from their
    ->lastclose callbacks instead.
    
    Update the documentation to reflect this, and absorb the one liner
    drm_fb_helper_restore_fbdev_mode() into its single caller.
    
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Signed-off-by: Daniel Vetter <[email protected]>

commit 714dc94e0d22ef951722f5d6ec316f4a7867f850
Author: Jiri Kosina <[email protected]>
Date:   Tue Aug 4 15:46:10 2015 +0200

    Revert "HID: core/input: Fix accessing freed memory during driver unbind"
    
    This reverts commit e19232a20913513fbb4b21ac8f45a4b9a805d6e4.
    
    It's broken and is going to be replaced with the one from
    for-4.2/upstream-fixes-devm-fixed branch.
    
    This is for-next branch only revert, both the original commit and the
    revert will never make it to Linus (instead a fixed version will be
    sent directly).

commit 0621809e37936e7c2b3eac9165cf2aad7f9189eb
Author: Krzysztof Kozlowski <[email protected]>
Date:   Mon Aug 3 14:57:30 2015 +0900

    HID: hid-input: Fix accessing freed memory during device disconnect
    
    During unbinding the driver was dereferencing a pointer to memory
    already freed by power_supply_unregister().
    
    Driver was freeing its internal description of battery through pointers
    stored in power_supply structure. However, because the core owns the
    power supply instance, after calling power_supply_unregister() this
    memory is freed and the driver cannot access these members.
    
    Fix this by storing the pointer to internal description of battery in a
    local variable before calling power_supply_unregister(), so the pointer
    remains valid.
    
    Signed-off-by: Krzysztof Kozlowski <[email protected]>
    Reported-by: H.J. Lu <[email protected]>
    Fixes: 297d716f6260 ("power_supply: Change ownership from driver to core")
    Cc: <[email protected]>
    Reviewed-by: Dmitry Torokhov <[email protected]>
    Signed-off-by: Jiri Kosina <[email protected]>

commit 3f14a63a544374225c17221a5058748360428dc3
Author: Jason Gerecke <[email protected]>
Date:   Mon Aug 3 10:17:05 2015 -0700

    HID: wacom: Remove WACOM_QUIRK_NO_INPUT
    
    WACOM_QUIRK_NO_INPUT is a signal to the driver that input devices
    should not be created for a particular device. This quirk was used by
    the wireless receiver to prevent any devices from being created during
    the initial probe (defering it instead until we got a tablet connection
    event in 'wacom_wireless_work').
    
    This quirk is not necessary now that a device_type is associated with each
    device. Any input device allocated by 'wacom_allocate_inputs' which is
    not necessary for a particular device is freed in 'wacom_register_inputs'.
    In particular, none of the wireless receivers devices have the pen, pad,
    or touch device types set so the same effect is achieved without the need
    to be explicit.
    
    We now return early in wacom_retrieve_hid_descriptor for wireless devices
    (to prevent the device_type from being overridden) but since we ignore the
    HID descriptor for the wireless reciever anyway, this is not an issue.
    
    Signed-off-by: Jason Gerecke <[email protected]>
    Reviewed-by: Benjamin Tissoires <[email protected]>
    Signed-off-by: Jiri Kosina <[email protected]>

commit ccad85cc1ee34509840e5af80a436ceaf0b71edb
Author: Jason Gerecke <[email protected]>
Date:   Mon Aug 3 10:17:04 2015 -0700

    HID: wacom: Replace WACOM_QUIRK_MONITOR with WACOM_DEVICETYPE_WL_MONITOR
    
    The monitor interface on the wireless receiver is more logically expressed
    as a type of device instead of a quirk.
    
    Signed-off-by: Jason Gerecke <[email protected]>
    Reviewed-by: Benjamin Tissoires <[email protected]>
    Signed-off-by: Jiri Kosina <[email protected]>

commit 8dc8641e619228153ab0bc609f9f534126e87c08
Author: Jason Gerecke <[email protected]>
Date:   Mon Aug 3 10:17:03 2015 -0700

    HID: wacom: Use calculated pkglen for wireless touch interface
    
    Commit 01c846f introduced the 'wacom_compute_pktlen' function which
    automatically determines the correct value for an interface's pkglen
    by scanning the HID descriptor. This function returns the correct
    value for the wireless receiver's touch interface, removing the need
    for us to set it manually here.
    
    Signed-off-by: Jason Gerecke <[email protected]>
    Reviewed-by: Benjamin Tissoires <[email protected]>
    Signed-off-by: Jiri Kosina <[email protected]>

commit 061357a06c69dfa805a033ae22d668de16191cd4
Author: Geert Uytterhoeven <[email protected]>
Date:   Tue Aug 4 14:28:17 2015 +0200

    ARM: shmobile: R-Mobile: Use CPG/MSTP Clock Domain attach/detach helpers
    
    The R-Mobile PM Domain driver manages both power domains and a clock
    domain.
    
    The clock domain part is very similar to the CPG/MSTP Clock Domain,
    which is used on shmobile SoCs without device power domains, except for
    the way how clocks suitable for power management are selected:
      - The former uses the first clock tied to the device through the NULL
        con_id, which is a relic from the legacy pm_clk_notifier-based
        method in drivers/sh/pm_runtime.c,
      - The latter looks for suitable clocks in DT, which is more
        future-proof.
    
    All platforms using this driver are now supported in DT-based ARM
    multi-platform builds only, hence switch to using the CPG/MSTP Clock
    Domain helpers.
    
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Reviewed-by: Ulf Hansson <[email protected]>
    Signed-off-by: Simon Horman <[email protected]>

commit a1a1fdd83722a30efc705a5032ace2ad20b2ca6d
Author: Geert Uytterhoeven <[email protected]>
Date:   Tue Aug 4 15:25:35 2015 +0200

    clk: shmobile: mstp: Consider "zb_clk" suitable for power management
    
    Currently the CPG/MSTP Clock Domain code looks for MSTP clocks to power
    manage a device.
    
    Unfortunately, on R-Mobile APE6 (r8a73a4) and SH-Mobile AG5 (sh73a0),
    the Bus State Controller (BSC) is not power-managed by an MSTP clock,
    but by a plain CPG clock (zb_clk).  Add a special case to handle this,
    so the clock is properly managed, and devices connected to the BSC work
    as expected.
    
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Reviewed-by: Ulf Hansson <[email protected]>
    Signed-off-by: Simon Horman <[email protected]>

commit 6989c8c4cfa7f7cd406906e1abbe7b073d3d66e0
Author: Geert Uytterhoeven <[email protected]>
Date:   Tue Aug 4 14:28:15 2015 +0200

    drivers: sh: Disable PM runtime for multi-platform ARM with genpd
    
    If the default PM Domain using PM_CLK is used for PM runtime, the real
    Clock Domain cannot be registered from DT later.
    
    Hence do not enable it when running a multi-platform kernel with genpd
    support on R-Car or RZ.  The CPG/MSTP Clock Domain driver will take care
    of PM runtime management of the module clocks.
    
    Now most multi-platform ARM shmobile platforms (SH-Mobile, R-Mobile,
    R-Car, RZ) use DT-based PM Domains to take care of PM runtime management
    of the module clocks, simplify the platform logic by replacing the
    explicit SoC checks by a single check for the presence of MSTP clocks in
    DT.
    
    Backwards-compatiblity with old DTs (mainly for R-Car Gen2) is provided
    by checking for the presence of a "#power-domain-cells" property in DT.
    
    The default PM Domain is still needed for:
      - backwards-compatibility with old DTs that lack PM Domain properties,
      - the CONFIG_PM=n case,
      - legacy (non-DT) ARM/shmobile platforms without genpd support
        (r8a7778, r8a7779),
      - legacy SuperH.
    
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Reviewed-by: Ulf Hansson <[email protected]>
    Signed-off-by: Simon Horman <[email protected]>

commit d7c01f3aba883c57aacc57f884e9081d00d1dec7
Author: Geert Uytterhoeven <[email protected]>
Date:   Tue Aug 4 14:28:14 2015 +0200

    drivers: sh: Disable legacy default PM Domain on emev2
    
    EMMA Mobile EV2 doesn't have MSTP clocks. All its device drivers manage
    clocks explicitly, without relying on Runtime PM, so it doesn't need the
    legacy default PM Domain.
    
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Reviewed-by: Ulf Hansson <[email protected]>
    Signed-off-by: Simon Horman <[email protected]>

commit ba56d432e1dc98aa5df5930a0707d79e40fd5e39
Author: Geert Uytterhoeven <[email protected]>
Date:   Tue Aug 4 14:28:13 2015 +0200

    ARM: shmobile: r8a7794 dtsi: Add CPG/MSTP Clock Domain
    
    Add an appropriate "#power-domain-cells" property to the cpg_clocks
    device node, to create the CPG/MSTP Clock Domain.
    
    Add "power-domains" properties to all device nodes for devices that are
    part of the CPG/MSTP Clock Domain and can be power-managed through an
    MSTP clock.  This applies to most on-SoC devices, which have a
    one-to-one mapping from SoC device to DT device node.
    
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Reviewed-by: Ulf Hansson <[email protected]>
    Signed-off-by: Simon Horman <[email protected]>

commit 23a7abb77197044b6e708e0d0d31d89bf1e68bf1
Author: Geert Uytterhoeven <[email protected]>
Date:   Tue Aug 4 14:28:12 2015 +0200

    ARM: shmobile: r8a7793 dtsi: Add CPG/MSTP Clock Domain
    
    Add an appropriate "#power-domain-cells" property to the cpg_clocks
    device node, to create the CPG/MSTP Clock Domain.
    
    Add "power-domains" properties to all device nodes for devices that are
    part of the CPG/MSTP Clock Domain and can be power-managed through an
    MSTP clock.  This applies to most on-SoC devices, which have a
    one-to-one mapping from SoC device to DT device node.
    
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Reviewed-by: Ulf Hansson <[email protected]>
    Signed-off-by: Simon Horman <[email protected]>

commit a5ab8bf59f7ec14081e161bad52430e37def1189
Author: Geert Uytterhoeven <[email protected]>
Date:   Tue Aug 4 14:28:11 2015 +0200

    ARM: shmobile: r8a7791 dtsi: Add CPG/MSTP Clock Domain
    
    Add an appropriate "#power-domain-cells" property to the cpg_clocks
    device node, to create the CPG/MSTP Clock Domain.
    
    Add "power-domains" properties to all device nodes for devices that are
    part of the CPG/MSTP Clock Domain and can be power-managed through an
    MSTP clock.  This applies to most on-SoC devices, which have a
    one-to-one mapping from SoC device to DT device node.  Notable
    exceptions are the "display" and "sound" nodes, which represent multiple
    SoC devices, each having their own MSTP clocks.
    
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Reviewed-by: Ulf Hansson <[email protected]>
    Signed-off-by: Simon Horman <[email protected]>

commit 835a058492b1d539e891af12ce37713b1fb327e9
Author: Geert Uytterhoeven <[email protected]>
Date:   Tue Aug 4 14:28:10 2015 +0200

    ARM: shmobile: r8a7790 dtsi: Add CPG/MSTP Clock Domain
    
    Add an appropriate "#power-domain-cells" property to the cpg_clocks
    device node, to create the CPG/MSTP Clock Domain.
    
    Add "power-domains" properties to all device nodes for devices that are
    part of the CPG/MSTP Clock Domain and can be power-managed through an
    MSTP clock.  This applies to most on-SoC devices, which have a
    one-to-one mapping from SoC device to DT device node.  Notable
    exceptions are the "display" and "sound" nodes, which represent multiple
    SoC devices, each having their own MSTP clocks.
    
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Reviewed-by: Ulf Hansson <[email protected]>
    Signed-off-by: Simon Horman <[email protected]>

commit 3397481089b3ab931536b26fb65ef4a41eefdb67
Author: Geert Uytterhoeven <[email protected]>
Date:   Tue Aug 4 14:28:09 2015 +0200

    ARM: shmobile: r8a7779 dtsi: Add CPG/MSTP Clock Domain
    
    Add an appropriate "#power-domain-cells" property to the cpg_clocks
    device node, to create the CPG/MSTP Clock Domain.
    
    Add "power-domains" properties to all device nodes for devices that are
    part of the CPG/MSTP Clock Domain and can be power-managed through an
    MSTP clock.  This applies to most on-SoC devices, which have a
    one-to-one mapping from SoC device to DT device node.
    
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Reviewed-by: Ulf Hansson <[email protected]>
    Signed-off-by: Simon Horman <[email protected]>

commit 6d3bba42aef6eb7594b845518a51d5aa094d3502
Author: Geert Uytterhoeven <[email protected]>
Date:   Tue Aug 4 14:28:08 2015 +0200

    ARM: shmobile: r8a7778 dtsi: Add CPG/MSTP Clock Domain
    
    Add an appropriate "#power-domain-cells" property to the cpg_clocks
    device node, to create the CPG/MSTP Clock Domain.
    
    Add "power-domains" properties to all device nodes for devices that are
    part of the CPG/MSTP Clock Domain and can be power-managed through an
    MSTP clock.  This applies to most on-SoC devices, which have a
    one-to-one mapping from SoC device to DT device node.  A notable
    exception is the "sound" node, which represents multiple SoC devices,
    each having their own MSTP clocks.
    
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Reviewed-by: Ulf Hansson <[email protected]>
    Signed-off-by: Simon Horman <[email protected]>

commit d45696723575a6a7fbb43b754fb89121746b5982
Author: Geert Uytterhoeven <[email protected]>
Date:   Tue Aug 4 14:28:07 2015 +0200

    ARM: shmobile: r7s72100 dtsi: Add CPG/MSTP Clock Domain
    
    Add an appropriate "#power-domain-cells" property to the cpg_clocks
    device node, to create the CPG/MSTP Clock Domain.
    
    Add "power-domains" properties to all device nodes for devices that are
    part of the CPG/MSTP Clock Domain and can be power-managed through an
    MSTP clock.  This applies to most on-SoC devices, which have a
    one-to-one mapping from SoC device to DT device node.
    
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Reviewed-by: Ulf Hansson <[email protected]>
    Signed-off-by: Simon Horman <[email protected]>

commit 584bf98feb6c38875b76d17ed52e89711b4b5577
Author: Geert Uytterhoeven <[email protected]>
Date:   Tue Aug 4 14:28:06 2015 +0200

    clk: shmobile: rz: Add CPG/MSTP Clock Domain support
    
    Add Clock Domain support to the RZ Clock Pulse Generator (CPG) driver
    using the generic PM Domain.  This allows to power-manage the module
    clocks of SoC devices that are part of the CPG/MSTP Clock Domain using
    Runtime PM, or for system suspend/resume.
    
    SoC devices that are part of the CPG/MSTP Clock Domain and can be
    power-managed through an MSTP clock should be tagged in DT with a proper
    "power-domains" property.
    
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Acked-by: Stephen Boyd <[email protected]>
    Reviewed-by: Ulf Hansson <[email protected]>
    Signed-off-by: Simon Horman <[email protected]>

commit 3602362dcc18fd46a066583fe2a13b57b3df159e
Author: Geert Uytterhoeven <[email protected]>
Date:   Tue Aug 4 14:28:05 2015 +0200

    clk: shmobile: rcar-gen2: Add CPG/MSTP Clock Domain support
    
    Add Clock Domain support to the R-Car Gen2 Clock Pulse Generator (CPG)
    driver using the generic PM Domain.  This allows to power-manage the
    module clocks of SoC devices that are part of the CPG/MSTP Clock Domain
    using Runtime PM, or for system suspend/resume.
    
    SoC devices that are part of the CPG/MSTP Clock Domain and can be
    power-managed through an MSTP clock should be tagged in DT with a proper
    "power-domains" property.
    
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Acked-by: Stephen Boyd <[email protected]>
    Reviewed-by: Ulf Hansson <[email protected]>
    Signed-off-by: Simon Horman <[email protected]>

commit 4aabed77053836418de7065a37414526099b889c
Author: Geert Uytterhoeven <[email protected]>
Date:   Tue Aug 4 14:28:04 2015 +0200

    clk: shmobile: r8a7779: Add CPG/MSTP Clock Domain support
    
    Add Clock Domain support to the R-Car H1 Clock Pulse Generator (CPG)
    driver using the generic PM Domain.  This allows to power-manage the
    module clocks of SoC devices that are part of the CPG/MSTP Clock Domain
    using Runtime PM, or for system suspend/resume.
    
    SoC devices that are part of the CPG/MSTP Clock Domain and can be
    power-managed through an MSTP clock should be tagged in DT with a proper
    "power-domains" property.
    
    Also update the reg property in the DT binding doc example to match the
    actual dtsi, which uses #address-cells and #size-cells == 1, not 2.
    
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Acked-by: Stephen Boyd <[email protected]>
    Reviewed-by: Ulf Hansson <[email protected]>
    Signed-off-by: Simon Horman <[email protected]>

commit aef2b0f2dbc72f79289d74d7c1fefcd25ae11627
Author: Geert Uytterhoeven <[email protected]>
Date:   Tue Aug 4 14:28:03 2015 +0200

    clk: shmobile: r8a7778: Add CPG/MSTP Clock Domain support
    
    Add Clock Domain support to the R-Car M1A Clock Pulse Generator (CPG)
    driver using the generic PM Domain.  This allows to power-manage the
    module clocks of SoC devices that are part of the CPG/MSTP Clock Domain
    using Runtime PM, or for system suspend/resume.
    
    SoC devices that are part of the CPG/MSTP Clock Domain and can be
    power-managed through an MSTP clock should be tagged in DT with a proper
    "power-domains" property.
    
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Acked-by: Stephen Boyd <[email protected]>
    Reviewed-by: Ulf Hansson <[email protected]>
    Signed-off-by: Simon Horman <[email protected]>

commit 1fcc5dc775d0d79153dda6fee1502ab96344b823
Author: Geert Uytterhoeven <[email protected]>
Date:   Tue Aug 4 14:28:02 2015 +0200

    clk: shmobile: Add CPG/MSTP Clock Domain support
    
    Add Clock Domain support to the Clock Pulse Generator (CPG) Module Stop
    (MSTP) Clocks driver using the generic PM Domain.  This allows to
    power-manage the module clocks of SoC devices that are part of the
    CPG/MSTP Clock Domain using Runtime PM, or for system suspend/resume.
    
    SoC devices that are part of the CPG/MSTP Clock Domain and can be
    power-managed through an MSTP clock should be tagged in DT with a
    proper "power-domains" property.
    
    The CPG/MSTP Clock Domain code will scan such devices for clocks that
    are suitable for power-managing the device, by looking for a clock that
    is compatible with "renesas,cpg-mstp-clocks".
    
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Acked-by: Laurent Pinchart <[email protected]>
    Acked-by: Stephen Boyd <[email protected]>
    Reviewed-by: Ulf Hansson <[email protected]>
    Reviewed-by: Kevin Hilman <[email protected]>
    Signed-off-by: Simon Horman <[email protected]>

commit a4198fd4b487afc60810f5a12b994721df220022
Author: Herbert Xu <[email protected]>
Date:   Thu Jul 30 17:53:23 2015 +0800

    crypto: testmgr - Reenable authenc tests
    
    Now that all implementations of authenc have been converted we can
    reenable the tests.
    
    Signed-off-by: Herbert Xu <[email protected]>

commit aeb4c132f33d21f6cf37558a932e66e40dd8982e
Author: Herbert Xu <[email protected]>
Date:   Thu Jul 30 17:53:22 2015 +0800

    crypto: talitos - Convert to new AEAD interface
    
    This patch converts talitos to the new AEAD interface.  IV generation
    has been removed since it's equivalent to a software implementation.
    
    Signed-off-by: Herbert Xu <[email protected]>

commit e19ab1211d2848ebd028c824041d8ea249fa3aae
Author: Herbert Xu <[email protected]>
Date:   Thu Jul 30 17:53:20 2015 +0800

    crypto: qat - Convert to new AEAD interface
    
    This patch converts qat to the new AEAD interface.  IV generation
    has been removed since it's equivalent to a software implementation.
    
    Signed-off-by: Herbert Xu <[email protected]>
    Tested-by: Tadeusz Struk <[email protected]>

commit c1359495c8a19fa686aa48512e0290d2f3846273
Author: Herbert Xu <[email protected]>
Date:   Thu Jul 30 17:53:19 2015 +0800

    crypto: picoxcell - Convert to new AEAD interface
    
    This patch converts picoxcell to the new AEAD interface.  IV
    generation has been removed since it's equivalent to a software
    implementation.
    
    As picoxcell cannot handle SG lists longer than 16 elements,
    this patch has made the software fallback mandatory.  If an SG
    list comes in that exceeds the limit, we will simply use the
    fallback.
    
    Signed-off-by: Herbert Xu <[email protected]>

commit d7295a8dc965ee0d5b3f9b1eb7f556c2bfa78420
Author: Herbert Xu <[email protected]>
Date:   Thu Jul 30 17:53:18 2015 +0800

    crypto: ixp4xx - Convert to new AEAD interface
    
    This patch converts ixp4xx to the new AEAD interface.  IV generation
    has been removed since it's a purely software implementation.
    
    Signed-off-by: Herbert Xu <[email protected]>

commit 479bcc7c5b9e1cbf3278462d786c37e468d5d404
Author: Herbert Xu <[email protected]>
Date:   Thu Jul 30 17:53:17 2015 +0800

    crypto: caam - Convert authenc to new AEAD interface
    
    This patch converts the authenc implementations in caam to the
    new AEAD interface.  The biggest change is that seqiv no longer
    generates a random IV.  Instead the IPsec sequence number is used
    as the IV.
    
    Signed-off-by: Herbert Xu <[email protected]>

commit 92d95ba91772279b6ef9c6e09661f67abcf27259
Author: Herbert Xu <[email protected]>
Date:   Thu Jul 30 17:53:16 2015 +0800

    crypto: authenc - Convert to new AEAD interface
    
    This patch converts authenc to the new AEAD interface.
    
    Signed-off-by: Herbert Xu <[email protected]>

commit 7079ce62c0e9bfcca35214105c08a2d00fbea9ee
Author: Herbert Xu <[email protected]>
Date:   Thu Jul 30 17:53:14 2015 +0800

    crypto: testmgr - Disable authenc test and convert test vectors
    
    This patch disables the authenc tests while the conversion to the
    new IV calling convention takes place.  It also replaces the authenc
    test vectors with ones that will work with the new IV convention.
    
    Signed-off-by: Herbert Xu <[email protected]>

commit fdf036507f1fc036d5a06753e9e8b13f46de73e8
Author: Fan Zhang <[email protected]>
Date:   Wed May 13 10:58:41 2015 +0200

    KVM: s390: host STP toleration for VMs
    
    If the host has STP enabled, the TOD of the host will be changed during
    synchronization phases. These are performed during a stop_machine() call.
    
    As the guest TOD is based on the host TOD, we have to make sure that:
    - no VCPU is in the SIE (implicitly guaranteed via stop_machine())
    - manual guest TOD calculations are not affected
    
    "Epoch" is the guest TOD clock delta to the host TOD clock. We have to
    adjust that value during the STP synchronization and make sure that code
    that accesses the epoch won't get interrupted in between (via disabling
    preemption).
    
    Signed-off-by: Fan Zhang <[email protected]>
    Reviewed-by: David Hildenbrand <[email protected]>
    Reviewed-by: Christian Borntraeger <[email protected]>
    Acked-by: Martin Schwidefsky <[email protected]>
    Signed-off-by: Christian Borntraeger <[email protected]>

commit 8578531dea9672fa17cce66d320ed7d7c17c837f
Author: Martin Schwidefsky <[email protected]>
Date:   Mon Aug 3 16:16:40 2015 +0200

    s390/vtime: limit MT scaling value updates
    
    The MT scaling values are updated on each calll to do_account_vtime.
    This function is called for each HZ interrupt and for each context
    switch. Context switch can happen often, the STCCTM instruction
    on this path is noticable. Limit the updates to once per jiffy.
    
    Signed-off-by: Martin Schwidefsky <[email protected]>

commit 5a7ff75a0c63222d138d944240146dc49a9624e1
Author: Heiko Carstens <[email protected]>
Date:   Tue Aug 4 09:15:58 2015 +0200

    s390/syscalls: ignore syscalls reachable via sys_socketcall
    
    x86 will wire up all syscalls reachable via sys_socketcall. Therefore this
    will yield a lot of warnings from the checksyscalls.sh scripts on s390
    where we currently don't wire them up directly.
    
    This might change in the future, but this needs to be done carefully in
    order to not break anything.
    
    For the time being just tell the checksyscalls script to ignore the missing
    syscalls on s390.
    
    Signed-off-by: Heiko Carstens <[email protected]>
    Signed-off-by: Martin Schwidefsky <[email protected]>

commit a763bc8b656d11b7424cd2696e19efca301d8aa4
Author: Philipp Hachtmann <[email protected]>
Date:   Fri May 8 17:40:44 2015 +0200

    s390/numa: enable support in s390 configs
    
    Signed-off-by: Philipp Hachtmann <[email protected]>
    Signed-off-by: Martin Schwidefsky <[email protected]>

commit c29a7baf091fc6b2c9e40561030f8c62e6145a19
Author: Michael Holzheu <[email protected]>
Date:   Thu Mar 6 18:47:21 2014 +0100

    s390/numa: add emulation support
    
    NUMA emulation (aka fake NUMA) distributes the available memory to nodes
    without using real topology information about the physical memory of the
    machine.
    
    Splitting the system memory into nodes replicates the memory management
    structures for each node. Particularly each node has its own "mm locks"
    and its own "kswapd" task.
    
    For large systems, under certain conditions, this results in improved
    system performance and/or latency based on reduced pressure on the mm
    locks and the kswapd tasks.
    
    NUMA emulation distributes CPUs to nodes while respecting the original
    machine topology information. This is done by trying to avoid to separate
    CPUs which reside on the same book or even on the same MC. Because the
    current Linux scheduler code requires a stable cpu to node mapping, cores
    are pinned to nodes when the first CPU thread is set online.
    
    This patch is based on the initial implementation from Philipp Hachtmann.
    
    Signed-off-by: Michael Holzheu <[email protected]>
    Signed-off-by: Martin Schwidefsky <[email protected]>

commit 56113f6e6f8d57d3c184544c6421422558a9988e
Author: Joe Perches <[email protected]>
Date:   Mon Aug 3 10:49:29 2015 -0700

    ASoC: atmel_ssc_dai: Correct misuse of 0x%<decimal>
    
    Correct misuse of 0x%d in logging message.
    
    Signed-off-by: Joe Perches <[email protected]>
    Signed-off-by: Mark Brown <[email protected]>

commit 4e491fe7920cb84dd0a2ea79800173ab1802fa22
Author: Dan Carpenter <[email protected]>
Date:   Tue Aug 4 10:47:23 2015 +0300

    extcon: Fix signedness bugs about break error handling
    
    Unsigned is never less than zero so this error handling won't work.
    
    Fixes: be052cc87745 ('extcon: Fix hang and extcon_get/set_cable_state().')
    Signed-off-by: Dan Carpenter <[email protected]>
    Reviewed-by: Roger Quadros <[email protected]>
    [cw00.choi: Change the patch title and fix signedness bug of find_cable_index_by_id() ]
    Signed-off-by: Chanwoo Choi <[email protected]>

commit 76bea64c4c8d7fa911eb485c4c2b8583e813331e
Author: Aaron Sierra <[email protected]>
Date:   Mon Aug 3 18:56:21 2015 -0500

    crypto: talitos - Remove zero_entry static initializer
    
    Compiling the talitos driver with my GCC 4.3.1 e500v2 cross-compiler
    resulted in a failed build due to the anonymous union/structures
    introduced in this commit:
    
      crypto: talitos - enhanced talitos_desc struct for SEC1
    
    The build error was:
    
      drivers/crypto/talitos.h:56: error: unknown field 'len' specified in initializer
      drivers/crypto/talitos.h:56: warning: missing braces around initializer
      drivers/crypto/talitos.h:56: warning: (near initialization for 'zero_entry.<anonymous>')
      drivers/crypto/talitos.h:57: error: unknown field 'j_extent' specified in initializer
      drivers/crypto/talitos.h:58: error: unknown field 'eptr' specified in initializer
      drivers/crypto/talitos.h:58: warning: excess elements in struct initializer
      drivers/crypto/talitos.h:58: warning: (near initialization for 'zero_entry')
      make[2]: *** [drivers/crypto/talitos.o] Error 1
      make[1]: *** [drivers/crypto] Error 2
      make: *** [drivers] Error 2
    
    This patch eliminates the errors by relying on the C standard's
    implicit assignment of zero to static variables.
    
    Signed-off-by: Aaron Sierra <[email protected]>
    Signed-off-by: Herbert Xu <[email protected]>

commit f6e45c24f401f3d0e648bfba304c83b64d763559
Author: Stephan Mueller <[email protected]>
Date:   Mon Aug 3 09:08:05 2015 +0200

    crypto: doc - AEAD API conversion
    
    The AEAD API changes are now reflected in the crypto API doc book.
    
    Signed-off-by: Stephan Mueller <[email protected]>
    Signed-off-by: Herbert Xu <[email protected]>

commit 327cbbabfb77c321fb9f21068c18e6bb951d07a7
Author: Colin Ian King <[email protected]>
Date:   Mon Aug 3 00:05:03 2015 +0100

    crypto: img-hash - fix spelling mistake in dev_err error message
    
    Trival change, fix spelling mistake 'aquire' -> 'acquire' in
    dev_err message.
    
    Signed-off-by: Colin Ian King <[email protected]>
    Signed-off-by: Herbert Xu <[email protected]>

commit f109ff110b0f3e34cea45996734da485a2fdaa42
Author: Hariprasad Shenai <[email protected]>
Date:   Tue Aug 4 14:36:20 2015 +0530

    cxgb4: Update T6 register ranges
    
    Signed-off-by: Hariprasad Shenai <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>

commit d86bd29e0b31f30d5d85ab21385b59703ecc6464
Author: Hariprasad Shenai <[email protected]>
Date:   Tue Aug 4 14:36:19 2015 +0530

    cxgb4/cxgb4vf: read the correct bits of PL Who Am I register
    
    Read the correct bits of PL Who Am I for the Source PF field which has
    changed in T6
    
    Signed-off-by: Hariprasad Shenai <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>

commit bf8ebb67dae0a07db7aebe7a65c178ff24d90842
Author: Hariprasad Shenai <[email protected]>
Date:   Tue Aug 4 14:36:18 2015 +0530

    cxgb4: Add support to dump edc bist status
    
    Add support to dump edc bist status for ECC data errors
    
    Signed-off-by: Hariprasad Shenai <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>

commit 5888111cb8f7368304db42787c9495d4b2b82e06
Author: Hariprasad Shenai <[email protected]>
Date:   Tue Aug 4 14:36:17 2015 +0530

    cxgb4: Add debugfs support to dump meminfo
    
    Add debug support to dump memory address ranges of various hardware
    modules of the adapter.
    
    Signed-off-by: Hariprasad Shenai <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>

commit c231afa3ccf176490dcafc3666559e7567690e76
Author: Christian Borntraeger <[email protected]>
Date:   Tue Aug 4 09:33:44 2015 +0200

    compiler.h: cast away attributes in WRITE_ONCE magic
    
    kernel build bot showed a warning triggered by commit
    76695af20c01 ("locking, arch: use WRITE_ONCE()/READ_ONCE() in
    smp_store_release()/smp_load_acquire()"). Turns out that sparse
    does not like WRITE_ONCE accessing elements from the (sparse)
    rcu address space.
    
    fs/afs/inode.c:448:9: sparse: incorrect type in initializer (different address spaces)
    fs/afs/inode.c:448:9:    expected struct afs_permits *__val
    fs/afs/inode.c:448:9:    got void [noderef] <asn:4>*<noident>
    
    Solution is to force cast away the sparse attributes for the initializer
    of the union in WRITE_SAME. As this now gets too long, lets split
    the macro.
    
    Signed-off-by: Christian Borntraeger <[email protected]>

commit 6b1621c4a15b9110cda7cc2e2eb3e8e1a0c2bcfc
Author: Chanwoo Choi <[email protected]>
Date:   Fri Jul 24 12:58:41 2015 +0900

    ARM: EXYNOS: Add exynos3250 compatible to use generic cpufreq driver
    
    This patch add exynos3250 compatible string to exynos_cpufreq_matches
    for supporting generic cpufreq driver on Exynos3250.
    
    Signed-off-by: Chanwoo Choi <[email protected]>
    Acked-by: Kyungmin Park <[email protected]>
    Reviewed-by: Krzysztof Kozlowski <[email protected]>
    Reviewed-by: Bartlomiej Zolnierkiewicz <[email protected]>
    Signed-off-by: Kukjin Kim <[email protected]>

commit d4f279f154138d252854a21d34626f1c7ca85b60
Author: Thomas Abraham <[email protected]>
Date:   Wed Jul 1 15:10:37 2015 +0200

    ARM: EXYNOS: switch to using generic cpufreq driver for exynos5250
    
    The new CPU clock type allows the use of generic CPUfreq driver.
    Switch Exynos5250 to using generic cpufreq driver.
    
    Cc: Tomasz Figa <[email protected]>
    Signed-off-by: Thomas Abraham <[email protected]>
    [b.zolnierkie: split Exynos5250 support from the original patch]
    Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
    Reviewed-by: Javier Martinez Canillas <[email protected]>
    Tested-by: Javier Martinez Canillas <[email protected]>
    Acked-by: Viresh Kumar <[email protected]>
    Signed-off-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: Kukjin Kim <[email protected]>

commit a6affd24f439feddec04bab4d1e3ad6579868367
Author: Robert Shearman <[email protected]>
Date:   Mon Aug 3 17:50:04 2015 +0100

    mpls: Use definition for reserved label checks
    
    In multiple locations there are checks for whether the label in hand
    is a reserved label or not using the arbritray value of 16. Factor
    this out into a #define for better maintainability and for
    documentation.
    
    Signed-off-by: Robert Shearman <[email protected]>
    Acked-by: Roopa Prabhu <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>

commit 0335f5b500adcc28bc3fd5d8a1e4482c348cff4a
Author: Robert Shearman <[email protected]>
Date:   Mon Aug 3 17:39:21 2015 +0100

    ipv4: apply lwtunnel encap for locally-generated packets
    
    lwtunnel encap is applied for forwarded packets, but not for
    locally-generated packets. This is because the output function is not
    overridden in __mkroute_output, unlike it is in __mkroute_input.
    
    The lwtunnel state is correctly set on the rth through the call to
    rt_set_nexthop, so all that needs to be done is to override the dst
    output function to be lwtunnel_output if there is lwtunnel state
    present and it requires output redirection.
    
    Signed-off-by: Robert Shearman <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>

commit abf7c1c540f8330fead5d50730d92606dcbe7a7e
Author: Robert Shearman <[email protected]>
Date:   Mon Aug 3 17:39:20 2015 +0100

    lwtunnel: set skb protocol and dev
    
    In the locally-generated packet path skb->protocol may not be set and
    this is required for the lwtunnel encap in order to get the lwtstate.
    
    This would otherwise have been set by ip_output or ip6_output so set
    skb->protocol prior to calling the lwtunnel encap
    function. Additionally set skb->dev in case it is needed further down
    the transmit path.
    
    Signed-off-by: Robert Shearman <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>

commit 2475b22526d70234ecfe4a1ff88aed69badefba9
Author: Ross Lagerwall <[email protected]>
Date:   Mon Aug 3 15:38:03 2015 +0100

    xen-netback: Allocate fraglist early to avoid complex rollback
    
    Determine if a fraglist is needed in the tx path, and allocate it if
    necessary before setting up the copy and map operations.
    Otherwise, undoing the copy and map operations is tricky.
    
    This fixes a use-after-free: if allocating the fraglist failed, the copy
    and map operations that had been set up were still executed, writing
    over the data area of a freed skb.
    
    Signed-off-by: Ross Lagerwall <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>

commit 10e2eb878f3ca07ac2f05fa5ca5e6c4c9174a27a
Author: Eric Dumazet <[email protected]>
Date:   Sat Aug 1 12:14:33 2015 +0200

    udp: fix dst races with multicast early demux
    
    Multicast dst are not cached. They carry DST_NOCACHE.
    
    As mentioned in commit f8864972126899 ("ipv4: fix dst race in
    sk_dst_get()"), these dst need special care before caching them
    into a socket.
    
    Caching them is allowed only if their refcnt was not 0, ie we
    must use atomic_inc_not_ze…
diaevd referenced this pull request in diaevd/zen-kernel Dec 30, 2015
exfat_super.c: use strncasecmp instead of strnicmp
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Aug 9, 2016
This commit amends my old commit fe35637 ("[media] dvb_frontend:
eliminate blocking wait in dvb_unregister_frontend()"), which added
kref to struct dvb_frontend_private.  It turned out that there are
several use-after-free bugs left, which affect the struct
dvb_frontend.  Protecting it with kref also protects struct
dvb_frontend_private, so we can simply move it.

This is how the use-after-free looks like in KASAN:

    BUG: KASAN: use-after-free in string+0x60/0xb1 at addr ffff880033bd9fc0
    Read of size 1 by task kworker/0:2/617
    CPU: 0 PID: 617 Comm: kworker/0:2 Not tainted 4.8.0-rc1-hosting+ torvalds#60
    Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
    Workqueue: usb_hub_wq hub_event
     0000000000000000 ffff880033757218 ffffffff81394e50 ffff880033bd9fd0
     ffff880035c03b00 ffff880033757240 ffffffff811f271d ffff880033bd9fc0
     1ffff1000677b3f8 ffffed000677b3f8 ffff8800337572b8 ffffffff811f2afe
    Call Trace:
     [...]
     [<ffffffff813a2d2f>] vsnprintf+0x39d/0x7e9
     [<ffffffff813993f9>] add_uevent_var+0x10f/0x1dc
     [<ffffffff814fe5ca>] rc_dev_uevent+0x55/0x6f
     [<ffffffff814438f8>] dev_uevent+0x2e1/0x316
     [<ffffffff81399744>] kobject_uevent_env+0x27e/0x701
     [<ffffffff81399bd2>] kobject_uevent+0xb/0xd
     [<ffffffff81443445>] device_del+0x322/0x383
     [<ffffffff81500c0c>] rc_unregister_device+0x98/0xc3
     [<ffffffff81508fb4>] dvb_usb_remote_exit+0x7a/0x90
     [<ffffffff81506157>] dvb_usb_exit+0x1d/0xe5
     [<ffffffff81506e90>] dvb_usb_device_exit+0x69/0x7d
     [<ffffffff8150a181>] pctv452e_usb_disconnect+0x7b/0x80
     [...]
    Object at ffff880033bd9fc0, in cache kmalloc-16 size: 16
    Allocated:
     [...]
    Freed:
    PID = 617
     [...]
     [<ffffffff811f034c>] kfree+0xd9/0x166
     [<ffffffff814fe513>] ir_free_table+0x2f/0x51
     [<ffffffff81500bc1>] rc_unregister_device+0x4d/0xc3
     [<ffffffff81508fb4>] dvb_usb_remote_exit+0x7a/0x90
     [<ffffffff81506157>] dvb_usb_exit+0x1d/0xe5
     [<ffffffff81506e90>] dvb_usb_device_exit+0x69/0x7d
     [<ffffffff8150a181>] pctv452e_usb_disconnect+0x7b/0x80

Another one:

    BUG: KASAN: use-after-free in do_sys_poll+0x336/0x6b8 at addr ffff88003563fcc0
    Read of size 8 by task tuner on fronte/1042
    CPU: 1 PID: 1042 Comm: tuner on fronte Tainted: G    B           4.8.0-rc1-hosting+ torvalds#60
    Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
     0000000000000000 ffff88003353f910 ffffffff81394e50 ffff88003563fd80
     ffff880035c03200 ffff88003353f938 ffffffff811f271d ffff88003563fc80
     1ffff10006ac7f98 ffffed0006ac7f98 ffff88003353f9b0 ffffffff811f2afe
    Call Trace:
     [...]
     [<ffffffff812289b3>] do_sys_poll+0x336/0x6b8
     [...]
     [<ffffffff81228ed9>] SyS_poll+0xa9/0x194
     [...]
    Object at ffff88003563fc80, in cache kmalloc-256 size: 256
    Allocated:
     [...]
    Freed:
    PID = 617
     [...]
     [<ffffffff811f034c>] kfree+0xd9/0x166
     [<ffffffff814eb60d>] dvb_unregister_device+0xd6/0xe5
     [<ffffffff814fa4ed>] dvb_unregister_frontend+0x4b/0x66
     [<ffffffff8150810b>] dvb_usb_adapter_frontend_exit+0x69/0xac
     [<ffffffff8150617d>] dvb_usb_exit+0x43/0xe5
     [<ffffffff81506e90>] dvb_usb_device_exit+0x69/0x7d
     [<ffffffff8150a181>] pctv452e_usb_disconnect+0x7b/0x80

Signed-off-by: Max Kellermann <[email protected]>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Aug 19, 2016
…heckpatch-fixes

WARNING: A patch subject line should describe the change not the tool that found it
#2: 
Subject: sysctl-handle-error-writing-uint_max-to-u32-fields-checkpatch-fixes

WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
torvalds#35: 
      mechanically convert to the typical style using --fix or --fix-inplace.

WARNING: please, no spaces at the start of a line
torvalds#60: FILE: kernel/sysctl.c:2277:
+    return do_proc_dointvec(table, write, buffer, lenp, ppos, NULL, NULL);$

WARNING: please, no spaces at the start of a line
torvalds#69: FILE: kernel/sysctl.c:2296:
+    return do_proc_dointvec(table, write, buffer, lenp, ppos,$

total: 0 errors, 4 warnings, 17 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/sysctl-handle-error-writing-uint_max-to-u32-fields-checkpatch-fixes.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Subash Abhinov Kasiviswanathan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Aug 19, 2016
…heckpatch-fixes

WARNING: A patch subject line should describe the change not the tool that found it
#2:
Subject: sysctl-handle-error-writing-uint_max-to-u32-fields-checkpatch-fixes

WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
torvalds#35:
      mechanically convert to the typical style using --fix or --fix-inplace.

WARNING: please, no spaces at the start of a line
torvalds#60: FILE: kernel/sysctl.c:2277:
+    return do_proc_dointvec(table, write, buffer, lenp, ppos, NULL, NULL);$

WARNING: please, no spaces at the start of a line
torvalds#69: FILE: kernel/sysctl.c:2296:
+    return do_proc_dointvec(table, write, buffer, lenp, ppos,$

total: 0 errors, 4 warnings, 17 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/sysctl-handle-error-writing-uint_max-to-u32-fields-checkpatch-fixes.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Subash Abhinov Kasiviswanathan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
koct9i pushed a commit to koct9i/linux that referenced this pull request Aug 21, 2016
…heckpatch-fixes

WARNING: A patch subject line should describe the change not the tool that found it
#2: 
Subject: sysctl-handle-error-writing-uint_max-to-u32-fields-checkpatch-fixes

WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
torvalds#35: 
      mechanically convert to the typical style using --fix or --fix-inplace.

WARNING: please, no spaces at the start of a line
torvalds#60: FILE: kernel/sysctl.c:2277:
+    return do_proc_dointvec(table, write, buffer, lenp, ppos, NULL, NULL);$

WARNING: please, no spaces at the start of a line
torvalds#69: FILE: kernel/sysctl.c:2296:
+    return do_proc_dointvec(table, write, buffer, lenp, ppos,$

total: 0 errors, 4 warnings, 17 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/sysctl-handle-error-writing-uint_max-to-u32-fields-checkpatch-fixes.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Subash Abhinov Kasiviswanathan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Aug 22, 2016
…heckpatch-fixes

WARNING: A patch subject line should describe the change not the tool that found it
#2: 
Subject: sysctl-handle-error-writing-uint_max-to-u32-fields-checkpatch-fixes

WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
torvalds#35: 
      mechanically convert to the typical style using --fix or --fix-inplace.

WARNING: please, no spaces at the start of a line
torvalds#60: FILE: kernel/sysctl.c:2277:
+    return do_proc_dointvec(table, write, buffer, lenp, ppos, NULL, NULL);$

WARNING: please, no spaces at the start of a line
torvalds#69: FILE: kernel/sysctl.c:2296:
+    return do_proc_dointvec(table, write, buffer, lenp, ppos,$

total: 0 errors, 4 warnings, 17 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/sysctl-handle-error-writing-uint_max-to-u32-fields-checkpatch-fixes.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Subash Abhinov Kasiviswanathan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Aug 24, 2016
…heckpatch-fixes

WARNING: A patch subject line should describe the change not the tool that found it
#2: 
Subject: sysctl-handle-error-writing-uint_max-to-u32-fields-checkpatch-fixes

WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
torvalds#35: 
      mechanically convert to the typical style using --fix or --fix-inplace.

WARNING: please, no spaces at the start of a line
torvalds#60: FILE: kernel/sysctl.c:2277:
+    return do_proc_dointvec(table, write, buffer, lenp, ppos, NULL, NULL);$

WARNING: please, no spaces at the start of a line
torvalds#69: FILE: kernel/sysctl.c:2296:
+    return do_proc_dointvec(table, write, buffer, lenp, ppos,$

total: 0 errors, 4 warnings, 17 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/sysctl-handle-error-writing-uint_max-to-u32-fields-checkpatch-fixes.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Subash Abhinov Kasiviswanathan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Aug 24, 2016
…heckpatch-fixes

WARNING: A patch subject line should describe the change not the tool that found it
#2:
Subject: sysctl-handle-error-writing-uint_max-to-u32-fields-checkpatch-fixes

WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
torvalds#35:
      mechanically convert to the typical style using --fix or --fix-inplace.

WARNING: please, no spaces at the start of a line
torvalds#60: FILE: kernel/sysctl.c:2277:
+    return do_proc_dointvec(table, write, buffer, lenp, ppos, NULL, NULL);$

WARNING: please, no spaces at the start of a line
torvalds#69: FILE: kernel/sysctl.c:2296:
+    return do_proc_dointvec(table, write, buffer, lenp, ppos,$

total: 0 errors, 4 warnings, 17 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/sysctl-handle-error-writing-uint_max-to-u32-fields-checkpatch-fixes.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Subash Abhinov Kasiviswanathan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
fengguang pushed a commit to 0day-ci/linux that referenced this pull request Oct 31, 2016
…ckpatch-fixes

WARNING: line over 80 characters
torvalds#59: FILE: mm/mempolicy.c:1686:
+		 * __GFP_THISNODE shouldn't even be used with the bind policy because

WARNING: line over 80 characters
torvalds#60: FILE: mm/mempolicy.c:1687:
+		 * we might easily break the expectation to stay on the requested node

WARNING: line over 80 characters
torvalds#69: FILE: mm/mempolicy.c:1690:
+		WARN_ON_ONCE(policy->mode == MPOL_BIND && (gfp & __GFP_THISNODE));

total: 0 errors, 3 warnings, 33 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/mm-mempolicy-clean-up-__gfp_thisnode-confusion-in-policy_zonelist.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Michal Hocko <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
fengguang pushed a commit to 0day-ci/linux that referenced this pull request Nov 8, 2016
…ckpatch-fixes

WARNING: line over 80 characters
torvalds#59: FILE: mm/mempolicy.c:1686:
+		 * __GFP_THISNODE shouldn't even be used with the bind policy because

WARNING: line over 80 characters
torvalds#60: FILE: mm/mempolicy.c:1687:
+		 * we might easily break the expectation to stay on the requested node

WARNING: line over 80 characters
torvalds#69: FILE: mm/mempolicy.c:1690:
+		WARN_ON_ONCE(policy->mode == MPOL_BIND && (gfp & __GFP_THISNODE));

total: 0 errors, 3 warnings, 33 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/mm-mempolicy-clean-up-__gfp_thisnode-confusion-in-policy_zonelist.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Michal Hocko <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
fengguang pushed a commit to 0day-ci/linux that referenced this pull request Nov 9, 2016
…ckpatch-fixes

WARNING: line over 80 characters
torvalds#59: FILE: mm/mempolicy.c:1686:
+		 * __GFP_THISNODE shouldn't even be used with the bind policy because

WARNING: line over 80 characters
torvalds#60: FILE: mm/mempolicy.c:1687:
+		 * we might easily break the expectation to stay on the requested node

WARNING: line over 80 characters
torvalds#69: FILE: mm/mempolicy.c:1690:
+		WARN_ON_ONCE(policy->mode == MPOL_BIND && (gfp & __GFP_THISNODE));

total: 0 errors, 3 warnings, 33 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/mm-mempolicy-clean-up-__gfp_thisnode-confusion-in-policy_zonelist.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Michal Hocko <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Aug 3, 2023
fix typo in comment

WARNING: 'avaliable' may be misspelled - perhaps 'available'?
torvalds#60: FILE: mm/swapfile.c:2332:
+	/* add to avaliable list iff swap device is not full */
 	          ^^^^^^^^^

total: 0 errors, 1 warnings, 11 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/swap-stop-add-to-avail-list-is-swap-is-full.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Hugh Dickins <[email protected]>
Cc: Ma Wupeng <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Aug 4, 2023
fix typo in comment

WARNING: 'avaliable' may be misspelled - perhaps 'available'?
torvalds#60: FILE: mm/swapfile.c:2332:
+	/* add to avaliable list iff swap device is not full */
 	          ^^^^^^^^^

total: 0 errors, 1 warnings, 11 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/swap-stop-add-to-avail-list-is-swap-is-full.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Hugh Dickins <[email protected]>
Cc: Ma Wupeng <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Aug 5, 2023
fix typo in comment

WARNING: 'avaliable' may be misspelled - perhaps 'available'?
torvalds#60: FILE: mm/swapfile.c:2332:
+	/* add to avaliable list iff swap device is not full */
 	          ^^^^^^^^^

total: 0 errors, 1 warnings, 11 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/swap-stop-add-to-avail-list-is-swap-is-full.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Hugh Dickins <[email protected]>
Cc: Ma Wupeng <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Aug 8, 2023
fix typo in comment

WARNING: 'avaliable' may be misspelled - perhaps 'available'?
torvalds#60: FILE: mm/swapfile.c:2332:
+	/* add to avaliable list iff swap device is not full */
 	          ^^^^^^^^^

total: 0 errors, 1 warnings, 11 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/swap-stop-add-to-avail-list-is-swap-is-full.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Hugh Dickins <[email protected]>
Cc: Ma Wupeng <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Aug 9, 2023
fix typo in comment

WARNING: 'avaliable' may be misspelled - perhaps 'available'?
torvalds#60: FILE: mm/swapfile.c:2332:
+	/* add to avaliable list iff swap device is not full */
 	          ^^^^^^^^^

total: 0 errors, 1 warnings, 11 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/swap-stop-add-to-avail-list-is-swap-is-full.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Hugh Dickins <[email protected]>
Cc: Ma Wupeng <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Aug 11, 2023
fix typo in comment

WARNING: 'avaliable' may be misspelled - perhaps 'available'?
torvalds#60: FILE: mm/swapfile.c:2332:
+	/* add to avaliable list iff swap device is not full */
 	          ^^^^^^^^^

total: 0 errors, 1 warnings, 11 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/swap-stop-add-to-avail-list-is-swap-is-full.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Hugh Dickins <[email protected]>
Cc: Ma Wupeng <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Aug 12, 2023
fix typo in comment

WARNING: 'avaliable' may be misspelled - perhaps 'available'?
torvalds#60: FILE: mm/swapfile.c:2332:
+	/* add to avaliable list iff swap device is not full */
 	          ^^^^^^^^^

total: 0 errors, 1 warnings, 11 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/swap-stop-add-to-avail-list-is-swap-is-full.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Hugh Dickins <[email protected]>
Cc: Ma Wupeng <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Aug 12, 2023
When flushing, individual set elements are disabled in the next
generation via the ->flush callback.

Catchall elements are not disabled.  This is incorrect and may lead to
double-deactivations of catchall elements which then results in memory
leaks:

WARNING: CPU: 1 PID: 3300 at include/net/netfilter/nf_tables.h:1172 nft_map_deactivate+0x549/0x730
CPU: 1 PID: 3300 Comm: nft Not tainted 6.5.0-rc5+ torvalds#60
RIP: 0010:nft_map_deactivate+0x549/0x730
 [..]
 ? nft_map_deactivate+0x549/0x730
 nf_tables_delset+0xb66/0xeb0

(the warn is due to nft_use_dec() detecting underflow).

Fixes: aaa3104 ("netfilter: nftables: add catch-all set element support")
Reported-by: lonial con <[email protected]>
Signed-off-by: Florian Westphal <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Aug 16, 2023
When flushing, individual set elements are disabled in the next
generation via the ->flush callback.

Catchall elements are not disabled.  This is incorrect and may lead to
double-deactivations of catchall elements which then results in memory
leaks:

WARNING: CPU: 1 PID: 3300 at include/net/netfilter/nf_tables.h:1172 nft_map_deactivate+0x549/0x730
CPU: 1 PID: 3300 Comm: nft Not tainted 6.5.0-rc5+ torvalds#60
RIP: 0010:nft_map_deactivate+0x549/0x730
 [..]
 ? nft_map_deactivate+0x549/0x730
 nf_tables_delset+0xb66/0xeb0

(the warn is due to nft_use_dec() detecting underflow).

Fixes: aaa3104 ("netfilter: nftables: add catch-all set element support")
Reported-by: lonial con <[email protected]>
Signed-off-by: Florian Westphal <[email protected]>
mj22226 pushed a commit to mj22226/linux that referenced this pull request Aug 21, 2023
[ Upstream commit 90e5b34 ]

When flushing, individual set elements are disabled in the next
generation via the ->flush callback.

Catchall elements are not disabled.  This is incorrect and may lead to
double-deactivations of catchall elements which then results in memory
leaks:

WARNING: CPU: 1 PID: 3300 at include/net/netfilter/nf_tables.h:1172 nft_map_deactivate+0x549/0x730
CPU: 1 PID: 3300 Comm: nft Not tainted 6.5.0-rc5+ torvalds#60
RIP: 0010:nft_map_deactivate+0x549/0x730
 [..]
 ? nft_map_deactivate+0x549/0x730
 nf_tables_delset+0xb66/0xeb0

(the warn is due to nft_use_dec() detecting underflow).

Fixes: aaa3104 ("netfilter: nftables: add catch-all set element support")
Reported-by: lonial con <[email protected]>
Signed-off-by: Florian Westphal <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
mj22226 pushed a commit to mj22226/linux that referenced this pull request Aug 21, 2023
[ Upstream commit 90e5b34 ]

When flushing, individual set elements are disabled in the next
generation via the ->flush callback.

Catchall elements are not disabled.  This is incorrect and may lead to
double-deactivations of catchall elements which then results in memory
leaks:

WARNING: CPU: 1 PID: 3300 at include/net/netfilter/nf_tables.h:1172 nft_map_deactivate+0x549/0x730
CPU: 1 PID: 3300 Comm: nft Not tainted 6.5.0-rc5+ torvalds#60
RIP: 0010:nft_map_deactivate+0x549/0x730
 [..]
 ? nft_map_deactivate+0x549/0x730
 nf_tables_delset+0xb66/0xeb0

(the warn is due to nft_use_dec() detecting underflow).

Fixes: aaa3104 ("netfilter: nftables: add catch-all set element support")
Reported-by: lonial con <[email protected]>
Signed-off-by: Florian Westphal <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
ptr1337 pushed a commit to CachyOS/linux that referenced this pull request Aug 23, 2023
[ Upstream commit 90e5b34 ]

When flushing, individual set elements are disabled in the next
generation via the ->flush callback.

Catchall elements are not disabled.  This is incorrect and may lead to
double-deactivations of catchall elements which then results in memory
leaks:

WARNING: CPU: 1 PID: 3300 at include/net/netfilter/nf_tables.h:1172 nft_map_deactivate+0x549/0x730
CPU: 1 PID: 3300 Comm: nft Not tainted 6.5.0-rc5+ torvalds#60
RIP: 0010:nft_map_deactivate+0x549/0x730
 [..]
 ? nft_map_deactivate+0x549/0x730
 nf_tables_delset+0xb66/0xeb0

(the warn is due to nft_use_dec() detecting underflow).

Fixes: aaa3104 ("netfilter: nftables: add catch-all set element support")
Reported-by: lonial con <[email protected]>
Signed-off-by: Florian Westphal <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
1054009064 pushed a commit to 1054009064/linux that referenced this pull request Aug 23, 2023
[ Upstream commit 90e5b34 ]

When flushing, individual set elements are disabled in the next
generation via the ->flush callback.

Catchall elements are not disabled.  This is incorrect and may lead to
double-deactivations of catchall elements which then results in memory
leaks:

WARNING: CPU: 1 PID: 3300 at include/net/netfilter/nf_tables.h:1172 nft_map_deactivate+0x549/0x730
CPU: 1 PID: 3300 Comm: nft Not tainted 6.5.0-rc5+ torvalds#60
RIP: 0010:nft_map_deactivate+0x549/0x730
 [..]
 ? nft_map_deactivate+0x549/0x730
 nf_tables_delset+0xb66/0xeb0

(the warn is due to nft_use_dec() detecting underflow).

Fixes: aaa3104 ("netfilter: nftables: add catch-all set element support")
Reported-by: lonial con <[email protected]>
Signed-off-by: Florian Westphal <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
1054009064 pushed a commit to 1054009064/linux that referenced this pull request Aug 26, 2023
[ Upstream commit 90e5b34 ]

When flushing, individual set elements are disabled in the next
generation via the ->flush callback.

Catchall elements are not disabled.  This is incorrect and may lead to
double-deactivations of catchall elements which then results in memory
leaks:

WARNING: CPU: 1 PID: 3300 at include/net/netfilter/nf_tables.h:1172 nft_map_deactivate+0x549/0x730
CPU: 1 PID: 3300 Comm: nft Not tainted 6.5.0-rc5+ torvalds#60
RIP: 0010:nft_map_deactivate+0x549/0x730
 [..]
 ? nft_map_deactivate+0x549/0x730
 nf_tables_delset+0xb66/0xeb0

(the warn is due to nft_use_dec() detecting underflow).

Fixes: aaa3104 ("netfilter: nftables: add catch-all set element support")
Reported-by: lonial con <[email protected]>
Signed-off-by: Florian Westphal <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Sep 15, 2023
Inject fault while probing btrfs.ko, if the first kzalloc() fails
in __static_call_init(), key->mods will no be initialized. And then
in static_call_del_module() the site_mod->mod will cause
wild-memory-access as below:

So assign key->mods to NULL in __static_call_init() if it fails
to fix the issue. And if kzalloc fails, it will just return in init
func, so it should break if it the key->mods is NULL in exit func.

 general protection fault, probably for non-canonical address 0xeb800159c89f94a0: 0000 [#1] PREEMPT SMP KASAN
 KASAN: maybe wild-memory-access in range [0x5c002ace44fca500-0x5c002ace44fca507]
 CPU: 2 PID: 1843 Comm: modprobe Tainted: G        W        N 6.6.0-rc1+ torvalds#60
 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014
 RIP: 0010:static_call_del_module+0x113/0x280
 Code: 3c 20 00 0f 85 ef 00 00 00 49 8b 6e 08 48 85 ed 75 0d eb 75 48 85 db 74 70 49 89 ef 48 89 dd 48 8d 7d 08 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 75 78 48 89 e8 4c 8b 6d 08 48 c1 e8 03 42 80 3c 20
 RSP: 0018:ffff888101d3f860 EFLAGS: 00010206
 RAX: 0b800559c89f94a0 RBX: 5c002ace44fca4f8 RCX: ffffffffa0210f00
 RDX: ffffffffa0210ed4 RSI: ffffffffa0210edc RDI: 5c002ace44fca500
 RBP: 5c002ace44fca4f8 R08: 0000000000000000 R09: ffffed10233e4eea
 R10: ffffed10233e4ee9 R11: ffff888119f2774b R12: dffffc0000000000
 R13: 80002ace3cfca4f8 R14: ffffffff85196de0 R15: ffffffff84ee9f99
 FS:  00007f4ff6faa540(0000) GS:ffff888119f00000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: 00007ffc3d1f19e8 CR3: 0000000109fa6001 CR4: 0000000000170ee0
 DR0: ffffffff8faefce8 DR1: ffffffff8faefce9 DR2: ffffffff8faefcea
 DR3: ffffffff8faefceb DR6: 00000000ffff0ff0 DR7: 0000000000000600
 Call Trace:
  <TASK>
  ? __die_body+0x1b/0x60
  ? die_addr+0x43/0x70
  ? exc_general_protection+0x121/0x210
  ? asm_exc_general_protection+0x22/0x30
  ? static_call_del_module+0x113/0x280
  ? __SCT__tp_func_ipi_exit+0x8/0x8
  static_call_module_notify+0x27f/0x390
  ? rcu_segcblist_inc_len+0x17/0x20
  notifier_call_chain+0xbf/0x280
  notifier_call_chain_robust+0x7f/0xe0
  ? notifier_call_chain+0x280/0x280
  ? kasan_quarantine_put+0x46/0x160
  blocking_notifier_call_chain_robust+0x5b/0x80
  load_module+0x4d1d/0x69f0
  ? module_frob_arch_sections+0x20/0x20
  ? update_cfs_group+0x10c/0x2a0
  ? __wake_up_common+0x10b/0x5d0
  ? kernel_read_file+0x3ca/0x510
  ? __x64_sys_fsconfig+0x650/0x650
  ? __schedule+0xa0b/0x2a60
  ? init_module_from_file+0xd2/0x130
  init_module_from_file+0xd2/0x130
  ? __ia32_sys_init_module+0xa0/0xa0
  ? _raw_spin_lock_irqsave+0xe0/0xe0
  ? ptrace_stop+0x487/0x790
  idempotent_init_module+0x32d/0x6a0
  ? init_module_from_file+0x130/0x130
  ? __fget_light+0x57/0x500
  __x64_sys_finit_module+0xbb/0x130
  do_syscall_64+0x35/0x80
  entry_SYSCALL_64_after_hwframe+0x46/0xb0
 RIP: 0033:0x7f4ff691b839
 Code: 00 f3 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 1f f6 2c 00 f7 d8 64 89 01 48
 RSP: 002b:00007ffc07b09718 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
 RAX: ffffffffffffffda RBX: 000055978f13e070 RCX: 00007f4ff691b839
 RDX: 0000000000000000 RSI: 000055978da1bc2e RDI: 0000000000000003
 RBP: 000055978da1bc2e R08: 0000000000000000 R09: 000055978f13ddb0
 R10: 0000000000000003 R11: 0000000000000246 R12: 0000000000000000
 R13: 000055978f13e020 R14: 0000000000040000 R15: 000055978f13ddb0
  </TASK>
 Modules linked in: tifm_core(+)
 Dumping ftrace buffer:
    (ftrace buffer empty)
 ---[ end trace 0000000000000000 ]---
 RIP: 0010:static_call_del_module+0x113/0x280
 Code: 3c 20 00 0f 85 ef 00 00 00 49 8b 6e 08 48 85 ed 75 0d eb 75 48 85 db 74 70 49 89 ef 48 89 dd 48 8d 7d 08 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 75 78 48 89 e8 4c 8b 6d 08 48 c1 e8 03 42 80 3c 20
 RSP: 0018:ffff888101d3f860 EFLAGS: 00010206
 RAX: 0b800559c89f94a0 RBX: 5c002ace44fca4f8 RCX: ffffffffa0210f00
 RDX: ffffffffa0210ed4 RSI: ffffffffa0210edc RDI: 5c002ace44fca500
 RBP: 5c002ace44fca4f8 R08: 0000000000000000 R09: ffffed10233e4eea
 R10: ffffed10233e4ee9 R11: ffff888119f2774b R12: dffffc0000000000
 R13: 80002ace3cfca4f8 R14: ffffffff85196de0 R15: ffffffff84ee9f99
 FS:  00007f4ff6faa540(0000) GS:ffff888119f00000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: 00007ffc3d1f19e8 CR3: 0000000109fa6001 CR4: 0000000000170ee0
 DR0: ffffffff8faefce8 DR1: ffffffff8faefce9 DR2: ffffffff8faefcea
 DR3: ffffffff8faefceb DR6: 00000000ffff0ff0 DR7: 0000000000000600
 Kernel panic - not syncing: Fatal exception
 Dumping ftrace buffer:
    (ftrace buffer empty)
 Kernel Offset: disabled
 Rebooting in 1 seconds..

Fixes: 8fd4ddd ("static_call: Don't make __static_call_return0 static")
Signed-off-by: Jinjie Ruan <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Sep 15, 2023
Inject fault while probing btrfs.ko, if the first kzalloc() fails
in __static_call_init(), key->mods will all no be initialized in this
site and subsequent sites. And then in static_call_del_module() the
site_mod->mod will cause wild-memory-access as below.

To fix the issue, assign key->mods to NULL in __static_call_init() if it
fails. On the other hand, if kzalloc fails, it will just return in init
func. Even if static_call_key_sites(key) = true, the exit func will match
the mod before the site_mod->next = NULL node is traversed. So just
break if it the key->mods is NULL in exit func to avoid
wild-memory-access in the subsequent site traversal.

 general protection fault, probably for non-canonical address 0xeb800159c89f94a0: 0000 [#1] PREEMPT SMP KASAN
 KASAN: maybe wild-memory-access in range [0x5c002ace44fca500-0x5c002ace44fca507]
 CPU: 2 PID: 1843 Comm: modprobe Tainted: G        W        N 6.6.0-rc1+ torvalds#60
 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014
 RIP: 0010:static_call_del_module+0x113/0x280
 Code: 3c 20 00 0f 85 ef 00 00 00 49 8b 6e 08 48 85 ed 75 0d eb 75 48 85 db 74 70 49 89 ef 48 89 dd 48 8d 7d 08 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 75 78 48 89 e8 4c 8b 6d 08 48 c1 e8 03 42 80 3c 20
 RSP: 0018:ffff888101d3f860 EFLAGS: 00010206
 RAX: 0b800559c89f94a0 RBX: 5c002ace44fca4f8 RCX: ffffffffa0210f00
 RDX: ffffffffa0210ed4 RSI: ffffffffa0210edc RDI: 5c002ace44fca500
 RBP: 5c002ace44fca4f8 R08: 0000000000000000 R09: ffffed10233e4eea
 R10: ffffed10233e4ee9 R11: ffff888119f2774b R12: dffffc0000000000
 R13: 80002ace3cfca4f8 R14: ffffffff85196de0 R15: ffffffff84ee9f99
 FS:  00007f4ff6faa540(0000) GS:ffff888119f00000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: 00007ffc3d1f19e8 CR3: 0000000109fa6001 CR4: 0000000000170ee0
 DR0: ffffffff8faefce8 DR1: ffffffff8faefce9 DR2: ffffffff8faefcea
 DR3: ffffffff8faefceb DR6: 00000000ffff0ff0 DR7: 0000000000000600
 Call Trace:
  <TASK>
  ? __die_body+0x1b/0x60
  ? die_addr+0x43/0x70
  ? exc_general_protection+0x121/0x210
  ? asm_exc_general_protection+0x22/0x30
  ? static_call_del_module+0x113/0x280
  ? __SCT__tp_func_ipi_exit+0x8/0x8
  static_call_module_notify+0x27f/0x390
  ? rcu_segcblist_inc_len+0x17/0x20
  notifier_call_chain+0xbf/0x280
  notifier_call_chain_robust+0x7f/0xe0
  ? notifier_call_chain+0x280/0x280
  ? kasan_quarantine_put+0x46/0x160
  blocking_notifier_call_chain_robust+0x5b/0x80
  load_module+0x4d1d/0x69f0
  ? module_frob_arch_sections+0x20/0x20
  ? update_cfs_group+0x10c/0x2a0
  ? __wake_up_common+0x10b/0x5d0
  ? kernel_read_file+0x3ca/0x510
  ? __x64_sys_fsconfig+0x650/0x650
  ? __schedule+0xa0b/0x2a60
  ? init_module_from_file+0xd2/0x130
  init_module_from_file+0xd2/0x130
  ? __ia32_sys_init_module+0xa0/0xa0
  ? _raw_spin_lock_irqsave+0xe0/0xe0
  ? ptrace_stop+0x487/0x790
  idempotent_init_module+0x32d/0x6a0
  ? init_module_from_file+0x130/0x130
  ? __fget_light+0x57/0x500
  __x64_sys_finit_module+0xbb/0x130
  do_syscall_64+0x35/0x80
  entry_SYSCALL_64_after_hwframe+0x46/0xb0

Fixes: 9183c3f ("static_call: Add inline static call infrastructure")
Signed-off-by: Jinjie Ruan <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Oct 4, 2023
We currently expect up to a three-digit number of tests and subtests, so:

  torvalds#999/999: some_test/some_subtest: ...

Is the largest test/subtest we can see. If we happen to cross into
1000s, current logic will just truncate everything after 7th character.
This patch fixes this truncate and allows to go way higher (up to 31
characters in total). We still nicely align test numbers:

  torvalds#60/66   core_reloc_btfgen/type_based___incompat:OK
  torvalds#60/67   core_reloc_btfgen/type_based___fn_wrong_args:OK
  torvalds#60/68   core_reloc_btfgen/type_id:OK
  torvalds#60/69   core_reloc_btfgen/type_id___missing_targets:OK
  torvalds#60/70   core_reloc_btfgen/enumval:OK

Signed-off-by: Andrii Nakryiko <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Oct 6, 2023
We currently expect up to a three-digit number of tests and subtests, so:

  torvalds#999/999: some_test/some_subtest: ...

Is the largest test/subtest we can see. If we happen to cross into
1000s, current logic will just truncate everything after 7th character.
This patch fixes this truncate and allows to go way higher (up to 31
characters in total). We still nicely align test numbers:

  torvalds#60/66   core_reloc_btfgen/type_based___incompat:OK
  torvalds#60/67   core_reloc_btfgen/type_based___fn_wrong_args:OK
  torvalds#60/68   core_reloc_btfgen/type_id:OK
  torvalds#60/69   core_reloc_btfgen/type_id___missing_targets:OK
  torvalds#60/70   core_reloc_btfgen/enumval:OK

Acked-by: Jiri Olsa <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Oct 6, 2023
We currently expect up to a three-digit number of tests and subtests, so:

  torvalds#999/999: some_test/some_subtest: ...

Is the largest test/subtest we can see. If we happen to cross into
1000s, current logic will just truncate everything after 7th character.
This patch fixes this truncate and allows to go way higher (up to 31
characters in total). We still nicely align test numbers:

  torvalds#60/66   core_reloc_btfgen/type_based___incompat:OK
  torvalds#60/67   core_reloc_btfgen/type_based___fn_wrong_args:OK
  torvalds#60/68   core_reloc_btfgen/type_id:OK
  torvalds#60/69   core_reloc_btfgen/type_id___missing_targets:OK
  torvalds#60/70   core_reloc_btfgen/enumval:OK

Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
logic10492 pushed a commit to logic10492/linux-amd-zen2 that referenced this pull request Jan 18, 2024
scx: Don't specify nightly rustup as dependency
gyroninja added a commit to gyroninja/linux that referenced this pull request Jan 28, 2024
KSAN calls into rcu code which then triggers a write that reenters into KSAN
getting the system stuck doing infinite recursion.

#0  kmsan_get_context () at mm/kmsan/kmsan.h:106
#1  __msan_get_context_state () at mm/kmsan/instrumentation.c:331
#2  0xffffffff81495671 in get_current () at ./arch/x86/include/asm/current.h:42
#3  rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
#4  __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
#5  0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#6  pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#7  kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#8  virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#9  0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#10 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#11 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#12 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#13 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#14 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#15 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#16 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#17 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#18 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#19 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#20 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#21 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#22 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#23 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#24 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#25 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#26 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#27 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#28 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#29 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#30 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#31 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#32 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#33 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#34 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#35 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#36 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#37 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#38 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#39 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#40 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#41 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#42 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#43 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#44 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#45 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#46 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#47 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#48 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#49 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#50 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#51 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
#52 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
#53 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#54 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#55 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#56 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#57 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
#58 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#59 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#60 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#61 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#62 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#63 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#64 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#65 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#66 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#67 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#68 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#69 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
#70 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#71 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#72 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#73 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#74 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#75 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#76 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#77 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff86203c90) at ./arch/x86/include/asm/kmsan.h:82
torvalds#78 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff86203c90) at mm/kmsan/shadow.c:75
torvalds#79 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff86203c90, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#80 kmsan_get_shadow_origin_ptr (address=0xffffffff86203c90, size=8, store=false) at mm/kmsan/shadow.c:97
torvalds#81 0xffffffff81b1dc72 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=8, store=false) at mm/kmsan/instrumentation.c:36
torvalds#82 __msan_metadata_ptr_for_load_8 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:92
torvalds#83 0xffffffff814fdb9e in filter_irq_stacks (entries=<optimized out>, nr_entries=4) at kernel/stacktrace.c:397
torvalds#84 0xffffffff829520e8 in stack_depot_save_flags (entries=0xffffffff8620d974 <init_task+1012>, nr_entries=4, alloc_flags=0, depot_flags=0) at lib/stackdepot.c:500
torvalds#85 0xffffffff81b1e560 in __msan_poison_alloca (address=0xffffffff86203da0, size=24, descr=<optimized out>) at mm/kmsan/instrumentation.c:285
torvalds#86 0xffffffff8562821c in _printk (fmt=0xffffffff85f191a5 "\0016Attempting lock1") at kernel/printk/printk.c:2324
torvalds#87 0xffffffff81942aa2 in kmem_cache_create_usercopy (name=0xffffffff85f18903 "mm_struct", size=1296, align=0, flags=270336, useroffset=<optimized out>, usersize=<optimized out>, ctor=0x0 <fixed_percpu_data>) at mm/slab_common.c:296
torvalds#88 0xffffffff86f337a0 in mm_cache_init () at kernel/fork.c:3262
torvalds#89 0xffffffff86eacb8e in start_kernel () at init/main.c:932
torvalds#90 0xffffffff86ecdf94 in x86_64_start_reservations (real_mode_data=0x140e0 <exception_stacks+28896> <error: Cannot access memory at address 0x140e0>) at arch/x86/kernel/head64.c:555
torvalds#91 0xffffffff86ecde9b in x86_64_start_kernel (real_mode_data=0x140e0 <exception_stacks+28896> <error: Cannot access memory at address 0x140e0>) at arch/x86/kernel/head64.c:536
torvalds#92 0xffffffff810001d3 in secondary_startup_64 () at /pool/workspace/linux/arch/x86/kernel/head_64.S:461
torvalds#93 0x0000000000000000 in ??
gyroninja added a commit to gyroninja/linux that referenced this pull request Jan 28, 2024
As of 5ec8e8e(mm/sparsemem: fix race in accessing memory_section->usage) KMSAN
now calls into RCU tree code during kmsan_get_metadata. This will trigger a
write that will reenter into KMSAN getting the system stuck doing infinite
recursion.

#0  kmsan_get_context () at mm/kmsan/kmsan.h:106
#1  __msan_get_context_state () at mm/kmsan/instrumentation.c:331
#2  0xffffffff81495671 in get_current () at ./arch/x86/include/asm/current.h:42
#3  rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
#4  __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
#5  0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#6  pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#7  kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#8  virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#9  0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#10 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#11 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#12 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#13 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#14 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#15 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#16 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#17 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#18 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#19 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#20 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#21 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#22 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#23 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#24 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#25 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#26 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#27 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#28 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#29 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#30 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#31 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#32 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#33 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#34 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#35 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#36 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#37 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#38 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#39 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#40 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#41 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#42 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#43 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#44 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#45 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#46 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#47 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#48 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#49 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#50 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#51 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
#52 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
#53 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#54 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#55 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#56 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#57 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
#58 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#59 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#60 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#61 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#62 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#63 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#64 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#65 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#66 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#67 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff8620d974 <init_task+1012>) at ./arch/x86/include/asm/kmsan.h:82
torvalds#68 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/shadow.c:75
torvalds#69 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff8620d974 <init_task+1012>, is_origin=false) at mm/kmsan/shadow.c:143
#70 kmsan_get_shadow_origin_ptr (address=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/shadow.c:97
torvalds#71 0xffffffff81b1dbd2 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=4, store=false) at mm/kmsan/instrumentation.c:36
torvalds#72 __msan_metadata_ptr_for_load_4 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:91
torvalds#73 0xffffffff8149568f in rcu_preempt_read_enter () at kernel/rcu/tree_plugin.h:379
torvalds#74 __rcu_read_lock () at kernel/rcu/tree_plugin.h:402
torvalds#75 0xffffffff81b2054b in rcu_read_lock () at ./include/linux/rcupdate.h:748
torvalds#76 pfn_valid (pfn=<optimized out>) at ./include/linux/mmzone.h:2016
torvalds#77 kmsan_virt_addr_valid (addr=addr@entry=0xffffffff86203c90) at ./arch/x86/include/asm/kmsan.h:82
torvalds#78 virt_to_page_or_null (vaddr=vaddr@entry=0xffffffff86203c90) at mm/kmsan/shadow.c:75
torvalds#79 0xffffffff81b2023c in kmsan_get_metadata (address=0xffffffff86203c90, is_origin=false) at mm/kmsan/shadow.c:143
torvalds#80 kmsan_get_shadow_origin_ptr (address=0xffffffff86203c90, size=8, store=false) at mm/kmsan/shadow.c:97
torvalds#81 0xffffffff81b1dc72 in get_shadow_origin_ptr (addr=0xffffffff8620d974 <init_task+1012>, size=8, store=false) at mm/kmsan/instrumentation.c:36
torvalds#82 __msan_metadata_ptr_for_load_8 (addr=0xffffffff8620d974 <init_task+1012>) at mm/kmsan/instrumentation.c:92
torvalds#83 0xffffffff814fdb9e in filter_irq_stacks (entries=<optimized out>, nr_entries=4) at kernel/stacktrace.c:397
torvalds#84 0xffffffff829520e8 in stack_depot_save_flags (entries=0xffffffff8620d974 <init_task+1012>, nr_entries=4, alloc_flags=0, depot_flags=0) at lib/stackdepot.c:500
torvalds#85 0xffffffff81b1e560 in __msan_poison_alloca (address=0xffffffff86203da0, size=24, descr=<optimized out>) at mm/kmsan/instrumentation.c:285
torvalds#86 0xffffffff8562821c in _printk (fmt=0xffffffff85f191a5 "\0016Attempting lock1") at kernel/printk/printk.c:2324
torvalds#87 0xffffffff81942aa2 in kmem_cache_create_usercopy (name=0xffffffff85f18903 "mm_struct", size=1296, align=0, flags=270336, useroffset=<optimized out>, usersize=<optimized out>, ctor=0x0 <fixed_percpu_data>) at mm/slab_common.c:296
torvalds#88 0xffffffff86f337a0 in mm_cache_init () at kernel/fork.c:3262
torvalds#89 0xffffffff86eacb8e in start_kernel () at init/main.c:932
torvalds#90 0xffffffff86ecdf94 in x86_64_start_reservations (real_mode_data=0x140e0 <exception_stacks+28896> <error: Cannot access memory at address 0x140e0>) at arch/x86/kernel/head64.c:555
torvalds#91 0xffffffff86ecde9b in x86_64_start_kernel (real_mode_data=0x140e0 <exception_stacks+28896> <error: Cannot access memory at address 0x140e0>) at arch/x86/kernel/head64.c:536
torvalds#92 0xffffffff810001d3 in secondary_startup_64 () at /pool/workspace/linux/arch/x86/kernel/head_64.S:461
torvalds#93 0x0000000000000000 in ??
mj22226 pushed a commit to mj22226/linux that referenced this pull request Oct 28, 2024
[ Upstream commit 60f07e2 ]

We use uprobe in aarch64_be, which we found the tracee task would exit
due to SIGILL when we enable the uprobe trace.
We can see the replace inst from uprobe is not correct in aarch big-endian.
As in Armv8-A, instruction fetches are always treated as little-endian,
we should treat the UPROBE_SWBP_INSN as little-endian。

The test case is as following。
bash-4.4# ./mqueue_test_aarchbe 1 1 2 1 10 > /dev/null &
bash-4.4# cd /sys/kernel/debug/tracing/
bash-4.4# echo 'p:test /mqueue_test_aarchbe:0xc30 %x0 %x1' > uprobe_events
bash-4.4# echo 1 > events/uprobes/enable
bash-4.4#
bash-4.4# ps
  PID TTY          TIME CMD
  140 ?        00:00:01 bash
  237 ?        00:00:00 ps
[1]+  Illegal instruction     ./mqueue_test_aarchbe 1 1 2 1 100 > /dev/null

which we debug use gdb as following:

bash-4.4# gdb attach 155
(gdb) disassemble send
Dump of assembler code for function send:
   0x0000000000400c30 <+0>:     .inst   0xa00020d4 ; undefined
   0x0000000000400c34 <+4>:     mov     x29, sp
   0x0000000000400c38 <+8>:     str     w0, [sp, torvalds#28]
   0x0000000000400c3c <+12>:    strb    w1, [sp, torvalds#27]
   0x0000000000400c40 <+16>:    str     xzr, [sp, torvalds#40]
   0x0000000000400c44 <+20>:    str     xzr, [sp, torvalds#48]
   0x0000000000400c48 <+24>:    add     x0, sp, #0x1b
   0x0000000000400c4c <+28>:    mov     w3, #0x0                 // #0
   0x0000000000400c50 <+32>:    mov     x2, #0x1                 // #1
   0x0000000000400c54 <+36>:    mov     x1, x0
   0x0000000000400c58 <+40>:    ldr     w0, [sp, torvalds#28]
   0x0000000000400c5c <+44>:    bl      0x405e10 <mq_send>
   0x0000000000400c60 <+48>:    str     w0, [sp, torvalds#60]
   0x0000000000400c64 <+52>:    ldr     w0, [sp, torvalds#60]
   0x0000000000400c68 <+56>:    ldp     x29, x30, [sp], torvalds#64
   0x0000000000400c6c <+60>:    ret
End of assembler dump.
(gdb) info b
No breakpoints or watchpoints.
(gdb) c
Continuing.

Program received signal SIGILL, Illegal instruction.
0x0000000000400c30 in send ()
(gdb) x/10x 0x400c30
0x400c30 <send>:    0xd42000a0   0xfd030091      0xe01f00b9      0xe16f0039
0x400c40 <send+16>: 0xff1700f9   0xff1b00f9      0xe06f0091      0x03008052
0x400c50 <send+32>: 0x220080d2   0xe10300aa
(gdb) disassemble 0x400c30
Dump of assembler code for function send:
=> 0x0000000000400c30 <+0>:     .inst   0xa00020d4 ; undefined
   0x0000000000400c34 <+4>:     mov     x29, sp
   0x0000000000400c38 <+8>:     str     w0, [sp, torvalds#28]
   0x0000000000400c3c <+12>:    strb    w1, [sp, torvalds#27]
   0x0000000000400c40 <+16>:    str     xzr, [sp, torvalds#40]

Signed-off-by: junhua huang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
Stable-dep-of: 13f8f1e ("arm64: probes: Fix uprobes for big-endian kernels")
Signed-off-by: Sasha Levin <[email protected]>
mj22226 pushed a commit to mj22226/linux that referenced this pull request Oct 29, 2024
[ Upstream commit 60f07e2 ]

We use uprobe in aarch64_be, which we found the tracee task would exit
due to SIGILL when we enable the uprobe trace.
We can see the replace inst from uprobe is not correct in aarch big-endian.
As in Armv8-A, instruction fetches are always treated as little-endian,
we should treat the UPROBE_SWBP_INSN as little-endian。

The test case is as following。
bash-4.4# ./mqueue_test_aarchbe 1 1 2 1 10 > /dev/null &
bash-4.4# cd /sys/kernel/debug/tracing/
bash-4.4# echo 'p:test /mqueue_test_aarchbe:0xc30 %x0 %x1' > uprobe_events
bash-4.4# echo 1 > events/uprobes/enable
bash-4.4#
bash-4.4# ps
  PID TTY          TIME CMD
  140 ?        00:00:01 bash
  237 ?        00:00:00 ps
[1]+  Illegal instruction     ./mqueue_test_aarchbe 1 1 2 1 100 > /dev/null

which we debug use gdb as following:

bash-4.4# gdb attach 155
(gdb) disassemble send
Dump of assembler code for function send:
   0x0000000000400c30 <+0>:     .inst   0xa00020d4 ; undefined
   0x0000000000400c34 <+4>:     mov     x29, sp
   0x0000000000400c38 <+8>:     str     w0, [sp, torvalds#28]
   0x0000000000400c3c <+12>:    strb    w1, [sp, torvalds#27]
   0x0000000000400c40 <+16>:    str     xzr, [sp, torvalds#40]
   0x0000000000400c44 <+20>:    str     xzr, [sp, torvalds#48]
   0x0000000000400c48 <+24>:    add     x0, sp, #0x1b
   0x0000000000400c4c <+28>:    mov     w3, #0x0                 // #0
   0x0000000000400c50 <+32>:    mov     x2, #0x1                 // #1
   0x0000000000400c54 <+36>:    mov     x1, x0
   0x0000000000400c58 <+40>:    ldr     w0, [sp, torvalds#28]
   0x0000000000400c5c <+44>:    bl      0x405e10 <mq_send>
   0x0000000000400c60 <+48>:    str     w0, [sp, torvalds#60]
   0x0000000000400c64 <+52>:    ldr     w0, [sp, torvalds#60]
   0x0000000000400c68 <+56>:    ldp     x29, x30, [sp], torvalds#64
   0x0000000000400c6c <+60>:    ret
End of assembler dump.
(gdb) info b
No breakpoints or watchpoints.
(gdb) c
Continuing.

Program received signal SIGILL, Illegal instruction.
0x0000000000400c30 in send ()
(gdb) x/10x 0x400c30
0x400c30 <send>:    0xd42000a0   0xfd030091      0xe01f00b9      0xe16f0039
0x400c40 <send+16>: 0xff1700f9   0xff1b00f9      0xe06f0091      0x03008052
0x400c50 <send+32>: 0x220080d2   0xe10300aa
(gdb) disassemble 0x400c30
Dump of assembler code for function send:
=> 0x0000000000400c30 <+0>:     .inst   0xa00020d4 ; undefined
   0x0000000000400c34 <+4>:     mov     x29, sp
   0x0000000000400c38 <+8>:     str     w0, [sp, torvalds#28]
   0x0000000000400c3c <+12>:    strb    w1, [sp, torvalds#27]
   0x0000000000400c40 <+16>:    str     xzr, [sp, torvalds#40]

Signed-off-by: junhua huang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
Stable-dep-of: 13f8f1e ("arm64: probes: Fix uprobes for big-endian kernels")
Signed-off-by: Sasha Levin <[email protected]>
1054009064 pushed a commit to 1054009064/linux that referenced this pull request Nov 1, 2024
[ Upstream commit 60f07e2 ]

We use uprobe in aarch64_be, which we found the tracee task would exit
due to SIGILL when we enable the uprobe trace.
We can see the replace inst from uprobe is not correct in aarch big-endian.
As in Armv8-A, instruction fetches are always treated as little-endian,
we should treat the UPROBE_SWBP_INSN as little-endian。

The test case is as following。
bash-4.4# ./mqueue_test_aarchbe 1 1 2 1 10 > /dev/null &
bash-4.4# cd /sys/kernel/debug/tracing/
bash-4.4# echo 'p:test /mqueue_test_aarchbe:0xc30 %x0 %x1' > uprobe_events
bash-4.4# echo 1 > events/uprobes/enable
bash-4.4#
bash-4.4# ps
  PID TTY          TIME CMD
  140 ?        00:00:01 bash
  237 ?        00:00:00 ps
[1]+  Illegal instruction     ./mqueue_test_aarchbe 1 1 2 1 100 > /dev/null

which we debug use gdb as following:

bash-4.4# gdb attach 155
(gdb) disassemble send
Dump of assembler code for function send:
   0x0000000000400c30 <+0>:     .inst   0xa00020d4 ; undefined
   0x0000000000400c34 <+4>:     mov     x29, sp
   0x0000000000400c38 <+8>:     str     w0, [sp, torvalds#28]
   0x0000000000400c3c <+12>:    strb    w1, [sp, torvalds#27]
   0x0000000000400c40 <+16>:    str     xzr, [sp, torvalds#40]
   0x0000000000400c44 <+20>:    str     xzr, [sp, torvalds#48]
   0x0000000000400c48 <+24>:    add     x0, sp, #0x1b
   0x0000000000400c4c <+28>:    mov     w3, #0x0                 // #0
   0x0000000000400c50 <+32>:    mov     x2, #0x1                 // #1
   0x0000000000400c54 <+36>:    mov     x1, x0
   0x0000000000400c58 <+40>:    ldr     w0, [sp, torvalds#28]
   0x0000000000400c5c <+44>:    bl      0x405e10 <mq_send>
   0x0000000000400c60 <+48>:    str     w0, [sp, torvalds#60]
   0x0000000000400c64 <+52>:    ldr     w0, [sp, torvalds#60]
   0x0000000000400c68 <+56>:    ldp     x29, x30, [sp], torvalds#64
   0x0000000000400c6c <+60>:    ret
End of assembler dump.
(gdb) info b
No breakpoints or watchpoints.
(gdb) c
Continuing.

Program received signal SIGILL, Illegal instruction.
0x0000000000400c30 in send ()
(gdb) x/10x 0x400c30
0x400c30 <send>:    0xd42000a0   0xfd030091      0xe01f00b9      0xe16f0039
0x400c40 <send+16>: 0xff1700f9   0xff1b00f9      0xe06f0091      0x03008052
0x400c50 <send+32>: 0x220080d2   0xe10300aa
(gdb) disassemble 0x400c30
Dump of assembler code for function send:
=> 0x0000000000400c30 <+0>:     .inst   0xa00020d4 ; undefined
   0x0000000000400c34 <+4>:     mov     x29, sp
   0x0000000000400c38 <+8>:     str     w0, [sp, torvalds#28]
   0x0000000000400c3c <+12>:    strb    w1, [sp, torvalds#27]
   0x0000000000400c40 <+16>:    str     xzr, [sp, torvalds#40]

Signed-off-by: junhua huang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
Stable-dep-of: 13f8f1e ("arm64: probes: Fix uprobes for big-endian kernels")
Signed-off-by: Sasha Levin <[email protected]>
1054009064 pushed a commit to 1054009064/linux that referenced this pull request Nov 1, 2024
[ Upstream commit 60f07e2 ]

We use uprobe in aarch64_be, which we found the tracee task would exit
due to SIGILL when we enable the uprobe trace.
We can see the replace inst from uprobe is not correct in aarch big-endian.
As in Armv8-A, instruction fetches are always treated as little-endian,
we should treat the UPROBE_SWBP_INSN as little-endian。

The test case is as following。
bash-4.4# ./mqueue_test_aarchbe 1 1 2 1 10 > /dev/null &
bash-4.4# cd /sys/kernel/debug/tracing/
bash-4.4# echo 'p:test /mqueue_test_aarchbe:0xc30 %x0 %x1' > uprobe_events
bash-4.4# echo 1 > events/uprobes/enable
bash-4.4#
bash-4.4# ps
  PID TTY          TIME CMD
  140 ?        00:00:01 bash
  237 ?        00:00:00 ps
[1]+  Illegal instruction     ./mqueue_test_aarchbe 1 1 2 1 100 > /dev/null

which we debug use gdb as following:

bash-4.4# gdb attach 155
(gdb) disassemble send
Dump of assembler code for function send:
   0x0000000000400c30 <+0>:     .inst   0xa00020d4 ; undefined
   0x0000000000400c34 <+4>:     mov     x29, sp
   0x0000000000400c38 <+8>:     str     w0, [sp, torvalds#28]
   0x0000000000400c3c <+12>:    strb    w1, [sp, torvalds#27]
   0x0000000000400c40 <+16>:    str     xzr, [sp, torvalds#40]
   0x0000000000400c44 <+20>:    str     xzr, [sp, torvalds#48]
   0x0000000000400c48 <+24>:    add     x0, sp, #0x1b
   0x0000000000400c4c <+28>:    mov     w3, #0x0                 // #0
   0x0000000000400c50 <+32>:    mov     x2, #0x1                 // #1
   0x0000000000400c54 <+36>:    mov     x1, x0
   0x0000000000400c58 <+40>:    ldr     w0, [sp, torvalds#28]
   0x0000000000400c5c <+44>:    bl      0x405e10 <mq_send>
   0x0000000000400c60 <+48>:    str     w0, [sp, torvalds#60]
   0x0000000000400c64 <+52>:    ldr     w0, [sp, torvalds#60]
   0x0000000000400c68 <+56>:    ldp     x29, x30, [sp], torvalds#64
   0x0000000000400c6c <+60>:    ret
End of assembler dump.
(gdb) info b
No breakpoints or watchpoints.
(gdb) c
Continuing.

Program received signal SIGILL, Illegal instruction.
0x0000000000400c30 in send ()
(gdb) x/10x 0x400c30
0x400c30 <send>:    0xd42000a0   0xfd030091      0xe01f00b9      0xe16f0039
0x400c40 <send+16>: 0xff1700f9   0xff1b00f9      0xe06f0091      0x03008052
0x400c50 <send+32>: 0x220080d2   0xe10300aa
(gdb) disassemble 0x400c30
Dump of assembler code for function send:
=> 0x0000000000400c30 <+0>:     .inst   0xa00020d4 ; undefined
   0x0000000000400c34 <+4>:     mov     x29, sp
   0x0000000000400c38 <+8>:     str     w0, [sp, torvalds#28]
   0x0000000000400c3c <+12>:    strb    w1, [sp, torvalds#27]
   0x0000000000400c40 <+16>:    str     xzr, [sp, torvalds#40]

Signed-off-by: junhua huang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
Stable-dep-of: 13f8f1e ("arm64: probes: Fix uprobes for big-endian kernels")
Signed-off-by: Sasha Levin <[email protected]>
@yang-le yang-le closed this Nov 2, 2024
1054009064 pushed a commit to 1054009064/linux that referenced this pull request Nov 8, 2024
[ Upstream commit 60f07e2 ]

We use uprobe in aarch64_be, which we found the tracee task would exit
due to SIGILL when we enable the uprobe trace.
We can see the replace inst from uprobe is not correct in aarch big-endian.
As in Armv8-A, instruction fetches are always treated as little-endian,
we should treat the UPROBE_SWBP_INSN as little-endian。

The test case is as following。
bash-4.4# ./mqueue_test_aarchbe 1 1 2 1 10 > /dev/null &
bash-4.4# cd /sys/kernel/debug/tracing/
bash-4.4# echo 'p:test /mqueue_test_aarchbe:0xc30 %x0 %x1' > uprobe_events
bash-4.4# echo 1 > events/uprobes/enable
bash-4.4#
bash-4.4# ps
  PID TTY          TIME CMD
  140 ?        00:00:01 bash
  237 ?        00:00:00 ps
[1]+  Illegal instruction     ./mqueue_test_aarchbe 1 1 2 1 100 > /dev/null

which we debug use gdb as following:

bash-4.4# gdb attach 155
(gdb) disassemble send
Dump of assembler code for function send:
   0x0000000000400c30 <+0>:     .inst   0xa00020d4 ; undefined
   0x0000000000400c34 <+4>:     mov     x29, sp
   0x0000000000400c38 <+8>:     str     w0, [sp, torvalds#28]
   0x0000000000400c3c <+12>:    strb    w1, [sp, torvalds#27]
   0x0000000000400c40 <+16>:    str     xzr, [sp, torvalds#40]
   0x0000000000400c44 <+20>:    str     xzr, [sp, torvalds#48]
   0x0000000000400c48 <+24>:    add     x0, sp, #0x1b
   0x0000000000400c4c <+28>:    mov     w3, #0x0                 // #0
   0x0000000000400c50 <+32>:    mov     x2, #0x1                 // #1
   0x0000000000400c54 <+36>:    mov     x1, x0
   0x0000000000400c58 <+40>:    ldr     w0, [sp, torvalds#28]
   0x0000000000400c5c <+44>:    bl      0x405e10 <mq_send>
   0x0000000000400c60 <+48>:    str     w0, [sp, torvalds#60]
   0x0000000000400c64 <+52>:    ldr     w0, [sp, torvalds#60]
   0x0000000000400c68 <+56>:    ldp     x29, x30, [sp], torvalds#64
   0x0000000000400c6c <+60>:    ret
End of assembler dump.
(gdb) info b
No breakpoints or watchpoints.
(gdb) c
Continuing.

Program received signal SIGILL, Illegal instruction.
0x0000000000400c30 in send ()
(gdb) x/10x 0x400c30
0x400c30 <send>:    0xd42000a0   0xfd030091      0xe01f00b9      0xe16f0039
0x400c40 <send+16>: 0xff1700f9   0xff1b00f9      0xe06f0091      0x03008052
0x400c50 <send+32>: 0x220080d2   0xe10300aa
(gdb) disassemble 0x400c30
Dump of assembler code for function send:
=> 0x0000000000400c30 <+0>:     .inst   0xa00020d4 ; undefined
   0x0000000000400c34 <+4>:     mov     x29, sp
   0x0000000000400c38 <+8>:     str     w0, [sp, torvalds#28]
   0x0000000000400c3c <+12>:    strb    w1, [sp, torvalds#27]
   0x0000000000400c40 <+16>:    str     xzr, [sp, torvalds#40]

Signed-off-by: junhua huang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
Stable-dep-of: 13f8f1e ("arm64: probes: Fix uprobes for big-endian kernels")
Signed-off-by: Sasha Levin <[email protected]>
1054009064 pushed a commit to 1054009064/linux that referenced this pull request Nov 8, 2024
[ Upstream commit 60f07e2 ]

We use uprobe in aarch64_be, which we found the tracee task would exit
due to SIGILL when we enable the uprobe trace.
We can see the replace inst from uprobe is not correct in aarch big-endian.
As in Armv8-A, instruction fetches are always treated as little-endian,
we should treat the UPROBE_SWBP_INSN as little-endian。

The test case is as following。
bash-4.4# ./mqueue_test_aarchbe 1 1 2 1 10 > /dev/null &
bash-4.4# cd /sys/kernel/debug/tracing/
bash-4.4# echo 'p:test /mqueue_test_aarchbe:0xc30 %x0 %x1' > uprobe_events
bash-4.4# echo 1 > events/uprobes/enable
bash-4.4#
bash-4.4# ps
  PID TTY          TIME CMD
  140 ?        00:00:01 bash
  237 ?        00:00:00 ps
[1]+  Illegal instruction     ./mqueue_test_aarchbe 1 1 2 1 100 > /dev/null

which we debug use gdb as following:

bash-4.4# gdb attach 155
(gdb) disassemble send
Dump of assembler code for function send:
   0x0000000000400c30 <+0>:     .inst   0xa00020d4 ; undefined
   0x0000000000400c34 <+4>:     mov     x29, sp
   0x0000000000400c38 <+8>:     str     w0, [sp, torvalds#28]
   0x0000000000400c3c <+12>:    strb    w1, [sp, torvalds#27]
   0x0000000000400c40 <+16>:    str     xzr, [sp, torvalds#40]
   0x0000000000400c44 <+20>:    str     xzr, [sp, torvalds#48]
   0x0000000000400c48 <+24>:    add     x0, sp, #0x1b
   0x0000000000400c4c <+28>:    mov     w3, #0x0                 // #0
   0x0000000000400c50 <+32>:    mov     x2, #0x1                 // #1
   0x0000000000400c54 <+36>:    mov     x1, x0
   0x0000000000400c58 <+40>:    ldr     w0, [sp, torvalds#28]
   0x0000000000400c5c <+44>:    bl      0x405e10 <mq_send>
   0x0000000000400c60 <+48>:    str     w0, [sp, torvalds#60]
   0x0000000000400c64 <+52>:    ldr     w0, [sp, torvalds#60]
   0x0000000000400c68 <+56>:    ldp     x29, x30, [sp], torvalds#64
   0x0000000000400c6c <+60>:    ret
End of assembler dump.
(gdb) info b
No breakpoints or watchpoints.
(gdb) c
Continuing.

Program received signal SIGILL, Illegal instruction.
0x0000000000400c30 in send ()
(gdb) x/10x 0x400c30
0x400c30 <send>:    0xd42000a0   0xfd030091      0xe01f00b9      0xe16f0039
0x400c40 <send+16>: 0xff1700f9   0xff1b00f9      0xe06f0091      0x03008052
0x400c50 <send+32>: 0x220080d2   0xe10300aa
(gdb) disassemble 0x400c30
Dump of assembler code for function send:
=> 0x0000000000400c30 <+0>:     .inst   0xa00020d4 ; undefined
   0x0000000000400c34 <+4>:     mov     x29, sp
   0x0000000000400c38 <+8>:     str     w0, [sp, torvalds#28]
   0x0000000000400c3c <+12>:    strb    w1, [sp, torvalds#27]
   0x0000000000400c40 <+16>:    str     xzr, [sp, torvalds#40]

Signed-off-by: junhua huang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
Stable-dep-of: 13f8f1e ("arm64: probes: Fix uprobes for big-endian kernels")
Signed-off-by: Sasha Levin <[email protected]>
1054009064 pushed a commit to 1054009064/linux that referenced this pull request Nov 8, 2024
[ Upstream commit 60f07e2 ]

We use uprobe in aarch64_be, which we found the tracee task would exit
due to SIGILL when we enable the uprobe trace.
We can see the replace inst from uprobe is not correct in aarch big-endian.
As in Armv8-A, instruction fetches are always treated as little-endian,
we should treat the UPROBE_SWBP_INSN as little-endian。

The test case is as following。
bash-4.4# ./mqueue_test_aarchbe 1 1 2 1 10 > /dev/null &
bash-4.4# cd /sys/kernel/debug/tracing/
bash-4.4# echo 'p:test /mqueue_test_aarchbe:0xc30 %x0 %x1' > uprobe_events
bash-4.4# echo 1 > events/uprobes/enable
bash-4.4#
bash-4.4# ps
  PID TTY          TIME CMD
  140 ?        00:00:01 bash
  237 ?        00:00:00 ps
[1]+  Illegal instruction     ./mqueue_test_aarchbe 1 1 2 1 100 > /dev/null

which we debug use gdb as following:

bash-4.4# gdb attach 155
(gdb) disassemble send
Dump of assembler code for function send:
   0x0000000000400c30 <+0>:     .inst   0xa00020d4 ; undefined
   0x0000000000400c34 <+4>:     mov     x29, sp
   0x0000000000400c38 <+8>:     str     w0, [sp, torvalds#28]
   0x0000000000400c3c <+12>:    strb    w1, [sp, torvalds#27]
   0x0000000000400c40 <+16>:    str     xzr, [sp, torvalds#40]
   0x0000000000400c44 <+20>:    str     xzr, [sp, torvalds#48]
   0x0000000000400c48 <+24>:    add     x0, sp, #0x1b
   0x0000000000400c4c <+28>:    mov     w3, #0x0                 // #0
   0x0000000000400c50 <+32>:    mov     x2, #0x1                 // #1
   0x0000000000400c54 <+36>:    mov     x1, x0
   0x0000000000400c58 <+40>:    ldr     w0, [sp, torvalds#28]
   0x0000000000400c5c <+44>:    bl      0x405e10 <mq_send>
   0x0000000000400c60 <+48>:    str     w0, [sp, torvalds#60]
   0x0000000000400c64 <+52>:    ldr     w0, [sp, torvalds#60]
   0x0000000000400c68 <+56>:    ldp     x29, x30, [sp], torvalds#64
   0x0000000000400c6c <+60>:    ret
End of assembler dump.
(gdb) info b
No breakpoints or watchpoints.
(gdb) c
Continuing.

Program received signal SIGILL, Illegal instruction.
0x0000000000400c30 in send ()
(gdb) x/10x 0x400c30
0x400c30 <send>:    0xd42000a0   0xfd030091      0xe01f00b9      0xe16f0039
0x400c40 <send+16>: 0xff1700f9   0xff1b00f9      0xe06f0091      0x03008052
0x400c50 <send+32>: 0x220080d2   0xe10300aa
(gdb) disassemble 0x400c30
Dump of assembler code for function send:
=> 0x0000000000400c30 <+0>:     .inst   0xa00020d4 ; undefined
   0x0000000000400c34 <+4>:     mov     x29, sp
   0x0000000000400c38 <+8>:     str     w0, [sp, torvalds#28]
   0x0000000000400c3c <+12>:    strb    w1, [sp, torvalds#27]
   0x0000000000400c40 <+16>:    str     xzr, [sp, torvalds#40]

Signed-off-by: junhua huang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
Stable-dep-of: 13f8f1e ("arm64: probes: Fix uprobes for big-endian kernels")
Signed-off-by: Sasha Levin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant