]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
SPARC64: UEK4 LDOMS DOMAIN SERVICES UPDATE 7
authorAaron Young <Aaron.Young@oracle.com>
Wed, 18 Jan 2017 14:42:01 +0000 (09:42 -0500)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 9 Mar 2017 03:30:09 +0000 (19:30 -0800)
This update fixes the following issues for LDom domain services on UEK4:

1. Kernel watchdog panic when unbinding guest domains. This panic was
   due to the ds driver accessing a freed data structure out of ds_remove().

2. "no service registered for UNREG_REQ handle" error messages on the console
   when ldmd is restarted.

Signed-off-by: Aaron Young <Aaron.Young@oracle.com>
Reviewed-By: Bijan Mottahedeh <Bijan.Mottahedeh@oracle.com>
Reviewed-By: Liam Merwick <Liam.Merwick@oracle.com>
Orabug: 2540840625366664
Signed-off-by: Allen Pais <allen.pais@oracle.com>
arch/sparc/kernel/ds.c
arch/sparc/kernel/ldc.c

index 1eee3189b1fd31ffd04d37fb76a13d8a0b9a257f..06b5e227639de4e61798283a253d4616bbde78df 100644 (file)
@@ -3400,7 +3400,7 @@ static int ds_handshake_reg(struct ds_dev *ds, struct ds_msg_tag *pkt)
                        if (svc_info == NULL) {
                                /* There is no service */
 
-                               pr_err("ds-%llu: no service registered for "
+                               dprintk3("ds-%llu: no service registered for "
                                    "UNREG_REQ handle %llx\n", ds->id,
                                   unreg_req->payload.handle);
 
@@ -4681,6 +4681,13 @@ static int ds_remove(struct vio_dev *vdev)
 
        ldc_free(ds->lp);
 
+       /*
+        * Since the ds_dev can remain for a while til it's
+        * freed (callout queue), to make sure the lp isn't used,
+        * we set it to NULL here.
+        */
+       ds->lp = NULL;
+
        /* free any entries left on the callout list */
        list_for_each_entry_safe(qhdrp, tmp, &ds->callout_list, list) {
                list_del(&qhdrp->list);
index c0daced1b14ce3624ef18af72179eb28de6322a7..3c90408ea2de44482963a3ffbca0386c3623a63e 100644 (file)
@@ -780,6 +780,9 @@ void ldc_enable_hv_intr(struct ldc_channel *lp)
 {
        unsigned long flags;
 
+       if (!lp)
+               return;
+
        spin_lock_irqsave(&lp->lock, flags);
 
        ldcdbg(RX, "ldc_enable_hv_intr: dh=%llu, ino=%llu\n",
@@ -797,6 +800,9 @@ void ldc_disable_hv_intr(struct ldc_channel *lp)
 {
        unsigned long flags;
 
+       if (!lp)
+               return;
+
        spin_lock_irqsave(&lp->lock, flags);
 
        ldcdbg(RX, "ldc_disable_hv_intr: dh=%llu, ino=%llu\n",