Re: [PATCH] Revert "platform/x86: hp-wmi: Changing bios_args.data to be dynamically allocated"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 7, 2022 at 7:59 AM Jorge Lopez <jorgealtxwork@xxxxxxxxx> wrote:
>
> This reverts commit 4b4967cbd2685f313411e6facf915fb2ae01d796.
>
> Changes to bios_args.data to be allocated dynamically causes
> several WMI calls for OMEN laptops to fail.  The problem
> is resolved by reverting commit 4b4967cbd26.

As a quick fix it's good, but have you had a chance to understand why
this failure happened in the first place?

Can you check my theory that is expressed in the code below?

...

> -       bios_args_size = struct_size(args, data, insize);

Try to replace insize here with

max(insize, 128)

> -       args = kmalloc(bios_args_size, GFP_KERNEL);
> -       if (!args)
> -               return -ENOMEM;
> -
> -       input.length = bios_args_size;
> -       input.pointer = args;

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux