Skip to content
Snippets Groups Projects
  1. Jul 13, 2018
    • Guillaume Nault's avatar
      BACKPORT: l2tp: fix duplicate session creation · 768347b3
      Guillaume Nault authored
      
      l2tp_session_create() relies on its caller for checking for duplicate
      sessions. This is racy since a session can be concurrently inserted
      after the caller's verification.
      
      Fix this by letting l2tp_session_create() verify sessions uniqueness
      upon insertion. Callers need to be adapted to check for
      l2tp_session_create()'s return code instead of calling
      l2tp_session_find().
      
      pppol2tp_connect() is a bit special because it has to work on existing
      sessions (if they're not connected) or to create a new session if none
      is found. When acting on a preexisting session, a reference must be
      held or it could go away on us. So we have to use l2tp_session_get()
      instead of l2tp_session_find() and drop the reference before exiting.
      
      Change-Id: I650f6ea597bef06a429f41e0f533c8d4fab5e325
      Fixes: d9e31d17 ("l2tp: Add L2TP ethernet pseudowire support")
      Fixes: fd558d18 ("l2tp: Split pppol2tp patch into separate l2tp and ppp parts")
      Signed-off-by: default avatarGuillaume Nault <g.nault@alphalink.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Bug: 38159931
      768347b3
    • Guillaume Nault's avatar
      BACKPORT: l2tp: fix race in l2tp_recv_common() · ebc602ec
      Guillaume Nault authored
      
      Taking a reference on sessions in l2tp_recv_common() is racy; this
      has to be done by the callers.
      
      To this end, a new function is required (l2tp_session_get()) to
      atomically lookup a session and take a reference on it. Callers then
      have to manually drop this reference.
      
      Change-Id: Ib48214a90805c6fa20229fdb37a9d3cbeb2aef3a
      Fixes: fd558d18 ("l2tp: Split pppol2tp patch into separate l2tp and ppp parts")
      Signed-off-by: default avatarGuillaume Nault <g.nault@alphalink.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Bug: 38159931
      ebc602ec
  2. Jun 29, 2018
  3. Jun 12, 2018
    • Wei Wang's avatar
      scsi: ufs: call single_release to avoid memory leak · a7654255
      Wei Wang authored
      
      Bug: 110044919
      Test: Build
      Change-Id: I9fa83b84cf52a54c24405f2416f8747a20901d3f
      Signed-off-by: default avatarWei Wang <wvw@google.com>
      3 tags
      a7654255
    • Wei Wang's avatar
      kernel: initialize and free cpufreq stats properly · 4c57f62a
      Wei Wang authored
      
      Initialize task's cpufreq to NULL including for idle
      Make sure free task's cpufreq when free task struct
      
      Bug: 110044919
      Change-Id: Ie4629d0ebe3ef4b72dffea3ee613b15f40a57142
      Signed-off-by: default avatarWei Wang <wvw@google.com>
      4c57f62a
    • Sultan Alsawaf's avatar
      kernel: Fix massive cpufreq stats memory leaks · 64e5c5db
      Sultan Alsawaf authored
      
      Every time _cpu_up() is called for a CPU, idle_thread_get() is called which
      then re-initializes a CPU's idle thread that was already previously created
      and cached in a global variable in smpboot.c. idle_thread_get() calls
      init_idle() which then calls __sched_fork(). __sched_fork() is where
      cpufreq_task_stats_init() is, and cpufreq_task_stats_init() allocates
      512 bytes of memory to a pointer in the task struct.
      
      Since idle_thread_get() reuses a task struct instance that was already
      previously created, this means that every time it calls init_idle(),
      cpufreq_task_stats_init() allocates 512 bytes again and overwrites the
      existing 512-byte allocation that the idle thread already had.
      
      This causes 512 bytes to be leaked every time a CPU is onlined. This is
      significant when non-boot CPUs are enabled during resume from suspend; this
      means that (NR_CPUS - 1) * 512 bytes are leaked every time the device exits
      suspend (this turned out to be ~500 kiB leaked in 20 minutes with the
      device left on a desk with the screen off).
      
      In order to fix this, don't initialize cpufreq stats at all for the idle
      threads. The cpufreq stats interface is intended to be used for tracking
      userspace tasks, so we can safely remove it from the kernel's idle threads
      without killing any functionality.
      
      Bug: 110044919
      Change-Id: I12fe7611fc88eb7f6c39f8f7629ad27b6ec4722c
      Signed-off-by: default avatarSultan Alsawaf <sultanxda@gmail.com>
      64e5c5db
  4. Jun 07, 2018
  5. Jun 06, 2018
  6. Jun 05, 2018
  7. Jun 01, 2018
    • TeYuan Wang's avatar
      arm64/configs: Remove LIMITS_LITE_HW config · f5b04bed
      TeYuan Wang authored
      
      Suspect device may have posibility to be blocked by lmh_read when resume,
      and we do not need to get the details about sensors which supported by LMH Lite,
      so remove lmh lite driver to avoid resume hang risk.
      
      Bug: 80022235
      Test: Thermal-engine work properly
      
      Change-Id: I8d7052246aa9f2c8669132931dc91893c43d30cd
      Signed-off-by: default avatarTeYuan Wang <kamewang@google.com>
      f5b04bed
  8. May 31, 2018
  9. May 23, 2018
  10. May 22, 2018
  11. May 21, 2018
    • Badhri Jagan Sridharan's avatar
      tcpm: Ignore CC and vbus changes in PORT_RESET change · ee0d2b4a
      Badhri Jagan Sridharan authored
      
      After PORT_RESET, the port is set to the appropriate
      default_state. Ignore processing CC changes here as this
      could cause the port to be switched into sink states
      by default.
      
      [  154.528547] pending state change PORT_RESET -> PORT_RESET_WAIT_OFF @ 100 ms
      [  154.528560] CC1: 0 -> 0, CC2: 3 -> 0 [state PORT_RESET, polarity 0, disconnected]
      [  154.528564] state change PORT_RESET -> SNK_UNATTACHED
      
      Bug: 79846307
      Change-Id: I7f45c4975b12512c547e6fd1fb46e53230ed5703
      Signed-off-by: default avatarBadhri Jagan Sridharan <badhri@google.com>
      ee0d2b4a
  12. May 18, 2018
Loading