source: G95xF DSH5
authorMichael Benedict <michaelbt@live.com>
Fri, 30 Aug 2019 14:15:15 +0000 (00:15 +1000)
committerivanmeler <i_ivan@windowslive.com>
Wed, 13 Apr 2022 21:13:29 +0000 (21:13 +0000)
Signed-off-by: Michael Benedict <michaelbt@live.com>
drivers/gpu/arm/b_r16p0/mali_kbase_mem.c
drivers/media/usb/uvc/uvc_driver.c
drivers/usb/gadget/function/f_acm.c

index e813fc671a06f062a20d8c0a279a2837c734724b..ee6c2977c079596090a5d586e7a91b0af13377b6 100644 (file)
@@ -1425,6 +1425,14 @@ static int kbase_do_syncset(struct kbase_context *kctx,
        kbase_os_mem_map_lock(kctx);
        kbase_gpu_vm_lock(kctx);
 
+  /* MALI_SEC_INTEGRATION */
+#if defined (CONFIG_SOC_EXYNOS8895)
+  if (sset->size > 8*1024*1024) {
+       flush_all_cpu_caches();
+       goto out_unlock;
+  }
+#endif
+
        /* find the region where the virtual address is contained */
        reg = kbase_region_tracker_find_region_enclosing_address(kctx,
                        sset->mem_handle.basep.handle);
index 885f689ac870e58d65632329df6593bbdb6eb2e7..f2e3fdf385cc28dc601ee9f02d87a6c540f84360 100644 (file)
@@ -1019,11 +1019,19 @@ static int uvc_parse_standard_control(struct uvc_device *dev,
                        return -EINVAL;
                }
 
-               /* Make sure the terminal type MSB is not null, otherwise it
-                * could be confused with a unit.
+               /*
+                * Reject invalid terminal types that would cause issues:
+                *
+                * - The high byte must be non-zero, otherwise it would be
+                *   confused with a unit.
+                *
+                * - Bit 15 must be 0, as we use it internally as a terminal
+                *   direction flag.
+                *
+                * Other unknown types are accepted.
                 */
                type = get_unaligned_le16(&buffer[4]);
-               if ((type & 0xff00) == 0) {
+               if ((type & 0x7f00) == 0 || (type & 0x8000) != 0) {
                        uvc_trace(UVC_TRACE_DESCR, "device %d videocontrol "
                                "interface %d INPUT_TERMINAL %d has invalid "
                                "type 0x%04x, skipping\n", udev->devnum,
index 46cc8b26b01a3beb101f438d658e945aa9cc4555..edd387f776400634daa6379a7d16c85645e8c79d 100644 (file)
@@ -546,15 +546,20 @@ static int acm_notify_serial_state(struct f_acm *acm)
 
        spin_lock_irqsave(&acm->lock, flags);
 
-       if (acm->notify_req) {
-               dev_dbg(&cdev->gadget->dev, "acm ttyGS%d serial state %04x\n",
-                       acm->port_num, acm->serial_state);
-               serial_state = cpu_to_le16(acm->serial_state);
-               status = acm_cdc_notify(acm, USB_CDC_NOTIFY_SERIAL_STATE,
+       if (acm->notify->enabled) {
+               if (acm->notify_req) {
+                       dev_dbg(&cdev->gadget->dev, "acm ttyGS%d serial state %04x\n",
+                               acm->port_num, acm->serial_state);
+                       serial_state = cpu_to_le16(acm->serial_state);
+                       status = acm_cdc_notify(acm, USB_CDC_NOTIFY_SERIAL_STATE,
                                0, &serial_state, sizeof(acm->serial_state));
+               } else {
+                       acm->pending = true;
+                       status = 0;
+               }
        } else {
-               acm->pending = true;
-               status = 0;
+               status = -EAGAIN;
+               printk(KERN_DEBUG "usb: %s acm function already disabled\n", __func__);
        }
        spin_unlock_irqrestore(&acm->lock, flags);
        return status;
@@ -582,9 +587,9 @@ static void acm_cdc_notify_complete(struct usb_ep *ep, struct usb_request *req)
 #ifdef CONFIG_USB_DUN_SUPPORT
 int acm_notify(void *dev, u16 state)
 {
-       struct f_acm    *acm;
-       if (dev) {
-               acm = (struct f_acm *)dev;
+       struct f_acm    *acm = (struct f_acm *)dev;
+
+       if (acm && acm->notify->enabled) {
                acm->serial_state = state;
                acm_notify_serial_state(acm);
        } else {