Re: [PATCH] scsi: lpfc: Fix improper handling of refcount in lpfc_bsg_hba_set_event()

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

 



Hi Qiu-ji,

This patch does not look logically correct.  if (&evt->node ==
&phba->ct_ev_waiters) evaluates to true, then it is not possible that
(evt->reg_id == event_req->ev_reg_id) is also true.

Because if (evt->reg_id == event_req->ev_reg_id) evaluates to true, it
means we have found an lpfc_bsg_event of event_req specified interest
and therefore (&evt->node != &phba->ct_ev_waiters) must be true.

Also, following this suggested patch’s logic, if after attempting to
go through the phba->ct_ev_waiters list and the evt->node iterator is
pointing at exactly the phba->ct_ev_waiters head, then this patch’s
kref_put will be for the phba->ct_ev_waiters head which is not a
preallocated lpfc_bsg_event object.  So, this patch would be calling
kref_put on an uninitialized memory region.

Sorry, I cannot acknowledge this patch.

Regards,
Justin





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux