Commit d0b213b5 authored by Andrey Konovalov's avatar Andrey Konovalov Committed by Vincenzo Frascino
Browse files
parent 8bacd37a
......@@ -7,11 +7,37 @@
#include <linux/init.h>
#include <sound/core.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/gfp.h>
#include <linux/slab.h>
static void mte_test(void)
{
uint64_t *p = kmalloc(sizeof(uint64_t), GFP_ATOMIC);
size_t size = ksize(p);
pr_err("Memory Tagging Test (CPU %u)\n", smp_processor_id());
pr_err("p = 0x%px, size = %zu\n", p, size);
pr_err("p[0] <= 1\n");
p[0] = 1;
pr_err("p[0] = %llu\n", p[0]);
pr_err("kfree(p)\n");
kfree(p);
pr_err("p[0] <= 0\n");
p[0] = 0;
}
static int __init alsa_sound_last_init(void)
{
struct snd_card *card;
int idx, ok = 0;
printk(KERN_INFO "ALSA device list:\n");
for (idx = 0; idx < SNDRV_CARDS; idx++) {
card = snd_card_ref(idx);
......@@ -23,6 +49,9 @@ static int __init alsa_sound_last_init(void)
}
if (ok == 0)
printk(KERN_INFO " No soundcards found.\n");
mte_test();
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment