Skip to contentSkip to conversation

Patch "[media] cec: update log_addr[] before finishing configuration" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Nov 28, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

    [media] cec: update log_addr[] before finishing configuration

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
cec-update-log_addr-before-finishing-configuration.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Tue Nov 28 10:49:28 CET 2017

From: Hans Verkuil <[email protected]>
Date: Fri, 9 Dec 2016 11:54:06 -0200
Subject: [media] cec: update log_addr[] before finishing configuration

From: Hans Verkuil <[email protected]>

[ Upstream commit 7af26f889eb67db272021a939f7d4a57e96dd961 ]

The loop that sets the unused logical addresses to INVALID should be done before 'configured' is set to true. This ensures that cec_log_addrs is consistent before it will be used.

---
 drivers/staging/media/cec/cec-adap.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/media/cec/cec-adap.c +2 -2
@@ -1062,6 +1062,8 @@ configured:
 		for (i = 1; i < las->num_log_addrs; i++)
 			las->log_addr[i] = CEC_LOG_ADDR_INVALID;
 	}
+	for (i = las->num_log_addrs; i < CEC_MAX_LOG_ADDRS; i++)
+		las->log_addr[i] = CEC_LOG_ADDR_INVALID;
 	adap->is_configured = true;
 	adap->is_configuring = false;
 	cec_post_state_event(adap);
@@ -1079,8 +1081,6 @@ configured:
 			cec_report_features(adap, i);
 		cec_report_phys_addr(adap, i);
 	}
-	for (i = las->num_log_addrs; i < CEC_MAX_LOG_ADDRS; i++)
-		las->log_addr[i] = CEC_LOG_ADDR_INVALID;
 	mutex_lock(&adap->lock);
 	adap->kthread_config = NULL;
 	mutex_unlock(&adap->lock);

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/cec-cec_msg_give_features-should-abort-for-cec-version-2.patch queue-4.9/cec-update-log_addr-before-finishing-configuration.patch queue-4.9/cec-when-canceling-a-message-don-t-overwrite-old-status-info.patch