Re: [PATCH 111/190] Revert "gpio: aspeed: fix a potential NULL pointer dereference"

From: Bartosz Golaszewski
Date: Wed Apr 21 2021 - 09:53:59 EST


On Wed, Apr 21, 2021 at 3:07 PM Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> This reverts commit 6cf4511e9729c00a7306cf94085f9cc3c52ee723.
>
> Commits from @umn.edu addresses have been found to be submitted in "bad
> faith" to try to test the kernel community's ability to review "known
> malicious" changes. The result of these submissions can be found in a
> paper published at the 42nd IEEE Symposium on Security and Privacy
> entitled, "Open Source Insecurity: Stealthily Introducing
> Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University
> of Minnesota) and Kangjie Lu (University of Minnesota).
>
> Because of this, all submissions from this group must be reverted from
> the kernel tree and will need to be re-reviewed again to determine if
> they actually are a valid fix. Until that work is complete, remove this
> change to ensure that no problems are being introduced into the
> codebase.
>
> Cc: Kangjie Lu <kjlu@xxxxxxx>
> Cc: Andrew Jeffery <andrew@xxxxxxxx>
> Cc: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> ---
> drivers/gpio/gpio-aspeed.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c
> index b966f5e28ebf..91d0fdf8469d 100644
> --- a/drivers/gpio/gpio-aspeed.c
> +++ b/drivers/gpio/gpio-aspeed.c
> @@ -1231,8 +1231,6 @@ static int __init aspeed_gpio_probe(struct platform_device *pdev)
>
> gpio->offset_timer =
> devm_kzalloc(&pdev->dev, gpio->chip.ngpio, GFP_KERNEL);
> - if (!gpio->offset_timer)
> - return -ENOMEM;
>
> rc = devm_gpiochip_add_data(&pdev->dev, &gpio->chip, gpio);
> if (rc < 0)
> --
> 2.31.1
>

Hi Greg,

I'm sorry you need to waste your time on this cr*p.

This patch wasn't wrong though, so I'd recommend it's left in the tree.

Best regards,
Bartosz Golaszewski