Skip to content

Commit

Permalink
Merge branch 'akpm/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Rothwell committed Oct 25, 2021
2 parents 11eb436 + 39573ca commit ff901c4
Showing 7 changed files with 26 additions and 13 deletions.
2 changes: 1 addition & 1 deletion arch/arm64/mm/kasan_init.c
Original file line number Diff line number Diff line change
@@ -309,7 +309,7 @@ void __init kasan_init(void)
kasan_init_depth();
#if defined(CONFIG_KASAN_GENERIC)
/* CONFIG_KASAN_SW_TAGS also requires kasan_init_sw_tags(). */
pr_info("KernelAddressSanitizer initialized\n");
pr_info("KernelAddressSanitizer initialized (generic)\n");
#endif
}

9 changes: 9 additions & 0 deletions drivers/gpu/drm/drm_modeset_lock.c
Original file line number Diff line number Diff line change
@@ -107,6 +107,11 @@ static void __drm_stack_depot_print(depot_stack_handle_t stack_depot)

kfree(buf);
}

static void __drm_stack_depot_init(void)
{
stack_depot_init();
}
#else /* CONFIG_DRM_DEBUG_MODESET_LOCK */
static depot_stack_handle_t __drm_stack_depot_save(void)
{
@@ -115,6 +120,9 @@ static depot_stack_handle_t __drm_stack_depot_save(void)
static void __drm_stack_depot_print(depot_stack_handle_t stack_depot)
{
}
static void __drm_stack_depot_init(void)
{
}
#endif /* CONFIG_DRM_DEBUG_MODESET_LOCK */

/**
@@ -359,6 +367,7 @@ void drm_modeset_lock_init(struct drm_modeset_lock *lock)
{
ww_mutex_init(&lock->mutex, &crtc_ww_class);
INIT_LIST_HEAD(&lock->head);
__drm_stack_depot_init();
}
EXPORT_SYMBOL(drm_modeset_lock_init);

2 changes: 2 additions & 0 deletions init/Kconfig
Original file line number Diff line number Diff line change
@@ -1906,6 +1906,7 @@ choice

config SLAB
bool "SLAB"
depends on !PREEMPT_RT
select HAVE_HARDENED_USERCOPY_ALLOCATOR
help
The regular slab allocator that is established and known to work
@@ -1926,6 +1927,7 @@ config SLUB
config SLOB
depends on EXPERT
bool "SLOB (Simple Allocator)"
depends on !PREEMPT_RT
help
SLOB replaces the stock allocator with a drastically simpler
allocator. SLOB is generally more space efficient but
14 changes: 13 additions & 1 deletion mm/kasan/hw_tags.c
Original file line number Diff line number Diff line change
@@ -106,6 +106,16 @@ static int __init early_kasan_flag_stacktrace(char *arg)
}
early_param("kasan.stacktrace", early_kasan_flag_stacktrace);

static inline const char *kasan_mode_info(void)
{
if (kasan_mode == KASAN_MODE_ASYNC)
return "async";
else if (kasan_mode == KASAN_MODE_ASYMM)
return "asymm";
else
return "sync";
}

/* kasan_init_hw_tags_cpu() is called for each CPU. */
void kasan_init_hw_tags_cpu(void)
{
@@ -177,7 +187,9 @@ void __init kasan_init_hw_tags(void)
break;
}

pr_info("KernelAddressSanitizer initialized\n");
pr_info("KernelAddressSanitizer initialized (hw-tags, mode=%s, stacktrace=%s)\n",
kasan_mode_info(),
kasan_stack_collection_enabled() ? "on" : "off");
}

void kasan_alloc_pages(struct page *page, unsigned int order, gfp_t flags)
2 changes: 1 addition & 1 deletion mm/kasan/sw_tags.c
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ void __init kasan_init_sw_tags(void)
for_each_possible_cpu(cpu)
per_cpu(prng_state, cpu) = (u32)get_cycles();

pr_info("KernelAddressSanitizer initialized\n");
pr_info("KernelAddressSanitizer initialized (sw-tags)\n");
}

/*
4 changes: 0 additions & 4 deletions mm/memcontrol.c
Original file line number Diff line number Diff line change
@@ -2058,13 +2058,11 @@ void folio_memcg_lock(struct folio *folio)
memcg->move_lock_task = current;
memcg->move_lock_flags = flags;
}
EXPORT_SYMBOL(folio_memcg_lock);

void lock_page_memcg(struct page *page)
{
folio_memcg_lock(page_folio(page));
}
EXPORT_SYMBOL(lock_page_memcg);

static void __folio_memcg_unlock(struct mem_cgroup *memcg)
{
@@ -2092,13 +2090,11 @@ void folio_memcg_unlock(struct folio *folio)
{
__folio_memcg_unlock(folio_memcg(folio));
}
EXPORT_SYMBOL(folio_memcg_unlock);

void unlock_page_memcg(struct page *page)
{
folio_memcg_unlock(page_folio(page));
}
EXPORT_SYMBOL(unlock_page_memcg);

struct obj_stock {
#ifdef CONFIG_MEMCG_KMEM
6 changes: 0 additions & 6 deletions mm/migrate.c
Original file line number Diff line number Diff line change
@@ -404,12 +404,6 @@ int folio_migrate_mapping(struct address_space *mapping,
newzone = folio_zone(newfolio);

xas_lock_irq(&xas);
if (folio_ref_count(folio) != expected_count ||
xas_load(&xas) != folio) {
xas_unlock_irq(&xas);
return -EAGAIN;
}

if (!folio_ref_freeze(folio, expected_count)) {
xas_unlock_irq(&xas);
return -EAGAIN;

0 comments on commit ff901c4

Please sign in to comment.