Re: [PATCH 102/190] Revert "media: video-mux: fix null pointer dereferences"

From: Greg Kroah-Hartman
Date: Wed Apr 28 2021 - 04:53:57 EST


On Wed, Apr 21, 2021 at 02:59:37PM +0200, Greg Kroah-Hartman wrote:
> This reverts commit aeb0d0f581e2079868e64a2e5ee346d340376eae.
>
> 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: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
> Cc: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
> Cc: Mauro Carvalho Chehab <mchehab+samsung@xxxxxxxxxx>
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> ---
> drivers/media/platform/video-mux.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/media/platform/video-mux.c b/drivers/media/platform/video-mux.c
> index 133122e38515..a754e20850c2 100644
> --- a/drivers/media/platform/video-mux.c
> +++ b/drivers/media/platform/video-mux.c
> @@ -442,14 +442,9 @@ static int video_mux_probe(struct platform_device *pdev)
> vmux->active = -1;
> vmux->pads = devm_kcalloc(dev, num_pads, sizeof(*vmux->pads),
> GFP_KERNEL);
> - if (!vmux->pads)
> - return -ENOMEM;
> -
> vmux->format_mbus = devm_kcalloc(dev, num_pads,
> sizeof(*vmux->format_mbus),
> GFP_KERNEL);
> - if (!vmux->format_mbus)
> - return -ENOMEM;
>
> for (i = 0; i < num_pads; i++) {
> vmux->pads[i].flags = (i < num_pads - 1) ? MEDIA_PAD_FL_SINK
> --
> 2.31.1
>

This looks correct, dropping from revert list.

greg k-h