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] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.22.394.2405121235270.6747@hadrien>
Date: Sun, 12 May 2024 12:36:48 +0200 (CEST)
From: Julia Lawall <julia.lawall@...ia.fr>
To: Kousik Sanagavarapu <five231003@...il.com>
cc: kernel test robot <lkp@...el.com>, Nishanth Menon <nm@...com>, 
    Santosh Shilimkar <ssantosh@...nel.org>, 
    Julia Lawall <julia.lawall@...ia.fr>, llvm@...ts.linux.dev, 
    oe-kbuild-all@...ts.linux.dev, Shuah Khan <skhan@...uxfoundation.org>, 
    Javier Carrasco <javier.carrasco.cruz@...il.com>, 
    linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 2/3] soc: ti: knav_qmss_queue: do device_node auto
 cleanup



On Sun, 12 May 2024, Kousik Sanagavarapu wrote:

> On Sat, May 11, 2024 at 06:12:39PM +0800, kernel test robot wrote:
> > Hi Kousik,
> >
> > kernel test robot noticed the following build errors:
> >
>
> [...]
>
> > All errors (new ones prefixed by >>):
> >
> > >> drivers/soc/ti/knav_qmss_queue.c:1853:3: error: cannot jump from this goto statement to its label
> >                    goto err;
> >                    ^
> >    drivers/soc/ti/knav_qmss_queue.c:1855:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
> >            struct device_node *regions __free(device_node) =
> >                                ^
> >    drivers/soc/ti/knav_qmss_queue.c:1840:3: error: cannot jump from this goto statement to its label
> >                    goto err;
> >                    ^
> >    drivers/soc/ti/knav_qmss_queue.c:1855:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
> >            struct device_node *regions __free(device_node) =
> >                                ^
> >    drivers/soc/ti/knav_qmss_queue.c:1835:3: error: cannot jump from this goto statement to its label
> >                    goto err;
> >                    ^
> >    drivers/soc/ti/knav_qmss_queue.c:1855:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
> >            struct device_node *regions __free(device_node) =
> >                                ^
> >    drivers/soc/ti/knav_qmss_queue.c:1831:3: error: cannot jump from this goto statement to its label
> >                    goto err;
> >                    ^
> >    drivers/soc/ti/knav_qmss_queue.c:1855:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
> >            struct device_node *regions __free(device_node) =
> >                                ^
> >    drivers/soc/ti/knav_qmss_queue.c:1822:4: error: cannot jump from this goto statement to its label
> >                            goto err;
> >                            ^
> >    drivers/soc/ti/knav_qmss_queue.c:1855:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
> >            struct device_node *regions __free(device_node) =
> >                                ^
> >    drivers/soc/ti/knav_qmss_queue.c:1826:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
> >            struct device_node *queue_pools __free(device_node) =
> >                                ^
> >    drivers/soc/ti/knav_qmss_queue.c:1818:4: error: cannot jump from this goto statement to its label
> >                            goto err;
> >                            ^
> >    drivers/soc/ti/knav_qmss_queue.c:1855:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
> >            struct device_node *regions __free(device_node) =
> >                                ^
> >    drivers/soc/ti/knav_qmss_queue.c:1826:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
> >            struct device_node *queue_pools __free(device_node) =
> >                                ^
> >    drivers/soc/ti/knav_qmss_queue.c:1810:3: error: cannot jump from this goto statement to its label
> >                    goto err;
> >                    ^
> >    drivers/soc/ti/knav_qmss_queue.c:1855:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
> >            struct device_node *regions __free(device_node) =
> >                                ^
> >    drivers/soc/ti/knav_qmss_queue.c:1826:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
> >            struct device_node *queue_pools __free(device_node) =
> >                                ^
> >    drivers/soc/ti/knav_qmss_queue.c:1813:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
> >            struct device_node *pdsps __free(device_node) =
> >                                ^
> >    drivers/soc/ti/knav_qmss_queue.c:1806:3: error: cannot jump from this goto statement to its label
> >                    goto err;
> >                    ^
> >    drivers/soc/ti/knav_qmss_queue.c:1855:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
> >            struct device_node *regions __free(device_node) =
> >                                ^
> >    drivers/soc/ti/knav_qmss_queue.c:1826:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
> >            struct device_node *queue_pools __free(device_node) =
> >                                ^
> >    drivers/soc/ti/knav_qmss_queue.c:1813:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
> >            struct device_node *pdsps __free(device_node) =
> >                                ^
> >    drivers/soc/ti/knav_qmss_queue.c:1795:3: error: cannot jump from this goto statement to its label
> >                    goto err;
> >                    ^
> >    drivers/soc/ti/knav_qmss_queue.c:1855:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
> >            struct device_node *regions __free(device_node) =
> >                                ^
> >    drivers/soc/ti/knav_qmss_queue.c:1826:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
> >            struct device_node *queue_pools __free(device_node) =
> >                                ^
> >    drivers/soc/ti/knav_qmss_queue.c:1813:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
> >            struct device_node *pdsps __free(device_node) =
> >                                ^
> >    drivers/soc/ti/knav_qmss_queue.c:1801:22: note: jump bypasses initialization of variable with __attribute__((cleanup))
> >            struct device_node *qmgrs __free(device_node) =
> >                                ^
> >    9 errors generated.
>
> Seems like gcc didn't catch this when I compiled locally.
>
> Normally, this would be fixed if we placed braces around the individual
> initialization blocks, that is, say
>
> 	{
> 		struct device_node *qmgrs __free(device_node) =
> 			of_get_child_by_name(node, "qmgrs");
> 		...
> 	}
>
>
> That would make the code look a lot more dirty though and is purely
> unnecessary.  So I'd say I'd drop this patch and do a v2 with the
> remaining two patches.  Thoughts?
>
> There's also some stuff with classes but that too is not really worth
> doing because the code will end up looking very ugly.

Please include the patch in such a message so that one can see everything
at once.  I'm not sure it's necessary to show all the error messages
either.  Just a few that help illustrate the problem.

julia

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ