Re: [PATCH] dmaengine: rcar-dmac: Reject zero-length slave DMA requests

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

 



> > [..]
> > > -     if (rchan->mid_rid < 0 || !sg_len) {
> > > +     if (rchan->mid_rid < 0 || !sg_len || !sg_dma_len(sgl)) {
> > >               dev_warn(chan->device->dev,
> > >                        "%s: bad parameter: len=%d, id=%d\n",
> > >                        __func__, sg_len, rchan->mid_rid);
> >
> > Just wanted to share the WARN output proposed by Wolfram in
> > https://patchwork.kernel.org/patch/11012991/#22721733
> > in case the issue discussed in [1] is reproduced with this patch:
> 
> I'm not such a big fan of WARN()...

Well, if 'id' points indirectly to the driver, then I agree here that
WARN might not be needed. Not as obvious, but probably good enough.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux