Exploit databaseDownload repository ZIP
GH-b6f78b211ff4ea5e7b3ebffe1f088758
abrarkhan/linux-4.19.72_cve-2020-24490
Sources for CVE-2020-24490
5 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files83
abrarkhan/linux-4.19.72_cve-2020-24490Revision aa3f6929b62b
- ↑..Parent directory
- trigger/
- Kconfig
- Makefile
- led-class-flash.c
- led-class.c
- led-core.c
- led-triggers.c
- leds-88pm860x.c
- leds-aat1290.c
- leds-adp5520.c
- leds-apu.c
- leds-as3645a.c
- leds-asic3.c
- leds-bcm6328.c
- leds-bcm6358.c
- leds-bd2802.c
- leds-blinkm.c
- leds-clevo-mail.c
- leds-cobalt-qube.c
- leds-cobalt-raq.c
- leds-cpcap.c
- leds-cr0014114.c
- leds-da903x.c
- leds-da9052.c
- leds-dac124s085.c
- leds-fsg.c
- leds-gpio-register.c
- leds-gpio.c
- leds-hp6xx.c
- leds-ipaq-micro.c
- leds-is31fl319x.c
- leds-is31fl32xx.c
- leds-ktd2692.c
- leds-lm3530.c
- leds-lm3533.c
- leds-lm355x.c
- leds-lm3601x.c
- leds-lm3642.c
- leds-lm3692x.c
- leds-locomo.c
- leds-lp3944.c
- leds-lp3952.c
- leds-lp5521.c
- leds-lp5523.c
- leds-lp5562.c
- leds-lp55xx-common.c
- leds-lp55xx-common.h
- leds-lp8501.c
- leds-lp8788.c
- leds-lp8860.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
drivers/leds/leds-gpio-register.c
C · 1,366 bytes/*
* Copyright (C) 2011 Pengutronix
* Uwe Kleine-Koenig <[email protected]>
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 2 as published by the
* Free Software Foundation.
*/
#include <linux/err.h>
#include <linux/leds.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
/**
* gpio_led_register_device - register a gpio-led device
* @pdata: the platform data used for the new device
*
* Makes a copy of pdata and pdata->leds and registers a new leds-gpio device
* with the result. This allows to have pdata and pdata-leds in .init.rodata
* and so saves some bytes compared to a static struct platform_device with
* static platform data.
*
* Returns the registered device or an error pointer.
*/
struct platform_device *__init gpio_led_register_device(
int id, const struct gpio_led_platform_data *pdata)
{
struct platform_device *ret;
struct gpio_led_platform_data _pdata = *pdata;
if (!pdata->num_leds)
return ERR_PTR(-EINVAL);
_pdata.leds = kmemdup(pdata->leds,
pdata->num_leds * sizeof(*pdata->leds), GFP_KERNEL);
if (!_pdata.leds)
return ERR_PTR(-ENOMEM);
ret = platform_device_register_resndata(NULL, "leds-gpio", id,
NULL, 0, &_pdata, sizeof(_pdata));
if (IS_ERR(ret))
kfree(_pdata.leds);
return ret;
}