[hook] disable TCO for the hooked function
This commit is contained in:
parent
d88aecfc00
commit
69ec73efd3
|
@ -1,5 +1,5 @@
|
||||||
PACKAGE_NAME="vendor-reset"
|
PACKAGE_NAME="vendor-reset"
|
||||||
PACKAGE_VERSION="0.0.16"
|
PACKAGE_VERSION="0.0.17"
|
||||||
BUILT_MODULE_NAME[0]="${PACKAGE_NAME}"
|
BUILT_MODULE_NAME[0]="${PACKAGE_NAME}"
|
||||||
MAKE[0]="make KDIR=${kernel_source_dir}"
|
MAKE[0]="make KDIR=${kernel_source_dir}"
|
||||||
CLEAN="make KDIR=${kernel_source_dir} clean"
|
CLEAN="make KDIR=${kernel_source_dir} clean"
|
||||||
|
|
|
@ -29,6 +29,8 @@ module_param(install_hook, bool, 0);
|
||||||
static bool hook_installed = false;
|
static bool hook_installed = false;
|
||||||
static int (*orig_pci_dev_specific_reset)(struct pci_dev *dev, int probe);
|
static int (*orig_pci_dev_specific_reset)(struct pci_dev *dev, int probe);
|
||||||
|
|
||||||
|
/* TCO breaks the hook, we must disable it for this function */
|
||||||
|
__attribute__((optimize("-fno-optimize-sibling-calls")))
|
||||||
static int hooked_pci_dev_specific_reset(struct pci_dev *dev, int probe)
|
static int hooked_pci_dev_specific_reset(struct pci_dev *dev, int probe)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
Loading…
Reference in New Issue