Improve robustness of the code that restores .queue_pdu()
In my tests I hit a stack overflow caused by infinite recursion of .queue_pdu() calls, caused by .queue_pdu() not being restored in an error path. Make the approach for restoring .queue_pdu() more robust. Signed-off-by: Bart Van Assche <bvanassche@acm.org>
This commit is contained in:
@@ -35,6 +35,8 @@
|
||||
/* globals between setup, tests, and teardown */
|
||||
extern struct scsi_task *task;
|
||||
extern unsigned char *read_write_buf;
|
||||
extern int (*orig_queue_pdu)(struct iscsi_context *iscsi,
|
||||
struct iscsi_pdu *pdu);
|
||||
|
||||
#ifndef HAVE_CU_SUITEINFO_PSETUPFUNC
|
||||
/* libcunit version 1 */
|
||||
|
||||
Reference in New Issue
Block a user