lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YoAZjpzAEugCiv/Q@dev-arch.thelio-3990X>
Date:   Sat, 14 May 2022 14:05:18 -0700
From:   Nathan Chancellor <nathan@...nel.org>
To:     Wolfram Sang <wsa@...nel.org>
Cc:     Codrin Ciubotariu <codrin.ciubotariu@...rochip.com>,
        Nicolas Ferre <nicolas.ferre@...rochip.com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Claudiu Beznea <claudiu.beznea@...rochip.com>,
        Michael Walle <michael@...le.cc>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Tom Rix <trix@...hat.com>, linux-i2c@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        llvm@...ts.linux.dev
Subject: Re: [PATCH] i2c: at91: Initialize dma_buf in at91_twi_xfer()

On Sat, May 14, 2022 at 03:42:08PM +0200, Wolfram Sang wrote:
> On Thu, May 05, 2022 at 08:27:38AM -0700, Nathan Chancellor wrote:
> > Clang warns:
> > 
> >   drivers/i2c/busses/i2c-at91-master.c:707:6: warning: variable 'dma_buf' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
> >           if (dev->use_dma) {
> >               ^~~~~~~~~~~~
> >   drivers/i2c/busses/i2c-at91-master.c:717:27: note: uninitialized use occurs here
> >           i2c_put_dma_safe_msg_buf(dma_buf, m_start, !ret);
> >                                    ^~~~~~~
> > 
> > Initialize dma_buf to NULL, as i2c_put_dma_safe_msg_buf() is a no-op
> > when the first argument is NULL, which will work for the !dev->use_dma
> > case.
> > 
> > Fixes: 03fbb903c8bf ("i2c: at91: use dma safe buffers")
> > Link: https://github.com/ClangBuiltLinux/linux/issues/1629
> > Signed-off-by: Nathan Chancellor <nathan@...nel.org>
> 
> Applied to for-next, thanks!
> 

Thank you!

Cheers,
Nathan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ