All of lore.kernel.org
 help / color / mirror / Atom feed
* [zen-kernel-zen-kernel:5.7/zen-sauce 2/22] drivers/scsi/vhba/vhba.c:181:8-27: atomic_dec_and_test variation before object free at line 182.
@ 2020-07-26  6:29 kernel test robot
  2020-07-26  6:29 ` [PATCH] ZEN: fix platform_no_drv_owner.cocci warnings kernel test robot
  0 siblings, 1 reply; 6+ messages in thread
From: kernel test robot @ 2020-07-26  6:29 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]

CC: kbuild-all(a)lists.01.org
TO: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>

tree:   https://github.com/zen-kernel/zen-kernel 5.7/zen-sauce
head:   9555af4960645728364e3b2aaae65e6ea7df0062
commit: a9bd5ac696bcd0860a8c32e9e00c9558e68c5854 [2/22] ZEN: Add VHBA driver
:::::: branch date: 8 weeks ago
:::::: commit date: 8 weeks ago
config: powerpc64-randconfig-c024-20200726 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>


coccinelle warnings: (new ones prefixed by >>)

>> drivers/scsi/vhba/vhba.c:181:8-27: atomic_dec_and_test variation before object free at line 182.
--
>> drivers/scsi/vhba/vhba.c:1045:9-14: No need to set .owner here. The core will do it.

Please review and possibly fold the followup patch.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 29826 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] ZEN: fix platform_no_drv_owner.cocci warnings
  2020-07-26  6:29 [zen-kernel-zen-kernel:5.7/zen-sauce 2/22] drivers/scsi/vhba/vhba.c:181:8-27: atomic_dec_and_test variation before object free at line 182 kernel test robot
@ 2020-07-26  6:29 ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2020-07-26  6:29 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]

CC: kbuild-all(a)lists.01.org
TO: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>

From: kernel test robot <lkp@intel.com>

drivers/scsi/vhba/vhba.c:1045:9-14: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Fixes: a9bd5ac696bc ("ZEN: Add VHBA driver")
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://github.com/zen-kernel/zen-kernel 5.7/zen-sauce
head:   9555af4960645728364e3b2aaae65e6ea7df0062
commit: a9bd5ac696bcd0860a8c32e9e00c9558e68c5854 [2/22] ZEN: Add VHBA driver
:::::: branch date: 8 weeks ago
:::::: commit date: 8 weeks ago

 vhba.c |    1 -
 1 file changed, 1 deletion(-)

--- a/drivers/scsi/vhba/vhba.c
+++ b/drivers/scsi/vhba/vhba.c
@@ -1042,7 +1042,6 @@ static struct platform_device vhba_platf
 
 static struct platform_driver vhba_platform_driver = {
     .driver = {
-        .owner = THIS_MODULE,
         .name = "vhba",
     },
     .probe = vhba_probe,

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] ZEN: fix platform_no_drv_owner.cocci warnings
@ 2020-07-26 11:01 Julia Lawall
  0 siblings, 0 replies; 6+ messages in thread
From: Julia Lawall @ 2020-07-26 11:01 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 928 bytes --]

From: kernel test robot <lkp@intel.com>

No need to set .owner here. The core will do it.

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Fixes: a9bd5ac696bc ("ZEN: Add VHBA driver")
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---

tree:   https://github.com/zen-kernel/zen-kernel 5.7/zen-sauce
head:   9555af4960645728364e3b2aaae65e6ea7df0062
commit: a9bd5ac696bcd0860a8c32e9e00c9558e68c5854 [2/22] ZEN: Add VHBA driver
:::::: branch date: 8 weeks ago
:::::: commit date: 8 weeks ago

 vhba.c |    1 -
 1 file changed, 1 deletion(-)

--- a/drivers/scsi/vhba/vhba.c
+++ b/drivers/scsi/vhba/vhba.c
@@ -1042,7 +1042,6 @@ static struct platform_device vhba_platf

 static struct platform_driver vhba_platform_driver = {
     .driver = {
-        .owner = THIS_MODULE,
         .name = "vhba",
     },
     .probe = vhba_probe,

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] ZEN: fix platform_no_drv_owner.cocci warnings
  2020-04-01 20:13 [zen-kernel-zen-kernel:5.6/zen-sauce 2/22] drivers/scsi/vhba/vhba.c:1045:9-14: No need to set .owner here. The core will do it kbuild test robot
@ 2020-04-01 20:13 ` kbuild test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kbuild test robot @ 2020-04-01 20:13 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 915 bytes --]

From: kbuild test robot <lkp@intel.com>

drivers/scsi/vhba/vhba.c:1045:9-14: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Fixes: 571a78afe655 ("ZEN: Add VHBA driver")
Signed-off-by: kbuild test robot <lkp@intel.com>
---

tree:   https://github.com/zen-kernel/zen-kernel 5.6/zen-sauce
head:   d33eeeb62ca70eeba3234089e7bc61ac11e8d351
commit: 571a78afe655a6e606ff127b57f7a01d3bc68614 [2/22] ZEN: Add VHBA driver

 vhba.c |    1 -
 1 file changed, 1 deletion(-)

--- a/drivers/scsi/vhba/vhba.c
+++ b/drivers/scsi/vhba/vhba.c
@@ -1042,7 +1042,6 @@ static struct platform_device vhba_platf
 
 static struct platform_driver vhba_platform_driver = {
     .driver = {
-        .owner = THIS_MODULE,
         .name = "vhba",
     },
     .probe = vhba_probe,

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] ZEN: fix platform_no_drv_owner.cocci warnings
  2019-04-14  5:50 Julia Lawall
@ 2019-04-15  6:31 ` Reshetova, Elena
  0 siblings, 0 replies; 6+ messages in thread
From: Reshetova, Elena @ 2019-04-15  6:31 UTC (permalink / raw)
  To: Julia Lawall, Jan Alexander Steffens (heftig)
  Cc: James E.J. Bottomley, Martin K. Petersen, linux-scsi,
	linux-kernel, kbuild-all


> From: kbuild test robot <lkp@intel.com>
> 
> Remove .owner field if calls are used which set it automatically
> 
> Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
> 
> Fixes: 26e2aa63d568 ("ZEN: Add VHBA driver")
> Signed-off-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
> 
> ---
> 
> There was also a report about:
> 
> drivers/scsi/vhba/vhba.c:184:8-27: atomic_dec_and_test variation before
> object free at line 185.
> 
> that Elena may want to comment on.
> 
>

Yes, on a quick look it seems that you should be using refcount_t type and not
atomic_t for your reference counter, as you use it as classical refcounter, i.e. 
free  the object upon reaching zero, etc:

static void vhba_device_put (struct vhba_device *vdev)
{
    if (atomic_dec_and_test(&vdev->refcnt)) {
        kfree(vdev);
    }
}

Any reason why you didn't use refcount_t type to begin with?

Best Regards,
Elena.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] ZEN: fix platform_no_drv_owner.cocci warnings
@ 2019-04-14  5:50 Julia Lawall
  2019-04-15  6:31 ` Reshetova, Elena
  0 siblings, 1 reply; 6+ messages in thread
From: Julia Lawall @ 2019-04-14  5:50 UTC (permalink / raw)
  To: Jan Alexander Steffens (heftig)
  Cc: James E.J. Bottomley, Martin K. Petersen, linux-scsi,
	linux-kernel, kbuild-all, Elena Reshetova

From: kbuild test robot <lkp@intel.com>

Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Fixes: 26e2aa63d568 ("ZEN: Add VHBA driver")
Signed-off-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>

---

There was also a report about:

drivers/scsi/vhba/vhba.c:184:8-27: atomic_dec_and_test variation before
object free at line 185.

that Elena may want to comment on.


tree:   https://github.com/zen-kernel/zen-kernel 5.0/misc
head:   5fbf87816fba5c14168bf5a8cf2205e072bac88f
commit: 26e2aa63d568ec48e0c062637ed5e3ca44b492e2 [7/18] ZEN: Add VHBA driver
:::::: branch date: 4 hours ago
:::::: commit date: 6 weeks ago

 vhba.c |    1 -
 1 file changed, 1 deletion(-)

--- a/drivers/scsi/vhba/vhba.c
+++ b/drivers/scsi/vhba/vhba.c
@@ -1033,7 +1033,6 @@ static struct platform_device vhba_platf

 static struct platform_driver vhba_platform_driver = {
     .driver = {
-        .owner = THIS_MODULE,
         .name = "vhba",
     },
     .probe = vhba_probe,

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-07-26 11:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-26  6:29 [zen-kernel-zen-kernel:5.7/zen-sauce 2/22] drivers/scsi/vhba/vhba.c:181:8-27: atomic_dec_and_test variation before object free at line 182 kernel test robot
2020-07-26  6:29 ` [PATCH] ZEN: fix platform_no_drv_owner.cocci warnings kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-07-26 11:01 Julia Lawall
2020-04-01 20:13 [zen-kernel-zen-kernel:5.6/zen-sauce 2/22] drivers/scsi/vhba/vhba.c:1045:9-14: No need to set .owner here. The core will do it kbuild test robot
2020-04-01 20:13 ` [PATCH] ZEN: fix platform_no_drv_owner.cocci warnings kbuild test robot
2019-04-14  5:50 Julia Lawall
2019-04-15  6:31 ` Reshetova, Elena

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.