History

Merge tag 'block-5.6-2020-03-07' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe: "Here are a few fixes that should go into this release. This contains: - Revert of a bad bcache patch from this merge window - Removed unused function (Daniel) - Fixup for the blktrace fix from Jan from this release (Cengiz) - Fix of deeper level bfqq overwrite in BFQ (Carlo)" * tag 'block-5.6-2020-03-07' of git://git.kernel.dk/linux-block: block, bfq: fix overwrite of bfq_group pointer in bfq_find_set_group() blktrace: fix dereference after null check Revert "bcache: ignore pending signals when creating gc and allocator thread" block: Remove used kblockd_schedule_work_on()

Linus Torvalds committed 6 years ago

Commit 5dfcc132 parents 6f784a3 14afc596 files · +11 −41Browse files

Unified · Split

6 files
  1. block/bfq-cgroup.c +5 −4
  2. block/blk-core.c +0 −6
  3. drivers/md/bcache/alloc.c +2 −16
  4. drivers/md/bcache/btree.c +0 −13
  5. include/linux/blkdev.h +0 −1
  6. kernel/trace/blktrace.c +4 −1
block/bfq-cgroup.c+5−4
@@ -610,12 +610,13 @@ struct bfq_group *bfq_find_set_group(struct bfq_data *bfqd, · 609 unmodified lines
610610 */
611611 entity = &bfqg->entity;
612612 for_each_entity(entity) {
613− bfqg = container_of(entity, struct bfq_group, entity);
614− if (bfqg != bfqd->root_group) {
615− parent = bfqg_parent(bfqg);
613+ struct bfq_group *curr_bfqg = container_of(entity,
614+ struct bfq_group, entity);
615+ if (curr_bfqg != bfqd->root_group) {
616+ parent = bfqg_parent(curr_bfqg);
616617 if (!parent)
617618 parent = bfqd->root_group;
618− bfq_group_set_parent(bfqg, parent);
619+ bfq_group_set_parent(curr_bfqg, parent);
619620 }
620621 }
621622
block/blk-core.c+0−6
@@ -1663,12 +1663,6 @@ int kblockd_schedule_work(struct work_struct *work) · 1662 unmodified lines
16631663 }
16641664 EXPORT_SYMBOL(kblockd_schedule_work);
16651665
1666−int kblockd_schedule_work_on(int cpu, struct work_struct *work)
1667−{
1668− return queue_work_on(cpu, kblockd_workqueue, work);
1669−}
1670−EXPORT_SYMBOL(kblockd_schedule_work_on);
1671−
16721666 int kblockd_mod_delayed_work_on(int cpu, struct delayed_work *dwork,
16731667 unsigned long delay)
16741668 {
drivers/md/bcache/alloc.c+2−16
@@ -67,7 +67,6 @@ · 66 unmodified lines
6767 #include <linux/blkdev.h>
6868 #include <linux/kthread.h>
6969 #include <linux/random.h>
70−#include <linux/sched/signal.h>
7170 #include <trace/events/bcache.h>
7271
7372 #define MAX_OPEN_BUCKETS 128
@@ -734,21 +733,8 @@ int bch_open_buckets_alloc(struct cache_set *c) · 660 unmodified lines
734733
735734 int bch_cache_allocator_start(struct cache *ca)
736735 {
737− struct task_struct *k;
738−
739− /*
740− * In case previous btree check operation occupies too many
741− * system memory for bcache btree node cache, and the
742− * registering process is selected by OOM killer. Here just
743− * ignore the SIGKILL sent by OOM killer if there is, to
744− * avoid kthread_run() being failed by pending signals. The
745− * bcache registering process will exit after the registration
746− * done.
747− */
748− if (signal_pending(current))
749− flush_signals(current);
750−
751− k = kthread_run(bch_allocator_thread, ca, "bcache_allocator");
736+ struct task_struct *k = kthread_run(bch_allocator_thread,
737+ ca, "bcache_allocator");
752738 if (IS_ERR(k))
753739 return PTR_ERR(k);
754740
drivers/md/bcache/btree.c+0−13
@@ -34,7 +34,6 @@ · 33 unmodified lines
3434 #include <linux/random.h>
3535 #include <linux/rcupdate.h>
3636 #include <linux/sched/clock.h>
37−#include <linux/sched/signal.h>
3837 #include <linux/rculist.h>
3938 #include <linux/delay.h>
4039 #include <trace/events/bcache.h>
@@ -1914,18 +1913,6 @@ static int bch_gc_thread(void *arg) · 1873 unmodified lines
19141913
19151914 int bch_gc_thread_start(struct cache_set *c)
19161915 {
1917− /*
1918− * In case previous btree check operation occupies too many
1919− * system memory for bcache btree node cache, and the
1920− * registering process is selected by OOM killer. Here just
1921− * ignore the SIGKILL sent by OOM killer if there is, to
1922− * avoid kthread_run() being failed by pending signals. The
1923− * bcache registering process will exit after the registration
1924− * done.
1925− */
1926− if (signal_pending(current))
1927− flush_signals(current);
1928−
19291916 c->gc_thread = kthread_run(bch_gc_thread, c, "bcache_gc");
19301917 return PTR_ERR_OR_ZERO(c->gc_thread);
19311918 }
include/linux/blkdev.h+0−1
@@ -1494,7 +1494,6 @@ static inline void put_dev_sector(Sector p) · 1493 unmodified lines
14941494 }
14951495
14961496 int kblockd_schedule_work(struct work_struct *work);
1497−int kblockd_schedule_work_on(int cpu, struct work_struct *work);
14981497 int kblockd_mod_delayed_work_on(int cpu, struct delayed_work *dwork, unsigned long delay);
14991498
15001499 #define MODULE_ALIAS_BLOCKDEV(major,minor) \
kernel/trace/blktrace.c+4−1
@@ -1896,8 +1896,11 @@ static ssize_t sysfs_blk_trace_attr_store(struct device *dev, · 1895 unmodified lines
18961896 }
18971897
18981898 ret = 0;
1899− if (bt == NULL)
1899+ if (bt == NULL) {
19001900 ret = blk_trace_setup_queue(q, bdev);
1901+ bt = rcu_dereference_protected(q->blk_trace,
1902+ lockdep_is_held(&q->blk_trace_mutex));
1903+ }
19011904
19021905 if (ret == 0) {
19031906 if (attr == &dev_attr_act_mask)