Exploit databaseDownload repository ZIP
GH-a4473dcd9930d1ae4c0775adc06b1cfb
satheesh575555/linux-4.19.72_cve-2022-36946
Sources for CVE-2022-36946
2 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files26
satheesh575555/linux-4.19.72_cve-2022-36946Revision 34cc7d8183fd
- ↑..Parent directory
- Makefile
- platform_bcm43xx.c
- platform_bma023.c
- platform_bt.c
- platform_emc1403.c
- platform_gpio_keys.c
- platform_lis331.c
- platform_max7315.c
- platform_mpu3050.c
- platform_mrfld_pinctrl.c
- platform_mrfld_power_btn.c
- platform_mrfld_rtc.c
- platform_mrfld_sd.c
- platform_mrfld_spidev.c
- platform_mrfld_wdt.c
- platform_msic.c
- platform_msic.h
- platform_msic_audio.c
- platform_msic_battery.c
- platform_msic_gpio.c
- platform_msic_ocd.c
- platform_msic_power_btn.c
- platform_msic_thermal.c
- platform_pcal9555a.c
- platform_tc35876x.c
- platform_tca6416.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c
C · 2,038 bytes/*
* Intel Merrifield watchdog platform device library file
*
* (C) Copyright 2014 Intel Corporation
* Author: David Cohen <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2
* of the License.
*/
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/platform_data/intel-mid_wdt.h>
#include <asm/intel-mid.h>
#include <asm/intel_scu_ipc.h>
#include <asm/io_apic.h>
#include <asm/hw_irq.h>
#define TANGIER_EXT_TIMER0_MSI 12
static struct platform_device wdt_dev = {
.name = "intel_mid_wdt",
.id = -1,
};
static int tangier_probe(struct platform_device *pdev)
{
struct irq_alloc_info info;
struct intel_mid_wdt_pdata *pdata = pdev->dev.platform_data;
int gsi = TANGIER_EXT_TIMER0_MSI;
int irq;
if (!pdata)
return -EINVAL;
/* IOAPIC builds identity mapping between GSI and IRQ on MID */
ioapic_set_alloc_attr(&info, cpu_to_node(0), 1, 0);
irq = mp_map_gsi_to_irq(gsi, IOAPIC_MAP_ALLOC, &info);
if (irq < 0) {
dev_warn(&pdev->dev, "cannot find interrupt %d in ioapic\n", gsi);
return irq;
}
pdata->irq = irq;
return 0;
}
static struct intel_mid_wdt_pdata tangier_pdata = {
.probe = tangier_probe,
};
static int wdt_scu_status_change(struct notifier_block *nb,
unsigned long code, void *data)
{
if (code == SCU_DOWN) {
platform_device_unregister(&wdt_dev);
return 0;
}
return platform_device_register(&wdt_dev);
}
static struct notifier_block wdt_scu_notifier = {
.notifier_call = wdt_scu_status_change,
};
static int __init register_mid_wdt(void)
{
if (intel_mid_identify_cpu() != INTEL_MID_CPU_CHIP_TANGIER)
return -ENODEV;
wdt_dev.dev.platform_data = &tangier_pdata;
/*
* We need to be sure that the SCU IPC is ready before watchdog device
* can be registered:
*/
intel_scu_notifier_add(&wdt_scu_notifier);
return 0;
}
arch_initcall(register_mid_wdt);