Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 60be6b9a authored by Ingo Molnar's avatar Ingo Molnar Committed by Linus Torvalds
Browse files

[PATCH] lockdep: annotate on-stack completions



lockdep needs to have the waitqueue lock initialized for on-stack waitqueues
implicitly initialized by DECLARE_COMPLETION().  Annotate on-stack completions
accordingly.

Has no effect on non-lockdep kernels.

Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 366c7f55
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -775,6 +775,8 @@ static int __cpuinit do_boot_cpu(int cpu, int apicid)
	};
	};
	DECLARE_WORK(work, do_fork_idle, &c_idle);
	DECLARE_WORK(work, do_fork_idle, &c_idle);


	lockdep_set_class(&c_idle.done.wait.lock, &waitqueue_lock_key);

	/* allocate memory for gdts of secondary cpus. Hotplug is considered */
	/* allocate memory for gdts of secondary cpus. Hotplug is considered */
	if (!cpu_gdt_descr[cpu].address &&
	if (!cpu_gdt_descr[cpu].address &&
		!(cpu_gdt_descr[cpu].address = get_zeroed_page(GFP_KERNEL))) {
		!(cpu_gdt_descr[cpu].address = get_zeroed_page(GFP_KERNEL))) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -2516,7 +2516,7 @@ EXPORT_SYMBOL_GPL(blk_execute_rq_nowait);
int blk_execute_rq(request_queue_t *q, struct gendisk *bd_disk,
int blk_execute_rq(request_queue_t *q, struct gendisk *bd_disk,
		   struct request *rq, int at_head)
		   struct request *rq, int at_head)
{
{
	DECLARE_COMPLETION(wait);
	DECLARE_COMPLETION_ONSTACK(wait);
	char sense[SCSI_SENSE_BUFFERSIZE];
	char sense[SCSI_SENSE_BUFFERSIZE];
	int err = 0;
	int err = 0;


+1 −1
Original line number Original line Diff line number Diff line
@@ -1705,7 +1705,7 @@ int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t actio
{
{
	unsigned long flags;
	unsigned long flags;
	ide_hwgroup_t *hwgroup = HWGROUP(drive);
	ide_hwgroup_t *hwgroup = HWGROUP(drive);
	DECLARE_COMPLETION(wait);
	DECLARE_COMPLETION_ONSTACK(wait);
	int where = ELEVATOR_INSERT_BACK, err;
	int where = ELEVATOR_INSERT_BACK, err;
	int must_wait = (action == ide_wait || action == ide_head_wait);
	int must_wait = (action == ide_wait || action == ide_head_wait);


+1 −1
Original line number Original line Diff line number Diff line
@@ -1001,7 +1001,7 @@ unsigned ata_exec_internal(struct ata_device *dev,
	struct ata_queued_cmd *qc;
	struct ata_queued_cmd *qc;
	unsigned int tag, preempted_tag;
	unsigned int tag, preempted_tag;
	u32 preempted_sactive, preempted_qc_active;
	u32 preempted_sactive, preempted_qc_active;
	DECLARE_COMPLETION(wait);
	DECLARE_COMPLETION_ONSTACK(wait);
	unsigned long flags;
	unsigned long flags;
	unsigned int err_mask;
	unsigned int err_mask;
	int rc;
	int rc;
+1 −1
Original line number Original line Diff line number Diff line
@@ -510,7 +510,7 @@ static void spi_complete(void *arg)
 */
 */
int spi_sync(struct spi_device *spi, struct spi_message *message)
int spi_sync(struct spi_device *spi, struct spi_message *message)
{
{
	DECLARE_COMPLETION(done);
	DECLARE_COMPLETION_ONSTACK(done);
	int status;
	int status;


	message->complete = spi_complete;
	message->complete = spi_complete;
Loading