Skip to contentSkip to conversation

zfcp: trace on request for open and close of WKA port

bug report Dan Carpenter 1 participant 1 message Feb 7, 2017 1 message not in the archive s390

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Same thing for zfcp_fsf_close_wka_port() as well.

regards,
dan carpenter

Quoted 29 lines · Dan Carpenter

Hello Steffen Maier,

The patch d27a7cb91960: "zfcp: trace on request for open and close of WKA port" from Aug 10, 2016, leads to the following static checker warning:

	drivers/s390/scsi/zfcp_fsf.c:1615 zfcp_fsf_open_wka_port()
	warn: 'req' was already freed.

drivers/s390/scsi/zfcp_fsf.c

  1609          zfcp_fsf_start_timer(req, ZFCP_FSF_REQUEST_TIMEOUT);
  1610          retval = zfcp_fsf_req_send(req);
  1611          if (retval)
  1612                  zfcp_fsf_req_free(req);
                                          ^^^

Freed.

1613 out:
1614 spin_unlock_irq(&qdio->req_q_lock);
1615 if (req && !IS_ERR(req))

  1616                  zfcp_dbf_rec_run_wka("fsowp_1", wka_port, req->req_id);
                                                                  ^^^^^^^^^^^

Use after free.

1617 return retval;
1618 }

regards,
dan carpenter