Skip to content

dma_request_chan result check broken #9

@DanielO

Description

@DanielO

If dma_request_chan fails (eg if you have a receive only DMA controller but used channel 0 for Rx rather than 1) then the check for NULL will pass but the driver will later cause a page fault dereferencing the result.

The check should be:

        pchannel_p->channel_p = dma_request_chan(&pdev->dev, name);
        if (IS_ERR(pchannel_p->channel_p)) {
                dev_err(pchannel_p->dma_device_p, "DMA channel request error: %d\n", PTR_ERR(pchannel_p->channel_p));
                return ERROR;
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions