The networking rules upstreamed in 4.17 have a deliberate abi break
with the older 2.x network rules.
This patch provides compatibility with the older rules for those
still using an apparmor 2.x userspace and still want network rules
to work on a newer kernel.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Currently there is a chance that release for the fence was already called
before we call dma_fence_get during kgsl_timeline_signal and
kgsl_ioctl_timeline_destroy. This can cause use-after-free issue as we can
access fence after release. Fix this by signalling fence only if the last
refcount on the fence was not yet put. This makes sure that release for the
fence will not be called until we are done signalling.
Change-Id: I6bdcefa1f128febb7a0f7aef133757268a3b9ae3
Signed-off-by: Puranam V G Tejaswi <pvgtejas@codeaurora.org>
Signed-off-by: Pranav Patel <quic_pranavp@quicinc.com>
When uvc_gadget application tries to call ioctl to send response for
usb control request, it might call compat_ioctl on platforms having
32bit userspace and 64bit kernel space. This leads to UVC functionality
failure as v4l2_compat_ioctl32() is checking only for ioctl type as "V"
and returning error for usb ioctl of type "U". Hence fix the issue by
adding check for ioctl type of "U" as well and allow calling corresponding
ioctl callback.
CRs-Fixed: 3081837
Change-Id: Ie7ae67a796a8af5ea4a80fd437943b0f3d3b2afe
Signed-off-by: Zhou Guo <zhouguo@codeaurora.org>
Added flag to indicate memory used
in process initialization. And, this memory
would not removed in internal unmap to avoid
UAF or double free.
Change-Id: Ie470fe58ac334421d186feb41fa67bd24bb5efea
Signed-off-by: prabha <prabha@codeaurora.org>
Do a final check for firmware assert before powering off device
in calibration mode. Collect RAM dump if firmware has asserted
for debug purpose. Also skip dump collection if device is already
powered off.
Change-Id: I99a438d6b7d7048b300244511c72d6fbfc610094
Signed-off-by: Yue Ma <yuem@codeaurora.org>
Signed-off-by: Madhvapathi Sriram <quic_msriram@quicinc.com>
Display tearing functionality on SXR devices makes use of
both bulk-in and bulk-out endpoints of cdev driver
to acquire real time audio/video data from usb host.
Currently if the userspace application making use of cdev
driver requests 50KB of data from host, the cdev_read function
queues multiple usb requests to host till it gets 50KB of data.
In Display Tearing, although the userspace application requests
50KB of data per frame, the actual amount sent by host for every
frame is variable and can be less than the requested amount. If
host is sending packets of size less that requested amount per frame,
driver ends up appending multiple frames in a single cdev_read call
and returns corrupt information to userspace causing low frame
rate on display.
To resolve this add a configfs property to specify the buffer size
for every usb request on out ep and a flag to specify if we need
single packet mode. If single packet mode is enabled, only one usb
request is queued on out endpoint per cdev_read call and buffer
corresponding to that request contains only one frame of data coming
from host. The driver appends data from one usb request in read_queued
pool to userspace buffer to avoid corrupting video frame information.
CRs-Fixed: 3038067
Change-Id: I1ba0b954d14f187eeddc511f4ac199784248b33b
Signed-off-by: Ligui Deng <ldeng@codeaurora.org>
Below two issues are handled in this change.
1.Use radix_tree_iter_delete instead of radix_tree_delete to properly
remove slots in a radix tree without any dangling references.
2.Flow entry can be deleted when sending process waiting on the queue
if remote socket closes.Which leads to accessing non-valid flow entry.
To resolve this lookup for the tx flow entry each time before reading
flow count or inserting caller process to waiting list to check the
validity of flow entry in the radix tree.
Change-Id: I42b85b53cfcf5cd4256fbd6cb445d0098078a6f0
Signed-off-by: Arun Prakash <app@codeaurora.org>
Assign NULL to pointers that may be used later
after calling kfree on them.
Change-Id: I3298eb484c92ee2373f0bc41aae8ae45fb373cf0
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
Flow control cleanup of remote socket is not happening in
case of DEL proc which will cause flow control hit for that
remote socket once the proc is active again.
Cleanup flow control on the reception of DEL proc command.
Change-Id: I9cbaa121d7ca39a887b423ee274652dccaba8a38
Signed-off-by: Arun Prakash <app@codeaurora.org>
USB_QDSS_DATA_WRITE_DONE event should be handle in
usb_notifier(), even if drvdata->open != ENABLE.
Change-Id: I7c7e106f03cf819117abfed67f2095e59d90004d
Signed-off-by: Yuanfang Zhang <quic_yuanfang@quicinc.com>
In case of Q6 SSR for MSM+MDM target flow control cleanup is
not happening for the remote socket on MSM which might cause
flow control hit for that remote socket.
Cleanup flow control for each deleted remote server or client.
Change-Id: Ieaff0d6bb2605e9db54f93dd199dd481420067af
Signed-off-by: Arun Prakash <app@codeaurora.org>
Add support to update torch current for all torch devices under
a switch if switch has already been enabled, without requiring
disablement of switch before updating new value.
Change-Id: I51e8d5701395fa095e3623cba0d2aaeae7c910ef
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
Converting DEL_PROC control command to BYE command to
cleanup service/client details of MSM.
Change-Id: I08d22d47b092e0124f5e9a58451f1dbcaaf14ed1
Signed-off-by: Arun Prakash <app@codeaurora.org>
Enable config for SPMI TEMP ALARM driver for SPF targets
to be able to read temperature of temp alarm sensor.
Change-Id: If704bf800d79d06f070e63178748ac759af513e2
Signed-off-by: Archana Sriram <apsrir@codeaurora.org>
While resetting the header rules if it finds invalid header ID it
will return before freeing proc header table it was leading to use
after free when accessing the header pointer from proc header table.
Adding changes to NULL terminating header pointer in proc header table
after header table deleted from the list.
Change-Id: If270d855d3907e61368336316161a250053e1e62
Signed-off-by: Jagadeesh Ponduru <jponduru@codeaurora.org>
Consider a scenario when a device which supports auto suspend is
connected to DUT and auto suspend happened. Now, as the device is
disconnected to DUT. Resume_work is called due to extcon notification
of disconnect and then again suspend is expected to schedule. As
a part of disconnect, pwr event irq and DP_HS_PHY_IRQ also got
triggered and now since usb is in lpm, resume work got scheduled
twice. This resume work flushed sm_work which is stuck because
disable_irq call is waiting for pwr_irq call which called resume_work
to complete. This is clearly a circular dependency because
resume work will flush sm_work which is waiting for pwr_irq_thread
to be complete because disable_irq in msm_suspend waits for
pwr_irq_handler to complete.
Solve this by replacing disable_irq api with disable_irq_nosync
so that it doesn't block control suspend.
Below are the sequence of events.
usb is auto suspended with device connected to DUT.
Now device is disconnected from DUT and hence resume
hanppens first and then suspend.
dwc3_resume_work is called due to extcon as a part of
disconnect then suspend will be scheduled.
When dwc3 is still in lpm, i.e dwc3_resume_work did
not take effect yet.
Now power event irq is fired because of which resume
work runs.
This resume work flushes sm work. Which is currently
executing msm_suspend where disable_irq is waiting
for power_irq call to finish which is waiting for
sm_work to finish.
Change-Id: Ibf6e73663d4acaf997291e7eff6577adeaad6e8a
Signed-off-by: Rohith Kollalsi <quic_rkollals@quicinc.com>