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 files1,277
abrarkhan/linux-4.19.72_cve-2020-24490Revision aa3f6929b62b
- ↑..Parent directory
- amba/
- avf/
- bcma/
- byteorder/
- can/
- ceph/
- clk/
- crush/
- decompress/
- dma/
- dsa/
- extcon/
- firmware/
- fpga/
- fsl/
- gpio/
- hsi/
- iio/
- input/
- irqchip/
- isdn/
- lockd/
- mailbox/
- mfd/
- mlx4/
- mlx5/
- mmc/
- mtd/
- mux/
- netfilter/
- netfilter_arp/
- netfilter_bridge/
- netfilter_ipv4/
- netfilter_ipv6/
- perf/
- phy/
- pinctrl/
- platform_data/
- power/
- qed/
- raid/
- regulator/
- remoteproc/
- reset/
- rpmsg/
- rtc/
- sched/
- soc/
- soundwire/
- spi/
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
include/linux/err.h
Text · 1,583 bytes/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_ERR_H
#define _LINUX_ERR_H
#include <linux/compiler.h>
#include <linux/types.h>
#include <asm/errno.h>
/*
* Kernel pointers have redundant information, so we can use a
* scheme where we can return either an error code or a normal
* pointer with the same return value.
*
* This should be a per-architecture thing, to allow different
* error and pointer decisions.
*/
#define MAX_ERRNO 4095
#ifndef __ASSEMBLY__
#define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
static inline void * __must_check ERR_PTR(long error)
{
return (void *) error;
}
static inline long __must_check PTR_ERR(__force const void *ptr)
{
return (long) ptr;
}
static inline bool __must_check IS_ERR(__force const void *ptr)
{
return IS_ERR_VALUE((unsigned long)ptr);
}
static inline bool __must_check IS_ERR_OR_NULL(__force const void *ptr)
{
return unlikely(!ptr) || IS_ERR_VALUE((unsigned long)ptr);
}
/**
* ERR_CAST - Explicitly cast an error-valued pointer to another pointer type
* @ptr: The pointer to cast.
*
* Explicitly cast an error-valued pointer to another pointer type in such a
* way as to make it clear that's what's going on.
*/
static inline void * __must_check ERR_CAST(__force const void *ptr)
{
/* cast away the const */
return (void *) ptr;
}
static inline int __must_check PTR_ERR_OR_ZERO(__force const void *ptr)
{
if (IS_ERR(ptr))
return PTR_ERR(ptr);
else
return 0;
}
/* Deprecated */
#define PTR_RET(p) PTR_ERR_OR_ZERO(p)
#endif
#endif /* _LINUX_ERR_H */