Skip to content
Snippets Groups Projects
  1. Oct 13, 2017
    • Al Viro's avatar
      UPSTREAM: dentry name snapshots · 50cd0bf0
      Al Viro authored
      
      commit: 49d31c2f389acfe83417083e1208422b4091cd9e upstream.
      
      take_dentry_name_snapshot() takes a safe snapshot of dentry name;
      if the name is a short one, it gets copied into caller-supplied
      structure, otherwise an extra reference to external name is grabbed
      (those are never modified).  In either case the pointer to stable
      string is stored into the same structure.
      
      dentry must be held by the caller of take_dentry_name_snapshot(),
      but may be freely dropped afterwards - the snapshot will stay
      until destroyed by release_dentry_name_snapshot().
      
      Intended use:
      	struct name_snapshot s;
      
      	take_dentry_name_snapshot(&s, dentry);
      	...
      	access s.name
      	...
      	release_dentry_name_snapshot(&s);
      
      Replaces fsnotify_oldname_...(), gets used in fsnotify to obtain the name
      to pass down with event.
      
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      Bug: 63689921
      Change-Id: I2909171089500f607152d6dba2607c5d1d1f64b8
      2 tags
      50cd0bf0
    • David Howells's avatar
      UPSTREAM: VFS: Introduce inode-getting helpers for layered/unioned fs environments · d1c2380b
      David Howells authored
      
      [ Upstream commit: 155e35d4daa804582f75acaa2c74ec797a89c615 ]
      
      Introduce some function for getting the inode (and also the dentry) in an
      environment where layered/unioned filesystems are in operation.
      
      The problem is that we have places where we need *both* the union dentry and
      the lower source or workspace inode or dentry available, but we can only have
      a handle on one of them.  Therefore we need to derive the handle to the other
      from that.
      
      The idea is to introduce an extra field in struct dentry that allows the union
      dentry to refer to and pin the lower dentry.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      
      Bug: 63689921
      Change-Id: I5cc015a7e3238dcd1b992d7e19a2361a73364bd4
      d1c2380b
  2. Sep 27, 2017
    • Jerry Zhang's avatar
      ANDROID: usb: gadget: f_mtp: Return error if count is negative · 57ee3aa1
      Jerry Zhang authored
      
      If the user passes in a negative file size in a int64,
      this will compare to be smaller than buffer length,
      and it will get truncated to form a read length that
      is larger than the buffer length.
      
      To fix, return -EINVAL if the count argument is negative,
      so the loop will never happen.
      
      Bug: 37429972
      Test: Test with PoC
      Change-Id: I5d52e38e6fbe2c17eb8c493f9eb81df6cfd780a4
      Signed-off-by: default avatarJerry Zhang <zhangjerry@google.com>
      57ee3aa1
  3. Sep 25, 2017
    • Gwendal Grignou's avatar
      CHROMIUM: cros_ec: Don't call pm_wake for sensor events · dbf989c0
      Gwendal Grignou authored
      
      When interrupted by EC, we normally wake up and interrupt suspend.
      However, when suspending, we should not abort suspend because of sensor
      events: EC sensor stack does not know yet we are suspending, and
      interrupts are send very often.
      
      We are losing significant motion interrupt, but suspending is a short
      window.
      
      BUG=b:25425420
      TEST=Check we are entering suspend.
      
      Change-Id: I60fc031a70535ababe28d62e5dffd548752078a0
      Signed-off-by: default avatarGwendal Grignou <gwendal@chromium.org>
      dbf989c0
    • Adrian Salido's avatar
      Merge changes Iad4f1a09,I79e8929c,I81557024,I6962e334,Icbc3b258, ... into... · b4c787de
      Adrian Salido authored
      Merge changes Iad4f1a09,I79e8929c,I81557024,I6962e334,Icbc3b258, ... into android-chromeos-dragon-3.18
      
      * changes:
        ALSA: timer: Call notifier in the same spinlock
        ALSA: timer: Fix race between stop and interrupt
        ALSA: timer: Fix link corruption due to double start or stop
        ALSA: timer: Code cleanup
        ALSA: timer: Fix race between read and ioctl
        ALSA: timer: Fix race at concurrent reads
        ALSA: timer: Handle disconnection more safely
        ALSA: timer: Fix missing queue indices reset at SNDRV_TIMER_IOCTL_SELECT
        ALSA: timer: Fix leak in events via snd_timer_user_ccallback
        ALSA: timer: Fix wrong instance passed to slave callbacks
      b4c787de
    • Kary Jin's avatar
      CHROMIUM: nouveau: check path_nr before passing it to nvkm_ioctl_path · e37d2a8a
      Kary Jin authored
      
      Check the path_nr before passing it into nvkm_ioctl_path to avoid the
      out-of-bound issue.
      
      Bug: 63851980
      
      Change-Id: Ida06ef6218b914df0794a7431b9679c916988f33
      Signed-off-by: default avatarKary Jin <karyj@nvidia.com>
      e37d2a8a
  4. Sep 21, 2017
  5. Sep 14, 2017
  6. Sep 13, 2017
  7. Sep 12, 2017
  8. Sep 11, 2017
  9. Sep 09, 2017
  10. Sep 08, 2017
  11. Aug 25, 2017
    • Martijn Coenen's avatar
      ANDROID: binder: don't queue async transactions to thread. · 8203231e
      Martijn Coenen authored
      
      This can cause issues with processes using the poll()
      interface:
      
      1) client sends two oneway transactions
      2) the second one gets queued on async_todo
         (because the server didn't handle the first one
          yet)
      3) server returns from poll(), picks up the
         first transaction and does transaction work
      4) server is done with the transaction, sends
         BC_FREE_BUFFER, and the second transaction gets
         moved to thread->todo
      5) libbinder's handlePolledCommands() only handles
         the commands in the current data buffer, so
         doesn't see the new transaction
      6) the server continues running and issues a new
         outgoing transaction. Now, it suddenly finds
         the incoming oneway transaction on its thread
         todo, and returns that to userspace.
      7) userspace does not expect this to happen; it
         may be holding a lock while making the outgoing
         transaction, and if handling the incoming
         transaction requires taking the same lock,
         userspace will deadlock.
      
      By queueing the async transaction to the proc
      workqueue, we make sure it's only picked up when
      a thread is ready for proc work.
      
      Bug: 38201220
      Bug: 63075553
      Bug: 63079216
      
      Change-Id: I84268cc112f735d7e3173793873dfdb4b268468b
      Signed-off-by: default avatarMartijn Coenen <maco@android.com>
      8203231e
    • Colin Cross's avatar
      Add BINDER_GET_NODE_DEBUG_INFO ioctl · d070d247
      Colin Cross authored
      
      The BINDER_GET_NODE_DEBUG_INFO ioctl will return debug info on
      a node.  Each successive call reusing the previous return value
      will return the next node.  The data will be used by
      libmemunreachable to mark the pointers with kernel references
      as reachable.
      
      Bug: 28275695
      Change-Id: Idbbafa648a33822dc023862cd92b51a595cf7c1c
      Signed-off-by: default avatarColin Cross <ccross@android.com>
      d070d247
  12. Aug 24, 2017
  13. Aug 21, 2017
    • Herbert Xu's avatar
      UPSTREAM: af_key: Fix sadb_x_ipsecrequest parsing · 60788f0b
      Herbert Xu authored
      
      (cherry picked from commit 096f41d3a8fcbb8dde7f71379b1ca85fe213eded)
      
      The parsing of sadb_x_ipsecrequest is broken in a number of ways.
      First of all we're not verifying sadb_x_ipsecrequest_len.  This
      is needed when the structure carries addresses at the end.  Worse
      we don't even look at the length when we parse those optional
      addresses.
      
      The migration code had similar parsing code that's better but
      it also has some deficiencies.  The length is overcounted first
      of all as it includes the header itself.  It also fails to check
      the length before dereferencing the sa_family field.
      
      This patch fixes those problems in parse_sockaddr_pair and then
      uses it in parse_ipsecrequest.
      
      Reported-by: default avatarAndrey Konovalov <andreyknvl@google.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      Bug: 63963140
      Change-Id: Ie8854131293bc8153bfb8cb255161ec8f03667f9
      60788f0b
  14. Aug 17, 2017
Loading