lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CH2PR12MB38958D50FDBA94E2127CA993D7AE0@CH2PR12MB3895.namprd12.prod.outlook.com>
Date:   Fri, 8 Jan 2021 23:37:04 +0000
From:   Asmaa Mnebhi <asmaa@...dia.com>
To:     Corey Minyard <minyard@....org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: ipmi_msghandler.c question

Hi Corey,

I have a question for you related to the following function in ipmi_msghandler.c

static void __get_guid(struct ipmi_smi *intf)
{
	int rv;
	struct bmc_device *bmc = intf->bmc;

	bmc->dyn_guid_set = 2;
	intf->null_user_handler = guid_handler;
	rv = send_guid_cmd(intf, 0);
	if (rv)
		/* Send failed, no GUID available. */
		bmc->dyn_guid_set = 0;
	else
		wait_event(intf->waitq, bmc->dyn_guid_set != 2);

	/* dyn_guid_set makes the guid data available. */
	smp_rmb();

	intf->null_user_handler = NULL;
}

Why is wait_event used as opposed to wait_event_timeout? In the context where the dyn_guid_set value doesn't change from 2, this would run forever. Wouldn't we want to timeout after a certain amount of time?

Thanks.
Asmaa

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ