Skip to contentSkip to conversation

mtip32xx: fix crash on surprise removal of the drive

DISCUSSION Dan Carpenter 3 participants 5 messages Jun 20, 2015 – Jun 23, 2015 Kernel janitors

lore
Share & tools
lore
#0 lore raw

Hello Asai Thambi SP,

The patch 2132a544727e: "mtip32xx: fix crash on surprise removal of the drive" from May 11, 2015, leads to the following static checker warning:

	drivers/block/mtip32xx/mtip32xx.c:4489 mtip_pci_remove()
	warn: 'dd' was already freed.

drivers/block/mtip32xx/mtip32xx.c

  4484          spin_lock_irqsave(&dev_lock, flags);
  4485          list_del_init(&dd->remove_list);
  4486          spin_unlock_irqrestore(&dev_lock, flags);
  4487  
  4488          kfree(dd);
                      ^^
  4489          set_bit(MTIP_DDF_REMOVE_DONE_BIT, &dd->dd_flag);
                                                   ^^^^^^^^^^^

4490
4491 pcim_iounmap_regions(pdev, 1 << MTIP_ABAR);
4492 pci_set_drvdata(pdev, NULL);
4493 }

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in

#1 lore raw
Quoted 8 lines · Dan Carpenter

Hello Asai Thambi SP,

The patch 2132a544727e: "mtip32xx: fix crash on surprise removal of the drive" from May 11, 2015, leads to the following static checker warning:

	drivers/block/mtip32xx/mtip32xx.c:4489 mtip_pci_remove()
	warn: 'dd' was already freed.

Thanks Dan.
We got this report as soon as patch was merged. We are testing the fix and if everything ok, will send out a patch today.

Quoted 9 lines

drivers/block/mtip32xx/mtip32xx.c

  4484          spin_lock_irqsave(&dev_lock, flags);
  4485          list_del_init(&dd->remove_list);
  4486          spin_unlock_irqrestore(&dev_lock, flags);
  4487  
  4488          kfree(dd);
                      ^^
  4489          set_bit(MTIP_DDF_REMOVE_DONE_BIT, &dd->dd_flag);
                                                   ^^^^^^^^^^^
Quoted 7 lines

4490
4491 pcim_iounmap_regions(pdev, 1 << MTIP_ABAR);
4492 pci_set_drvdata(pdev, NULL);
4493 }

regards,
dan carpenter

--
Regards,
Asai
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in

#2 lore raw
In reply to Dan Carpenter
Quoted 5 lines · Asai Thambi SP
Quoted 2 lines · Dan Carpenter

Hello Asai Thambi SP,

Quoted 8 lines
Quoted 6 lines

The patch 2132a544727e: "mtip32xx: fix crash on surprise removal of the drive" from May 11, 2015, leads to the following static checker warning:

	drivers/block/mtip32xx/mtip32xx.c:4489 mtip_pci_remove()
	warn: 'dd' was already freed.

Thanks Dan.
We got this report as soon as patch was merged.

I try to avoid sending duplicates. Who sent you the report? I looked through my kbuild zero bot emails and I don't think they sent it to you.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in

#3 lore raw
In reply to Dan Carpenter
Quoted 10 lines · Dan Carpenter
Quoted 9 lines · Asai Thambi SP
Quoted 6 lines · Dan Carpenter

Hello Asai Thambi SP,

The patch 2132a544727e: "mtip32xx: fix crash on surprise removal of the drive" from May 11, 2015, leads to the following static checker warning:

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
	drivers/block/mtip32xx/mtip32xx.c:4489 mtip_pci_remove()
	warn: 'dd' was already freed.

Thanks Dan.
We got this report as soon as patch was merged.

I try to avoid sending duplicates. Who sent you the report? I looked through my kbuild zero bot emails and I don't think they sent it to you.

I probably sent it. My emails to the mailing list are probably all still being rejected.

julia

Quoted 7 lines

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in

#4 lore raw
In reply to Dan Carpenter
Quoted 16 lines · Julia Lawall
Quoted 12 lines · Dan Carpenter
Quoted 11 lines · Asai Thambi SP
Quoted 8 lines · Dan Carpenter

Hello Asai Thambi SP,

The patch 2132a544727e: "mtip32xx: fix crash on surprise removal of the drive" from May 11, 2015, leads to the following static checker warning:

	drivers/block/mtip32xx/mtip32xx.c:4489 mtip_pci_remove()
	warn: 'dd' was already freed.
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines

Thanks Dan.
We got this report as soon as patch was merged.

I try to avoid sending duplicates. Who sent you the report? I looked through my kbuild zero bot emails and I don't think they sent it to you.

I probably sent it. My emails to the mailing list are probably all still being rejected.

Oh yes. That's it. The other thing is that I was swamped in vacation email backlog so I missed the original kbuild email.

To be honest, I don't feel bad about duplicates. If people don't like them, then they should stop introducing bugs! :)

regards,
dan carpenter