{"push_id":1487314098,"size":84,"distinct_size":84,"ref":"refs/heads/vanilla-4.9","head":"6437abdb624edc4e68859e66768933d2b5eb9f09","before":"69973b830859bc6529a7a0468ba0d80ee5117826","commits":[{"sha":"56eaecc8ecf398c7af3fa252eff6164102b0ace1","author":{"name":"Michal Hocko","email":"549a3b539eb67715c6526d830d82ed0bec455278@suse.com"},"message":"hotplug: Make register and unregister notifier API symmetric\n\ncommit 777c6e0daebb3fcefbbd6f620410a946b07ef6d0 upstream.\n\nYu Zhao has noticed that __unregister_cpu_notifier only unregisters its\nnotifiers when HOTPLUG_CPU=y while the registration might succeed even\nwhen HOTPLUG_CPU=n if MODULE is enabled. This means that e.g. zswap\nmight keep a stale notifier on the list on the manual clean up during\nthe pool tear down and thus corrupt the list. Resulting in the following\n\n[  144.964346] BUG: unable to handle kernel paging request at ffff880658a2be78\n[  144.971337] IP: [<ffffffffa290b00b>] raw_notifier_chain_register+0x1b/0x40\n<snipped>\n[  145.122628] Call Trace:\n[  145.125086]  [<ffffffffa28e5cf8>] __register_cpu_notifier+0x18/0x20\n[  145.131350]  [<ffffffffa2a5dd73>] zswap_pool_create+0x273/0x400\n[  145.137268]  [<ffffffffa2a5e0fc>] __zswap_param_set+0x1fc/0x300\n[  145.143188]  [<ffffffffa2944c1d>] ? trace_hardirqs_on+0xd/0x10\n[  145.149018]  [<ffffffffa2908798>] ? kernel_param_lock+0x28/0x30\n[  145.154940]  [<ffffffffa2a3e8cf>] ? __might_fault+0x4f/0xa0\n[  145.160511]  [<ffffffffa2a5e237>] zswap_compressor_param_set+0x17/0x20\n[  145.167035]  [<ffffffffa2908d3c>] param_attr_store+0x5c/0xb0\n[  145.172694]  [<ffffffffa290848d>] module_attr_store+0x1d/0x30\n[  145.178443]  [<ffffffffa2b2b41f>] sysfs_kf_write+0x4f/0x70\n[  145.183925]  [<ffffffffa2b2a5b9>] kernfs_fop_write+0x149/0x180\n[  145.189761]  [<ffffffffa2a99248>] __vfs_write+0x18/0x40\n[  145.194982]  [<ffffffffa2a9a412>] vfs_write+0xb2/0x1a0\n[  145.200122]  [<ffffffffa2a9a732>] SyS_write+0x52/0xa0\n[  145.205177]  [<ffffffffa2ff4d97>] entry_SYSCALL_64_fastpath+0x12/0x17\n\nThis can be even triggered manually by changing\n/sys/module/zswap/parameters/compressor multiple times.\n\nFix this issue by making unregister APIs symmetric to the register so\nthere are no surprises.\n\nFixes: 47e627bc8c9a (\"[PATCH] hotplug: Allow modules to use the cpu hotplug notifiers even if !CONFIG_HOTPLUG_CPU\")\nReported-and-tested-by: Yu Zhao <yuzhao@google.com>\nSigned-off-by: Michal Hocko <mhocko@suse.com>\nCc: linux-mm@kvack.org\nCc: Andrew Morton <akpm@linux-foundation.org>\nCc: Dan Streetman <ddstreet@ieee.org>\nLink: http://lkml.kernel.org/r/20161207135438.4310-1-mhocko@kernel.org\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/NigelCunningham/tuxonice-kernel/commits/56eaecc8ecf398c7af3fa252eff6164102b0ace1"},{"sha":"3bac322e18c3c5f3fc1d77ab0db1fca2e3b7cb03","author":{"name":"Maxim Patlasov","email":"fc28939f24b30793f007358ea30c21398974ea5c@virtuozzo.com"},"message":"btrfs: limit async_work allocation and worker func duration\n\ncommit 2939e1a86f758b55cdba73e29397dd3d94df13bc upstream.\n\nProblem statement: unprivileged user who has read-write access to more than\none btrfs subvolume may easily consume all kernel memory (eventually\ntriggering oom-killer).\n\nReproducer (./mkrmdir below essentially loops over mkdir/rmdir):\n\n[root@kteam1 ~]# cat prep.sh\n\nDEV=/dev/sdb\nmkfs.btrfs -f $DEV\nmount $DEV /mnt\nfor i in `seq 1 16`\ndo\n\tmkdir /mnt/$i\n\tbtrfs subvolume create /mnt/SV_$i\n\tID=`btrfs subvolume list /mnt |grep \"SV_$i$\" |cut -d ' ' -f 2`\n\tmount -t btrfs -o subvolid=$ID $DEV /mnt/$i\n\tchmod a+rwx /mnt/$i\ndone\n\n[root@kteam1 ~]# sh prep.sh\n\n[maxim@kteam1 ~]$ for i in `seq 1 16`; do ./mkrmdir /mnt/$i 2000 2000 & done\n\n[root@kteam1 ~]# for i in `seq 1 4`; do grep \"kmalloc-128\" /proc/slabinfo | grep -v dma; sleep 60; done\nkmalloc-128        10144  10144    128   32    1 : tunables    0    0    0 : slabdata    317    317      0\nkmalloc-128       9992352 9992352    128   32    1 : tunables    0    0    0 : slabdata 312261 312261      0\nkmalloc-128       24226752 24226752    128   32    1 : tunables    0    0    0 : slabdata 757086 757086      0\nkmalloc-128       42754240 42754240    128   32    1 : tunables    0    0    0 : slabdata 1336070 1336070      0\n\nThe huge numbers above come from insane number of async_work-s allocated\nand queued by btrfs_wq_run_delayed_node.\n\nThe problem is caused by btrfs_wq_run_delayed_node() queuing more and more\nworks if the number of delayed items is above BTRFS_DELAYED_BACKGROUND. The\nworker func (btrfs_async_run_delayed_root) processes at least\nBTRFS_DELAYED_BATCH items (if they are present in the list). So, the machinery\nworks as expected while the list is almost empty. As soon as it is getting\nbigger, worker func starts to process more than one item at a time, it takes\nlonger, and the chances to have async_works queued more than needed is getting\nhigher.\n\nThe problem above is worsened by another flaw of delayed-inode implementation:\nif async_work was queued in a throttling branch (number of items >=\nBTRFS_DELAYED_WRITEBACK), corresponding worker func won't quit until\nthe number of items < BTRFS_DELAYED_BACKGROUND / 2. So, it is possible that\nthe func occupies CPU infinitely (up to 30sec in my experiments): while the\nfunc is trying to drain the list, the user activity may add more and more\nitems to the list.\n\nThe patch fixes both problems in straightforward way: refuse queuing too\nmany works in btrfs_wq_run_delayed_node and bail out of worker func if\nat least BTRFS_DELAYED_WRITEBACK items are processed.\n\nChanged in v2: remove support of thresh == NO_THRESHOLD.\n\nSigned-off-by: Maxim Patlasov <mpatlasov@virtuozzo.com>\nSigned-off-by: Chris Mason <clm@fb.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/NigelCunningham/tuxonice-kernel/commits/3bac322e18c3c5f3fc1d77ab0db1fca2e3b7cb03"},{"sha":"7d470f04e36c6a23838e9bb384535b7c61fe372c","author":{"name":"Liu Bo","email":"2320f47fd1b0bdd58584dbc8b4d320b2decf8329@oracle.com"},"message":"Btrfs: fix BUG_ON in btrfs_mark_buffer_dirty\n\ncommit ef85b25e982b5bba1530b936e283ef129f02ab9d upstream.\n\nThis can only happen with CONFIG_BTRFS_FS_CHECK_INTEGRITY=y.\n\nCommit 1ba98d0 (\"Btrfs: detect corruption when non-root leaf has zero item\")\nassumes that a leaf is its root when leaf->bytenr == btrfs_root_bytenr(root),\nhowever, we should not use btrfs_root_bytenr(root) since it's mainly got\nupdated during committing transaction.  So the check can fail when doing\nCOW on this leaf while it is a root.\n\nThis changes to use \"if (leaf == btrfs_root_node(root))\" instead, just like\nhow we check whether leaf is a root in __btrfs_cow_block().\n\nFixes: 1ba98d086fe3 (Btrfs: detect corruption when non-root leaf has zero item)\nReported-by: Jeff Mahoney <jeffm@suse.com>\nSigned-off-by: Liu Bo <bo.li.liu@oracle.com>\nReviewed-by: Filipe Manana <fdmanana@suse.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/NigelCunningham/tuxonice-kernel/commits/7d470f04e36c6a23838e9bb384535b7c61fe372c"},{"sha":"664b053c53638f9a7b9f129d65182268fb504bf0","author":{"name":"Robbie Ko","email":"69cfc7b14b5bc42b28f6ef1a26390925963b1bd2@synology.com"},"message":"Btrfs: fix deadlock caused by fsync when logging directory entries\n\ncommit ec125cfb7ae2157af3dd45dd8abe823e3e233eec upstream.\n\nWhile logging new directory entries, at tree-log.c:log_new_dir_dentries(),\nafter we call btrfs_search_forward() we get a leaf with a read lock on it,\nand without unlocking that leaf we can end up calling btrfs_iget() to get\nan inode pointer. The later (btrfs_iget()) can end up doing a read-only\nsearch on the same tree again, if the inode is not in memory already, which\nends up causing a deadlock if some other task in the meanwhile started a\nwrite search on the tree and is attempting to write lock the same leaf\nthat btrfs_search_forward() locked while holding write locks on upper\nlevels of the tree blocking the read search from btrfs_iget(). In this\nscenario we get a deadlock.\n\nSo fix this by releasing the search path before calling btrfs_iget() at\ntree-log.c:log_new_dir_dentries().\n\nExample trace of such deadlock:\n\n[ 4077.478852] kworker/u24:10  D ffff88107fc90640     0 14431      2 0x00000000\n[ 4077.486752] Workqueue: btrfs-endio-write btrfs_endio_write_helper [btrfs]\n[ 4077.494346]  ffff880ffa56bad0 0000000000000046 0000000000009000 ffff880ffa56bfd8\n[ 4077.502629]  ffff880ffa56bfd8 ffff881016ce21c0 ffffffffa06ecb26 ffff88101a5d6138\n[ 4077.510915]  ffff880ebb5173b0 ffff880ffa56baf8 ffff880ebb517410 ffff881016ce21c0\n[ 4077.519202] Call Trace:\n[ 4077.528752]  [<ffffffffa06ed5ed>] ? btrfs_tree_lock+0xdd/0x2f0 [btrfs]\n[ 4077.536049]  [<ffffffff81053680>] ? wake_up_atomic_t+0x30/0x30\n[ 4077.542574]  [<ffffffffa068cc1f>] ? btrfs_search_slot+0x79f/0xb10 [btrfs]\n[ 4077.550171]  [<ffffffffa06a5073>] ? btrfs_lookup_file_extent+0x33/0x40 [btrfs]\n[ 4077.558252]  [<ffffffffa06c600b>] ? __btrfs_drop_extents+0x13b/0xdf0 [btrfs]\n[ 4077.566140]  [<ffffffffa06fc9e2>] ? add_delayed_data_ref+0xe2/0x150 [btrfs]\n[ 4077.573928]  [<ffffffffa06fd629>] ? btrfs_add_delayed_data_ref+0x149/0x1d0 [btrfs]\n[ 4077.582399]  [<ffffffffa06cf3c0>] ? __set_extent_bit+0x4c0/0x5c0 [btrfs]\n[ 4077.589896]  [<ffffffffa06b4a64>] ? insert_reserved_file_extent.constprop.75+0xa4/0x320 [btrfs]\n[ 4077.599632]  [<ffffffffa06b206d>] ? start_transaction+0x8d/0x470 [btrfs]\n[ 4077.607134]  [<ffffffffa06bab57>] ? btrfs_finish_ordered_io+0x2e7/0x600 [btrfs]\n[ 4077.615329]  [<ffffffff8104cbc2>] ? process_one_work+0x142/0x3d0\n[ 4077.622043]  [<ffffffff8104d729>] ? worker_thread+0x109/0x3b0\n[ 4077.628459]  [<ffffffff8104d620>] ? manage_workers.isra.26+0x270/0x270\n[ 4077.635759]  [<ffffffff81052b0f>] ? kthread+0xaf/0xc0\n[ 4077.641404]  [<ffffffff81052a60>] ? kthread_create_on_node+0x110/0x110\n[ 4077.648696]  [<ffffffff814a9ac8>] ? ret_from_fork+0x58/0x90\n[ 4077.654926]  [<ffffffff81052a60>] ? kthread_create_on_node+0x110/0x110\n\n[ 4078.358087] kworker/u24:15  D ffff88107fcd0640     0 14436      2 0x00000000\n[ 4078.365981] Workqueue: btrfs-endio-write btrfs_endio_write_helper [btrfs]\n[ 4078.373574]  ffff880ffa57fad0 0000000000000046 0000000000009000 ffff880ffa57ffd8\n[ 4078.381864]  ffff880ffa57ffd8 ffff88103004d0a0 ffffffffa06ecb26 ffff88101a5d6138\n[ 4078.390163]  ffff880fbeffc298 ffff880ffa57faf8 ffff880fbeffc2f8 ffff88103004d0a0\n[ 4078.398466] Call Trace:\n[ 4078.408019]  [<ffffffffa06ed5ed>] ? btrfs_tree_lock+0xdd/0x2f0 [btrfs]\n[ 4078.415322]  [<ffffffff81053680>] ? wake_up_atomic_t+0x30/0x30\n[ 4078.421844]  [<ffffffffa068cc1f>] ? btrfs_search_slot+0x79f/0xb10 [btrfs]\n[ 4078.429438]  [<ffffffffa06a5073>] ? btrfs_lookup_file_extent+0x33/0x40 [btrfs]\n[ 4078.437518]  [<ffffffffa06c600b>] ? __btrfs_drop_extents+0x13b/0xdf0 [btrfs]\n[ 4078.445404]  [<ffffffffa06fc9e2>] ? add_delayed_data_ref+0xe2/0x150 [btrfs]\n[ 4078.453194]  [<ffffffffa06fd629>] ? btrfs_add_delayed_data_ref+0x149/0x1d0 [btrfs]\n[ 4078.461663]  [<ffffffffa06cf3c0>] ? __set_extent_bit+0x4c0/0x5c0 [btrfs]\n[ 4078.469161]  [<ffffffffa06b4a64>] ? insert_reserved_file_extent.constprop.75+0xa4/0x320 [btrfs]\n[ 4078.478893]  [<ffffffffa06b206d>] ? start_transaction+0x8d/0x470 [btrfs]\n[ 4078.486388]  [<ffffffffa06bab57>] ? btrfs_finish_ordered_io+0x2e7/0x600 [btrfs]\n[ 4078.494561]  [<ffffffff8104cbc2>] ? process_one_work+0x142/0x3d0\n[ 4078.501278]  [<ffffffff8104a507>] ? pwq_activate_delayed_work+0x27/0x40\n[ 4078.508673]  [<ffffffff8104d729>] ? worker_thread+0x109/0x3b0\n[ 4078.515098]  [<ffffffff8104d620>] ? manage_workers.isra.26+0x270/0x270\n[ 4078.522396]  [<ffffffff81052b0f>] ? kthread+0xaf/0xc0\n[ 4078.528032]  [<ffffffff81052a60>] ? kthread_create_on_node+0x110/0x110\n[ 4078.535325]  [<ffffffff814a9ac8>] ? ret_from_fork+0x58/0x90\n[ 4078.541552]  [<ffffffff81052a60>] ? kthread_create_on_node+0x110/0x110\n\n[ 4079.355824] user-space-program D ffff88107fd30640     0 32020      1 0x00000000\n[ 4079.363716]  ffff880eae8eba10 0000000000000086 0000000000009000 ffff880eae8ebfd8\n[ 4079.372003]  ffff880eae8ebfd8 ffff881016c162c0 ffffffffa06ecb26 ffff88101a5d6138\n[ 4079.380294]  ffff880fbed4b4c8 ffff880eae8eba38 ffff880fbed4b528 ffff881016c162c0\n[ 4079.388586] Call Trace:\n[ 4079.398134]  [<ffffffffa06ed595>] ? btrfs_tree_lock+0x85/0x2f0 [btrfs]\n[ 4079.405431]  [<ffffffff81053680>] ? wake_up_atomic_t+0x30/0x30\n[ 4079.411955]  [<ffffffffa06876fb>] ? btrfs_lock_root_node+0x2b/0x40 [btrfs]\n[ 4079.419644]  [<ffffffffa068ce83>] ? btrfs_search_slot+0xa03/0xb10 [btrfs]\n[ 4079.427237]  [<ffffffffa06aba52>] ? btrfs_buffer_uptodate+0x52/0x70 [btrfs]\n[ 4079.435041]  [<ffffffffa0689b60>] ? generic_bin_search.constprop.38+0x80/0x190 [btrfs]\n[ 4079.443897]  [<ffffffffa068ea44>] ? btrfs_insert_empty_items+0x74/0xd0 [btrfs]\n[ 4079.451975]  [<ffffffffa072c443>] ? copy_items+0x128/0x850 [btrfs]\n[ 4079.458890]  [<ffffffffa072da10>] ? btrfs_log_inode+0x629/0xbf3 [btrfs]\n[ 4079.466292]  [<ffffffffa06f34a1>] ? btrfs_log_inode_parent+0xc61/0xf30 [btrfs]\n[ 4079.474373]  [<ffffffffa06f45a9>] ? btrfs_log_dentry_safe+0x59/0x80 [btrfs]\n[ 4079.482161]  [<ffffffffa06c298d>] ? btrfs_sync_file+0x20d/0x330 [btrfs]\n[ 4079.489558]  [<ffffffff8112777c>] ? do_fsync+0x4c/0x80\n[ 4079.495300]  [<ffffffff81127a0a>] ? SyS_fdatasync+0xa/0x10\n[ 4079.501422]  [<ffffffff814a9b72>] ? system_call_fastpath+0x16/0x1b\n\n[ 4079.508334] user-space-program D ffff88107fc30640     0 32021      1 0x00000004\n[ 4079.516226]  ffff880eae8efbf8 0000000000000086 0000000000009000 ffff880eae8effd8\n[ 4079.524513]  ffff880eae8effd8 ffff881030279610 ffffffffa06ecb26 ffff88101a5d6138\n[ 4079.532802]  ffff880ebb671d88 ffff880eae8efc20 ffff880ebb671de8 ffff881030279610\n[ 4079.541092] Call Trace:\n[ 4079.550642]  [<ffffffffa06ed595>] ? btrfs_tree_lock+0x85/0x2f0 [btrfs]\n[ 4079.557941]  [<ffffffff81053680>] ? wake_up_atomic_t+0x30/0x30\n[ 4079.564463]  [<ffffffffa068cc1f>] ? btrfs_search_slot+0x79f/0xb10 [btrfs]\n[ 4079.572058]  [<ffffffffa06bb7d8>] ? btrfs_truncate_inode_items+0x168/0xb90 [btrfs]\n[ 4079.580526]  [<ffffffffa06b04be>] ? join_transaction.isra.15+0x1e/0x3a0 [btrfs]\n[ 4079.588701]  [<ffffffffa06b206d>] ? start_transaction+0x8d/0x470 [btrfs]\n[ 4079.596196]  [<ffffffffa0690ac6>] ? block_rsv_add_bytes+0x16/0x50 [btrfs]\n[ 4079.603789]  [<ffffffffa06bc2e9>] ? btrfs_truncate+0xe9/0x2e0 [btrfs]\n[ 4079.610994]  [<ffffffffa06bd00b>] ? btrfs_setattr+0x30b/0x410 [btrfs]\n[ 4079.618197]  [<ffffffff81117c1c>] ? notify_change+0x1dc/0x680\n[ 4079.624625]  [<ffffffff8123c8a4>] ? aa_path_perm+0xd4/0x160\n[ 4079.630854]  [<ffffffff810f4fcb>] ? do_truncate+0x5b/0x90\n[ 4079.636889]  [<ffffffff810f59fa>] ? do_sys_ftruncate.constprop.15+0x10a/0x160\n[ 4079.644869]  [<ffffffff8110d87b>] ? SyS_fcntl+0x5b/0x570\n[ 4079.650805]  [<ffffffff814a9b72>] ? system_call_fastpath+0x16/0x1b\n\n[ 4080.410607] user-space-program D ffff88107fc70640     0 32028  12639 0x00000004\n[ 4080.418489]  ffff880eaeccbbe0 0000000000000086 0000000000009000 ffff880eaeccbfd8\n[ 4080.426778]  ffff880eaeccbfd8 ffff880f317ef1e0 ffffffffa06ecb26 ffff88101a5d6138\n[ 4080.435067]  ffff880ef7e93928 ffff880f317ef1e0 ffff880eaeccbc08 ffff880f317ef1e0\n[ 4080.443353] Call Trace:\n[ 4080.452920]  [<ffffffffa06ed15d>] ? btrfs_tree_read_lock+0xdd/0x190 [btrfs]\n[ 4080.460703]  [<ffffffff81053680>] ? wake_up_atomic_t+0x30/0x30\n[ 4080.467225]  [<ffffffffa06876bb>] ? btrfs_read_lock_root_node+0x2b/0x40 [btrfs]\n[ 4080.475400]  [<ffffffffa068cc81>] ? btrfs_search_slot+0x801/0xb10 [btrfs]\n[ 4080.482994]  [<ffffffffa06b2df0>] ? btrfs_clean_one_deleted_snapshot+0xe0/0xe0 [btrfs]\n[ 4080.491857]  [<ffffffffa06a70a6>] ? btrfs_lookup_inode+0x26/0x90 [btrfs]\n[ 4080.499353]  [<ffffffff810ec42f>] ? kmem_cache_alloc+0xaf/0xc0\n[ 4080.505879]  [<ffffffffa06bd905>] ? btrfs_iget+0xd5/0x5d0 [btrfs]\n[ 4080.512696]  [<ffffffffa06caf04>] ? btrfs_get_token_64+0x104/0x120 [btrfs]\n[ 4080.520387]  [<ffffffffa06f341f>] ? btrfs_log_inode_parent+0xbdf/0xf30 [btrfs]\n[ 4080.528469]  [<ffffffffa06f45a9>] ? btrfs_log_dentry_safe+0x59/0x80 [btrfs]\n[ 4080.536258]  [<ffffffffa06c298d>] ? btrfs_sync_file+0x20d/0x330 [btrfs]\n[ 4080.543657]  [<ffffffff8112777c>] ? do_fsync+0x4c/0x80\n[ 4080.549399]  [<ffffffff81127a0a>] ? SyS_fdatasync+0xa/0x10\n[ 4080.555534]  [<ffffffff814a9b72>] ? system_call_fastpath+0x16/0x1b\n\nSigned-off-by: Robbie Ko <robbieko@synology.com>\nReviewed-by: Filipe Manana <fdmanana@suse.com>\nFixes: 2f2ff0ee5e43 (Btrfs: fix metadata inconsistencies after directory fsync)\nSigned-off-by: Filipe Manana <fdmanana@suse.com>\n[Modified changelog for clarity and correctness]\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/NigelCunningham/tuxonice-kernel/commits/664b053c53638f9a7b9f129d65182268fb504bf0"},{"sha":"26dc52465f0df557d154ab59f8567431d4876671","author":{"name":"Robbie Ko","email":"69cfc7b14b5bc42b28f6ef1a26390925963b1bd2@synology.com"},"message":"Btrfs: fix tree search logic when replaying directory entry deletes\n\ncommit 2a7bf53f577e49c43de4ffa7776056de26db65d9 upstream.\n\nIf a log tree has a layout like the following:\n\nleaf N:\n        ...\n        item 240 key (282 DIR_LOG_ITEM 0) itemoff 8189 itemsize 8\n                dir log end 1275809046\nleaf N + 1:\n        item 0 key (282 DIR_LOG_ITEM 3936149215) itemoff 16275 itemsize 8\n                dir log end 18446744073709551615\n        ...\n\nWhen we pass the value 1275809046 + 1 as the parameter start_ret to the\nfunction tree-log.c:find_dir_range() (done by replay_dir_deletes()), we\nend up with path->slots[0] having the value 239 (points to the last item\nof leaf N, item 240). Because the dir log item in that position has an\noffset value smaller than *start_ret (1275809046 + 1) we need to move on\nto the next leaf, however the logic for that is wrong since it compares\nthe current slot to the number of items in the leaf, which is smaller\nand therefore we don't lookup for the next leaf but instead we set the\nslot to point to an item that does not exist, at slot 240, and we later\noperate on that slot which has unexpected content or in the worst case\ncan result in an invalid memory access (accessing beyond the last page\nof leaf N's extent buffer).\n\nSo fix the logic that checks when we need to lookup at the next leaf\nby first incrementing the slot and only after to check if that slot\nis beyond the last item of the current leaf.\n\nSigned-off-by: Robbie Ko <robbieko@synology.com>\nReviewed-by: Filipe Manana <fdmanana@suse.com>\nFixes: e02119d5a7b4 (Btrfs: Add a write ahead tree log to optimize synchronous operations)\nSigned-off-by: Filipe Manana <fdmanana@suse.com>\n[Modified changelog for clarity and correctness]\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/NigelCunningham/tuxonice-kernel/commits/26dc52465f0df557d154ab59f8567431d4876671"},{"sha":"01f285fe1d885dadfd7439205c700340ec69ab13","author":{"name":"Filipe Manana","email":"396addc00218539530419b15da697a581cb02fca@suse.com"},"message":"Btrfs: fix relocation incorrectly dropping data references\n\ncommit 054570a1dc94de20e7a612cddcc5a97db9c37b6f upstream.\n\nDuring relocation of a data block group we create a relocation tree\nfor each fs/subvol tree by making a snapshot of each tree using\nbtrfs_copy_root() and the tree's commit root, and then setting the last\nsnapshot field for the fs/subvol tree's root to the value of the current\ntransaction id minus 1. However this can lead to relocation later\ndropping references that it did not create if we have qgroups enabled,\nleaving the filesystem in an inconsistent state that keeps aborting\ntransactions.\n\nLets consider the following example to explain the problem, which requires\nqgroups to be enabled.\n\nWe are relocating data block group Y, we have a subvolume with id 258 that\nhas a root at level 1, that subvolume is used to store directory entries\nfor snapshots and we are currently at transaction 3404.\n\nWhen committing transaction 3404, we have a pending snapshot and therefore\nwe call btrfs_run_delayed_items() at transaction.c:create_pending_snapshot()\nin order to create its dentry at subvolume 258. This results in COWing\nleaf A from root 258 in order to add the dentry. Note that leaf A\nalso contains file extent items referring to extents from some other\nblock group X (we are currently relocating block group Y). Later on, still\nat create_pending_snapshot() we call qgroup_account_snapshot(), which\nswitches the commit root for root 258 when it calls switch_commit_roots(),\nso now the COWed version of leaf A, lets call it leaf A', is accessible\nfrom the commit root of tree 258. At the end of qgroup_account_snapshot(),\nwe call record_root_in_trans() with 258 as its argument, which results\nin btrfs_init_reloc_root() being called, which in turn calls\nrelocation.c:create_reloc_root() in order to create a relocation tree\nassociated to root 258, which results in assigning the value of 3403\n(which is the current transaction id minus 1 = 3404 - 1) to the\nlast_snapshot field of root 258. When creating the relocation tree root\nat ctree.c:btrfs_copy_root() we add a shared reference for leaf A',\ncorresponding to the relocation tree's root, when we call btrfs_inc_ref()\nagainst the COWed root (a copy of the commit root from tree 258), which\nis at level 1. So at this point leaf A' has 2 references, one normal\nreference corresponding to root 258 and one shared reference corresponding\nto the root of the relocation tree.\n\nTransaction 3404 finishes its commit and transaction 3405 is started by\nrelocation when calling merge_reloc_root() for the relocation tree\nassociated to root 258. In the meanwhile leaf A' is COWed again, in\nresponse to some filesystem operation, when we are still at transaction\n3405. However when we COW leaf A', at ctree.c:update_ref_for_cow(), we\ncall btrfs_block_can_be_shared() in order to figure out if other trees\nrefer to the leaf and if any such trees exists, add a full back reference\nto leaf A' - but btrfs_block_can_be_shared() incorrectly returns false\nbecause the following condition is false:\n\n  btrfs_header_generation(buf) <= btrfs_root_last_snapshot(&root->root_item)\n\nwhich evaluates to 3404 <= 3403. So after leaf A' is COWed, it stays with\nonly one reference, corresponding to the shared reference we created when\nwe called btrfs_copy_root() to create the relocation tree's root and\nbtrfs_inc_ref() ends up not being called for leaf A' nor we end up setting\nthe flag BTRFS_BLOCK_FLAG_FULL_BACKREF in leaf A'. This results in not\nadding shared references for the extents from block group X that leaf A'\nrefers to with its file extent items.\n\nLater, after merging the relocation root we do a call to to\nbtrfs_drop_snapshot() in order to delete the relocation tree. This ends\nup calling do_walk_down() when path->slots[1] points to leaf A', which\nresults in calling btrfs_lookup_extent_info() to get the number of\nreferences for leaf A', which is 1 at this time (only the shared reference\nexists) and this value is stored at wc->refs[0]. After this walk_up_proc()\nis called when wc->level is 0 and path->nodes[0] corresponds to leaf A'.\nBecause the current level is 0 and wc->refs[0] is 1, it does call\nbtrfs_dec_ref() against leaf A', which results in removing the single\nreferences that the extents from block group X have which are associated\nto root 258 - the expectation was to have each of these extents with 2\nreferences - one reference for root 258 and one shared reference related\nto the root of the relocation tree, and so we would drop only the shared\nreference (because leaf A' was supposed to have the flag\nBTRFS_BLOCK_FLAG_FULL_BACKREF set).\n\nThis leaves the filesystem in an inconsistent state as we now have file\nextent items in a subvolume tree that point to extents from block group X\nwithout references in the extent tree. So later on when we try to decrement\nthe references for these extents, for example due to a file unlink operation,\ntruncate operation or overwriting ranges of a file, we fail because the\nexpected references do not exist in the extent tree.\n\nThis leads to warnings and transaction aborts like the following:\n\n[  588.965795] ------------[ cut here ]------------\n[  588.965815] WARNING: CPU: 2 PID: 2479 at fs/btrfs/extent-tree.c:1625 lookup_inline_extent_backref+0x432/0x5b0 [btrfs]\n[  588.965816] Modules linked in: af_packet iscsi_ibft iscsi_boot_sysfs xfs libcrc32c ppdev acpi_cpufreq button tpm_tis e1000 i2c_piix4 pcspkr parport_pc\nparport tpm qemu_fw_cfg joydev btrfs xor raid6_pq sr_mod cdrom ata_generic virtio_scsi ata_piix virtio_pci bochs_drm virtio_ring drm_kms_helper syscopyarea\nsysfillrect sysimgblt fb_sys_fops virtio ttm serio_raw drm floppy sg\n[  588.965831] CPU: 2 PID: 2479 Comm: kworker/u8:7 Not tainted 4.7.3-3-default-fdm+ #1\n[  588.965832] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.1-0-gb3ef39f-prebuilt.qemu-project.org 04/01/2014\n[  588.965844] Workqueue: btrfs-extent-refs btrfs_extent_refs_helper [btrfs]\n[  588.965845]  0000000000000000 ffff8802263bfa28 ffffffff813af542 0000000000000000\n[  588.965847]  0000000000000000 ffff8802263bfa68 ffffffff81081e8b 0000065900000000\n[  588.965848]  ffff8801db2af000 000000012bbe2000 0000000000000000 ffff880215703b48\n[  588.965849] Call Trace:\n[  588.965852]  [<ffffffff813af542>] dump_stack+0x63/0x81\n[  588.965854]  [<ffffffff81081e8b>] __warn+0xcb/0xf0\n[  588.965855]  [<ffffffff81081f7d>] warn_slowpath_null+0x1d/0x20\n[  588.965863]  [<ffffffffa0175042>] lookup_inline_extent_backref+0x432/0x5b0 [btrfs]\n[  588.965865]  [<ffffffff81143220>] ? trace_clock_local+0x10/0x30\n[  588.965867]  [<ffffffff8114c5df>] ? rb_reserve_next_event+0x6f/0x460\n[  588.965875]  [<ffffffffa0175215>] insert_inline_extent_backref+0x55/0xd0 [btrfs]\n[  588.965882]  [<ffffffffa017531f>] __btrfs_inc_extent_ref.isra.55+0x8f/0x240 [btrfs]\n[  588.965890]  [<ffffffffa017acea>] __btrfs_run_delayed_refs+0x74a/0x1260 [btrfs]\n[  588.965892]  [<ffffffff810cb046>] ? cpuacct_charge+0x86/0xa0\n[  588.965900]  [<ffffffffa017e74f>] btrfs_run_delayed_refs+0x9f/0x2c0 [btrfs]\n[  588.965908]  [<ffffffffa017ea04>] delayed_ref_async_start+0x94/0xb0 [btrfs]\n[  588.965918]  [<ffffffffa01c799a>] btrfs_scrubparity_helper+0xca/0x350 [btrfs]\n[  588.965928]  [<ffffffffa01c7c5e>] btrfs_extent_refs_helper+0xe/0x10 [btrfs]\n[  588.965930]  [<ffffffff8109b323>] process_one_work+0x1f3/0x4e0\n[  588.965931]  [<ffffffff8109b658>] worker_thread+0x48/0x4e0\n[  588.965932]  [<ffffffff8109b610>] ? process_one_work+0x4e0/0x4e0\n[  588.965934]  [<ffffffff810a1659>] kthread+0xc9/0xe0\n[  588.965936]  [<ffffffff816f2f1f>] ret_from_fork+0x1f/0x40\n[  588.965937]  [<ffffffff810a1590>] ? kthread_worker_fn+0x170/0x170\n[  588.965938] ---[ end trace 34e5232c933a1749 ]---\n[  588.966187] ------------[ cut here ]------------\n[  588.966196] WARNING: CPU: 2 PID: 2479 at fs/btrfs/extent-tree.c:2966 btrfs_run_delayed_refs+0x28c/0x2c0 [btrfs]\n[  588.966196] BTRFS: Transaction aborted (error -5)\n[  588.966197] Modules linked in: af_packet iscsi_ibft iscsi_boot_sysfs xfs libcrc32c ppdev acpi_cpufreq button tpm_tis e1000 i2c_piix4 pcspkr parport_pc\nparport tpm qemu_fw_cfg joydev btrfs xor raid6_pq sr_mod cdrom ata_generic virtio_scsi ata_piix virtio_pci bochs_drm virtio_ring drm_kms_helper syscopyarea\nsysfillrect sysimgblt fb_sys_fops virtio ttm serio_raw drm floppy sg\n[  588.966206] CPU: 2 PID: 2479 Comm: kworker/u8:7 Tainted: G        W       4.7.3-3-default-fdm+ #1\n[  588.966207] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.1-0-gb3ef39f-prebuilt.qemu-project.org 04/01/2014\n[  588.966217] Workqueue: btrfs-extent-refs btrfs_extent_refs_helper [btrfs]\n[  588.966217]  0000000000000000 ffff8802263bfc98 ffffffff813af542 ffff8802263bfce8\n[  588.966219]  0000000000000000 ffff8802263bfcd8 ffffffff81081e8b 00000b96345ee000\n[  588.966220]  ffffffffa021ae1c ffff880215703b48 00000000000005fe ffff8802345ee000\n[  588.966221] Call Trace:\n[  588.966223]  [<ffffffff813af542>] dump_stack+0x63/0x81\n[  588.966224]  [<ffffffff81081e8b>] __warn+0xcb/0xf0\n[  588.966225]  [<ffffffff81081eff>] warn_slowpath_fmt+0x4f/0x60\n[  588.966233]  [<ffffffffa017e93c>] btrfs_run_delayed_refs+0x28c/0x2c0 [btrfs]\n[  588.966241]  [<ffffffffa017ea04>] delayed_ref_async_start+0x94/0xb0 [btrfs]\n[  588.966250]  [<ffffffffa01c799a>] btrfs_scrubparity_helper+0xca/0x350 [btrfs]\n[  588.966259]  [<ffffffffa01c7c5e>] btrfs_extent_refs_helper+0xe/0x10 [btrfs]\n[  588.966260]  [<ffffffff8109b323>] process_one_work+0x1f3/0x4e0\n[  588.966261]  [<ffffffff8109b658>] worker_thread+0x48/0x4e0\n[  588.966263]  [<ffffffff8109b610>] ? process_one_work+0x4e0/0x4e0\n[  588.966264]  [<ffffffff810a1659>] kthread+0xc9/0xe0\n[  588.966265]  [<ffffffff816f2f1f>] ret_from_fork+0x1f/0x40\n[  588.966267]  [<ffffffff810a1590>] ? kthread_worker_fn+0x170/0x170\n[  588.966268] ---[ end trace 34e5232c933a174a ]---\n[  588.966269] BTRFS: error (device sda2) in btrfs_run_delayed_refs:2966: errno=-5 IO failure\n[  588.966270] BTRFS info (device sda2): forced readonly\n\nThis was happening often on openSUSE and SLE systems using btrfs as the\nroot filesystem (with its default layout where multiple subvolumes are\nused) where balance happens in the background triggered by a cron job and\nsnapshots are automatically created before/after package installations,\nupgrades and removals. The issue could be triggered simply by running the\nfollowing loop on the first system boot post installation:\n\n  while true; do\n     zypper -n in nfs-kernel-server\n     zypper -n rm nfs-kernel-server\n  done\n\n(If we were fast enough and made that loop before the cron job triggered\na balance operation and the balance finished)\n\nSo fix by setting the last_snapshot field of the root to the value of the\ngeneration of its commit root. Like this btrfs_block_can_be_shared()\nbehaves correctly for the case where the relocation root is created during\na transaction commit and for the case where it's created before a\ntransaction commit.\n\nFixes: 6426c7ad697d (btrfs: qgroup: Fix qgroup accounting when creating snapshot)\nSigned-off-by: Filipe Manana <fdmanana@suse.com>\nReviewed-by: Josef Bacik <jbacik@fb.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/NigelCunningham/tuxonice-kernel/commits/01f285fe1d885dadfd7439205c700340ec69ab13"},{"sha":"c01ea880e88abedec7c4f02fcd9a110ce73c7ccb","author":{"name":"David Sterba","email":"2a1b63fbe60861bed635596eb6fd114917061844@suse.com"},"message":"btrfs: store and load values of stripes_min/stripes_max in balance status item\n\ncommit ed0df618b1b06d7431ee4d985317fc5419a5d559 upstream.\n\nThe balance status item contains currently known filter values, but the\nstripes filter was unintentionally not among them. This would mean, that\ninterrupted and automatically restarted balance does not apply the\nstripe filters.\n\nFixes: dee32d0ac3719ef8d640efaf0884111df444730f\nSigned-off-by: David Sterba <dsterba@suse.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/NigelCunningham/tuxonice-kernel/commits/c01ea880e88abedec7c4f02fcd9a110ce73c7ccb"},{"sha":"a1e0e0476afb2471f9cee0a995206b053a8241f8","author":{"name":"Filipe Manana","email":"396addc00218539530419b15da697a581cb02fca@suse.com"},"message":"Btrfs: fix emptiness check for dirtied extent buffers at check_leaf()\n\ncommit f177d73949bf758542ca15a1c1945bd2e802cc65 upstream.\n\nWe can not simply use the owner field from an extent buffer's header to\nget the id of the respective tree when the extent buffer is from a\nrelocation tree. When we create the root for a relocation tree we leave\n(on purpose) the owner field with the same value as the subvolume's tree\nroot (we do this at ctree.c:btrfs_copy_root()). So we must ignore extent\nbuffers from relocation trees, which have the BTRFS_HEADER_FLAG_RELOC\nflag set, because otherwise we will always consider the extent buffer\nas not being the root of the tree (the root of original subvolume tree\nis always different from the root of the respective relocation tree).\n\nThis lead to assertion failures when running with the integrity checker\nenabled (CONFIG_BTRFS_FS_CHECK_INTEGRITY=y) such as the following:\n\n[  643.393409] BTRFS critical (device sdg): corrupt leaf, non-root leaf's nritems is 0: block=38506496, root=260, slot=0\n[  643.397609] BTRFS info (device sdg): leaf 38506496 total ptrs 0 free space 3995\n[  643.407075] assertion failed: 0, file: fs/btrfs/disk-io.c, line: 4078\n[  643.408425] ------------[ cut here ]------------\n[  643.409112] kernel BUG at fs/btrfs/ctree.h:3419!\n[  643.409773] invalid opcode: 0000 [#1] PREEMPT SMP\n[  643.410447] Modules linked in: dm_flakey dm_mod crc32c_generic btrfs xor raid6_pq ppdev psmouse acpi_cpufreq parport_pc evdev parport tpm_tis tpm_tis_core pcspkr serio_raw i2c_piix4 sg tpm i2c_core button processor loop autofs4 ext4 crc16 jbd2 mbcache sr_mod cdrom sd_mod ata_generic virtio_scsi ata_piix libata virtio_pci virtio_ring scsi_mod virtio e1000 floppy\n[  643.414356] CPU: 11 PID: 32726 Comm: btrfs Not tainted 4.8.0-rc8-btrfs-next-35+ #1\n[  643.414356] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.1-0-gb3ef39f-prebuilt.qemu-project.org 04/01/2014\n[  643.414356] task: ffff880145e95b00 task.stack: ffff88014826c000\n[  643.414356] RIP: 0010:[<ffffffffa0352759>]  [<ffffffffa0352759>] assfail.constprop.41+0x1c/0x1e [btrfs]\n[  643.414356] RSP: 0018:ffff88014826fa28  EFLAGS: 00010292\n[  643.414356] RAX: 0000000000000039 RBX: ffff88014e2d7c38 RCX: 0000000000000001\n[  643.414356] RDX: ffff88023f4d2f58 RSI: ffffffff81806c63 RDI: 00000000ffffffff\n[  643.414356] RBP: ffff88014826fa28 R08: 0000000000000001 R09: 0000000000000000\n[  643.414356] R10: ffff88014826f918 R11: ffffffff82f3c5ed R12: ffff880172910000\n[  643.414356] R13: ffff880233992230 R14: ffff8801a68a3310 R15: fffffffffffffff8\n[  643.414356] FS:  00007f9ca305e8c0(0000) GS:ffff88023f4c0000(0000) knlGS:0000000000000000\n[  643.414356] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\n[  643.414356] CR2: 00007f9ca3071000 CR3: 000000015d01b000 CR4: 00000000000006e0\n[  643.414356] Stack:\n[  643.414356]  ffff88014826fa50 ffffffffa02d655a 000000000000000a ffff88014e2d7c38\n[  643.414356]  0000000000000000 ffff88014826faa8 ffffffffa02b72f3 ffff88014826fab8\n[  643.414356]  00ffffffa03228e4 0000000000000000 0000000000000000 ffff8801bbd4e000\n[  643.414356] Call Trace:\n[  643.414356]  [<ffffffffa02d655a>] btrfs_mark_buffer_dirty+0xdf/0xe5 [btrfs]\n[  643.414356]  [<ffffffffa02b72f3>] btrfs_copy_root+0x18a/0x1d1 [btrfs]\n[  643.414356]  [<ffffffffa0322921>] create_reloc_root+0x72/0x1ba [btrfs]\n[  643.414356]  [<ffffffffa03267c2>] btrfs_init_reloc_root+0x7b/0xa7 [btrfs]\n[  643.414356]  [<ffffffffa02d9e44>] record_root_in_trans+0xdf/0xed [btrfs]\n[  643.414356]  [<ffffffffa02db04e>] btrfs_record_root_in_trans+0x50/0x6a [btrfs]\n[  643.414356]  [<ffffffffa030ad2b>] create_subvol+0x472/0x773 [btrfs]\n[  643.414356]  [<ffffffffa030b406>] btrfs_mksubvol+0x3da/0x463 [btrfs]\n[  643.414356]  [<ffffffffa030b406>] ? btrfs_mksubvol+0x3da/0x463 [btrfs]\n[  643.414356]  [<ffffffff810781ac>] ? preempt_count_add+0x65/0x68\n[  643.414356]  [<ffffffff811a6e97>] ? __mnt_want_write+0x62/0x77\n[  643.414356]  [<ffffffffa030b55d>] btrfs_ioctl_snap_create_transid+0xce/0x187 [btrfs]\n[  643.414356]  [<ffffffffa030b67d>] btrfs_ioctl_snap_create+0x67/0x81 [btrfs]\n[  643.414356]  [<ffffffffa030ecfd>] btrfs_ioctl+0x508/0x20dd [btrfs]\n[  643.414356]  [<ffffffff81293e39>] ? __this_cpu_preempt_check+0x13/0x15\n[  643.414356]  [<ffffffff81155eca>] ? handle_mm_fault+0x976/0x9ab\n[  643.414356]  [<ffffffff81091300>] ? arch_local_irq_save+0x9/0xc\n[  643.414356]  [<ffffffff8119a2b0>] vfs_ioctl+0x18/0x34\n[  643.414356]  [<ffffffff8119a8e8>] do_vfs_ioctl+0x581/0x600\n[  643.414356]  [<ffffffff814b9552>] ? entry_SYSCALL_64_fastpath+0x5/0xa8\n[  643.414356]  [<ffffffff81093fe9>] ? trace_hardirqs_on_caller+0x17b/0x197\n[  643.414356]  [<ffffffff8119a9be>] SyS_ioctl+0x57/0x79\n[  643.414356]  [<ffffffff814b9565>] entry_SYSCALL_64_fastpath+0x18/0xa8\n[  643.414356]  [<ffffffff81091b08>] ? trace_hardirqs_off_caller+0x3f/0xaa\n[  643.414356] Code: 89 83 88 00 00 00 31 c0 5b 41 5c 41 5d 5d c3 55 89 f1 48 c7 c2 98 bc 35 a0 48 89 fe 48 c7 c7 05 be 35 a0 48 89 e5 e8 13 46 dd e0 <0f> 0b 55 89 f1 48 c7 c2 9f d3 35 a0 48 89 fe 48 c7 c7 7a d5 35\n[  643.414356] RIP  [<ffffffffa0352759>] assfail.constprop.41+0x1c/0x1e [btrfs]\n[  643.414356]  RSP <ffff88014826fa28>\n[  643.468267] ---[ end trace 6a1b3fb1a9d7d6e3 ]---\n\nThis can be easily reproduced by running xfstests with the integrity\nchecker enabled.\n\nFixes: 1ba98d086fe3 (Btrfs: detect corruption when non-root leaf has zero item)\nSigned-off-by: Filipe Manana <fdmanana@suse.com>\nReviewed-by: Liu Bo <bo.li.liu@oracle.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/NigelCunningham/tuxonice-kernel/commits/a1e0e0476afb2471f9cee0a995206b053a8241f8"},{"sha":"1a5ec7dd17a98547618ea7b0ef3bbeb3837a7c49","author":{"name":"Filipe Manana","email":"396addc00218539530419b15da697a581cb02fca@suse.com"},"message":"Btrfs: fix qgroup rescan worker initialization\n\ncommit 8d9eddad19467b008e0c881bc3133d7da94b7ec1 upstream.\n\nWe were setting the qgroup_rescan_running flag to true only after the\nrescan worker started (which is a task run by a queue). So if a user\nspace task starts a rescan and immediately after asks to wait for the\nrescan worker to finish, this second call might happen before the rescan\nworker task starts running, in which case the rescan wait ioctl returns\nimmediatley, not waiting for the rescan worker to finish.\n\nThis was making the fstest btrfs/022 fail very often.\n\nFixes: d2c609b834d6 (btrfs: properly track when rescan worker is running)\nSigned-off-by: Filipe Manana <fdmanana@suse.com>\nReviewed-by: David Sterba <dsterba@suse.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/NigelCunningham/tuxonice-kernel/commits/1a5ec7dd17a98547618ea7b0ef3bbeb3837a7c49"},{"sha":"142513d6dc7ca378d90537abcc341d65dfaf438e","author":{"name":"Daniele Palmas","email":"8eadd4e0f410715cd0bee604d0bbc31740484d9b@gmail.com"},"message":"USB: serial: option: add support for Telit LE922A PIDs 0x1040, 0x1041\n\ncommit 5b09eff0c379002527ad72ea5ea38f25da8a8650 upstream.\n\nThis patch adds support for PIDs 0x1040, 0x1041 of Telit LE922A.\n\nSince the interface positions are the same than the ones used\nfor other Telit compositions, previous defined blacklists are used.\n\nSigned-off-by: Daniele Palmas <dnlplm@gmail.com>\nSigned-off-by: Johan Hovold <johan@kernel.org>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/NigelCunningham/tuxonice-kernel/commits/142513d6dc7ca378d90537abcc341d65dfaf438e"},{"sha":"5e7c90bd53c61f878eb18b02f388d54ba47eca83","author":{"name":"Giuseppe Lippolis","email":"c8f84b23db1da60a6bfd664092b50ea2fe4161d8@gmail.com"},"message":"USB: serial: option: add dlink dwm-158\n\ncommit d8a12b7117b42fd708f1e908498350232bdbd5ff upstream.\n\nAdding registration for 3G modem DWM-158 in usb-serial-option\n\nSigned-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com>\nSigned-off-by: Johan Hovold <johan@kernel.org>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/NigelCunningham/tuxonice-kernel/commits/5e7c90bd53c61f878eb18b02f388d54ba47eca83"},{"sha":"c094cd32b0c714cc94608ca8c706261d50bc43e5","author":{"name":"Johan Hovold","email":"c5aaa0c362db47011b825595d6a432662259e2f1@kernel.org"},"message":"USB: serial: kl5kusb105: fix open error path\n\ncommit 6774d5f53271d5f60464f824748995b71da401ab upstream.\n\nKill urbs and disable read before returning from open on failure to\nretrieve the line state.\n\nFixes: 1da177e4c3f4 (\"Linux-2.6.12-rc2\")\nSigned-off-by: Johan Hovold <johan@kernel.org>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/NigelCunningham/tuxonice-kernel/commits/c094cd32b0c714cc94608ca8c706261d50bc43e5"},{"sha":"20d7c1a68b5b9fc7fe94c543a9920d9d7234017c","author":{"name":"Nathaniel Quillin","email":"4d6334fa9a1f1e6d7e327cf6d1aa3e14d13b5262@google.com"},"message":"USB: cdc-acm: add device id for GW Instek AFG-125\n\ncommit 301216044e4c27d5a7323c1fa766266fad00db5e upstream.\n\nAdd device-id entry for GW Instek AFG-125, which has a byte swapped\nbInterfaceSubClass (0x20).\n\nSigned-off-by: Nathaniel Quillin <ndq@google.com>\nAcked-by: Oliver Neukum <oneukum@suse.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/NigelCunningham/tuxonice-kernel/commits/20d7c1a68b5b9fc7fe94c543a9920d9d7234017c"},{"sha":"3666b6280351c88592f7d767052d948fc81aeb18","author":{"name":"Felipe Balbi","email":"839ce88010ac82d4d5954e11ee7a7e49086a4b3e@linux.intel.com"},"message":"usb: dwc3: gadget: set PCM1 field of isochronous-first TRBs\n\ncommit 6b9018d4c1e5c958625be94a160a5984351d4632 upstream.\n\nIn case of High-Speed, High-Bandwidth endpoints, we\nneed to tell DWC3 that we have more than one packet\nper interval. We do that by setting PCM1 field of\nIsochronous-First TRB.\n\nSigned-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/NigelCunningham/tuxonice-kernel/commits/3666b6280351c88592f7d767052d948fc81aeb18"},{"sha":"32a35351b7ec93947efb394f252d9ad714a04f18","author":{"name":"Mathias Nyman","email":"6f76a2d91b00c1a813d5588fd87cc784fe96486e@linux.intel.com"},"message":"usb: hub: Fix auto-remount of safely removed or ejected USB-3 devices\n\ncommit 37be66767e3cae4fd16e064d8bb7f9f72bf5c045 upstream.\n\nUSB-3 does not have any link state that will avoid negotiating a connection\nwith a plugged-in cable but will signal the host when the cable is\nunplugged.\n\nFor USB-3 we used to first set the link to Disabled, then to RxDdetect to\nbe able to detect cable connects or disconnects. But in RxDetect the\nconnected device is detected again and eventually enabled.\n\nInstead set the link into U3 and disable remote wakeups for the device.\nThis is what Windows does, and what Alan Stern suggested.\n\nCc: Alan Stern <stern@rowland.harvard.edu>\nAcked-by: Alan Stern <stern@rowland.harvard.edu>\nSigned-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/NigelCunningham/tuxonice-kernel/commits/32a35351b7ec93947efb394f252d9ad714a04f18"},{"sha":"eab169397ad687e69b3bde3547a1fd37e7f81194","author":{"name":"Rafał Miłecki","email":"3e25091fba3f38b1a20c7513f1e079d4a52ff050@milecki.pl"},"message":"usb: core: usbport: Use proper LED API to fix potential crash\n\ncommit 89778ba335e302a450932ce5b703c1ee6216e949 upstream.\n\nCalling brightness_set manually isn't safe as some LED drivers don't\nimplement this callback. The best idea is to just use a proper helper\nwhich will fallback to the brightness_set_blocking callback if needed.\n\nThis fixes:\n[ 1461.761528] Unable to handle kernel NULL pointer dereference at virtual address 00000000\n(...)\n[ 1462.117049] Backtrace:\n[ 1462.119521] [<bf228164>] (usbport_trig_port_store [ledtrig_usbport]) from [<c023f758>] (dev_attr_store+0x20/0x2c)\n[ 1462.129826]  r7:dcabc7c0 r6:dee0ff80 r5:00000002 r4:bf228164\n[ 1462.135511] [<c023f738>] (dev_attr_store) from [<c0169310>] (sysfs_kf_write+0x48/0x4c)\n[ 1462.143459]  r5:00000002 r4:c023f738\n[ 1462.147049] [<c01692c8>] (sysfs_kf_write) from [<c0168ab8>] (kernfs_fop_write+0xf8/0x1f8)\n[ 1462.155258]  r5:00000002 r4:df4a1000\n[ 1462.158850] [<c01689c0>] (kernfs_fop_write) from [<c0100c78>] (__vfs_write+0x34/0x120)\n[ 1462.166800]  r10:00000000 r9:dee0e000 r8:c000fc24 r7:00000002 r6:dee0ff80 r5:c01689c0\n[ 1462.174660]  r4:df727a80\n[ 1462.177204] [<c0100c44>] (__vfs_write) from [<c0101ae4>] (vfs_write+0xac/0x170)\n[ 1462.184543]  r9:dee0e000 r8:c000fc24 r7:dee0ff80 r6:b6f092d0 r5:df727a80 r4:00000002\n[ 1462.192319] [<c0101a38>] (vfs_write) from [<c01028dc>] (SyS_write+0x4c/0xa8)\n[ 1462.199396]  r9:dee0e000 r8:c000fc24 r7:00000002 r6:b6f092d0 r5:df727a80 r4:df727a80\n[ 1462.207174] [<c0102890>] (SyS_write) from [<c000fa60>] (ret_fast_syscall+0x0/0x3c)\n[ 1462.214774]  r7:00000004 r6:ffffffff r5:00000000 r4:00000000\n[ 1462.220456] Code: bad PC value\n[ 1462.223560] ---[ end trace 676638a3a12c7a56 ]---\n\nReported-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>\nSigned-off-by: Rafał Miłecki <rafal@milecki.pl>\nFixes: 0f247626cbb (\"usb: core: Introduce a USB port LED trigger\")\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/NigelCunningham/tuxonice-kernel/commits/eab169397ad687e69b3bde3547a1fd37e7f81194"},{"sha":"5180169dae85a3bd5b081529ba149374a0b3ffed","author":{"name":"Peter Chen","email":"1bd50f75c460ec6fb073f71822628b73bde58ca9@nxp.com"},"message":"usb: gadget: f_uac2: fix error handling at afunc_bind\n\ncommit f1d3861d63a5d79b8968a02eea1dcb01bb684e62 upstream.\n\nThe current error handling flow uses incorrect goto label, fix it\n\nFixes: d12a8727171c (\"usb: gadget: function: Remove redundant usb_free_all_descriptors\")\nSigned-off-by: Peter Chen <peter.chen@nxp.com>\nSigned-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/NigelCunningham/tuxonice-kernel/commits/5180169dae85a3bd5b081529ba149374a0b3ffed"},{"sha":"e0aa5ec40d6effc891eb63740bb03f5f50cb539e","author":{"name":"Felipe Balbi","email":"839ce88010ac82d4d5954e11ee7a7e49086a4b3e@linux.intel.com"},"message":"usb: gadget: composite: correctly initialize ep->maxpacket\n\ncommit e8f29bb719b47a234f33b0af62974d7a9521a52c upstream.\n\nusb_endpoint_maxp() returns wMaxPacketSize in its\nraw form. Without taking into consideration that it\nalso contains other bits reserved for isochronous\nendpoints.\n\nThis patch fixes one occasion where this is a\nproblem by making sure that we initialize\nep->maxpacket only with lower 10 bits of the value\nreturned by usb_endpoint_maxp(). Note that seperate\npatches will be necessary to audit all call sites of\nusb_endpoint_maxp() and make sure that\nusb_endpoint_maxp() only returns lower 10 bits of\nwMaxPacketSize.\n\nSigned-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/NigelCunningham/tuxonice-kernel/commits/e0aa5ec40d6effc891eb63740bb03f5f50cb539e"},{"sha":"420f170ce1ba999872f4be893807041b0d8db930","author":{"name":"Alan Stern","email":"5c4cbde65af01ad64f5b2177d0cd78ab5b01e5a1@rowland.harvard.edu"},"message":"USB: UHCI: report non-PME wakeup signalling for Intel hardware\n\ncommit ccdb6be9ec6580ef69f68949ebe26e0fb58a6fb0 upstream.\n\nThe UHCI controllers in Intel chipsets rely on a platform-specific non-PME\nmechanism for wakeup signalling.  They can generate wakeup signals even\nthough they don't support PME.\n\nWe need to let the USB core know this so that it will enable runtime\nsuspend for UHCI controllers.\n\nSigned-off-by: Alan Stern <stern@rowland.harvard.edu>\nSigned-off-by: Bjorn Helgaas <bhelgaas@google.com>\nAcked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/NigelCunningham/tuxonice-kernel/commits/420f170ce1ba999872f4be893807041b0d8db930"},{"sha":"77bd73ce21fafe2ca80fe09b6e9dbebf93fd4cd6","author":{"name":"Krzysztof Opasiak","email":"1be28433132fa26ab9a845674fa67f2c0fdfd2d1@samsung.com"},"message":"usbip: vudc: fix: Clear already_seen flag also for ep0\n\ncommit 3e448e13a662fb20145916636127995cbf37eb83 upstream.\n\nep_list inside gadget structure doesn't contain ep0.\nIt is stored separately in ep0 field.\n\nThis causes an urb hang if gadget driver decides to\ndelay setup handling. On host side this is visible as\ntimeout error when setting configuration.\n\nThis bug can be reproduced using for example any gadget\nwith mass storage function.\n\nFixes: abdb29574322 (\"usbip: vudc: Add vudc_transfer\")\nSigned-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>\nAcked-by: Shuah Khan <shuahkh@osg.samsung.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/NigelCunningham/tuxonice-kernel/commits/77bd73ce21fafe2ca80fe09b6e9dbebf93fd4cd6"}]}
{"actor":{"display_login":"NigelCunningham"}}