1. 29 8月, 2017 2 次提交
  2. 26 8月, 2017 9 次提交
  3. 25 8月, 2017 7 次提交
    • B
      mtd: nand: atmel: Relax tADL_min constraint · be3e83e3
      Boris Brezillon 提交于
      Version 4 of the ONFI spec mandates that tADL be at least 400 nanoseconds,
      but, depending on the master clock rate, 400 ns may not fit in the tADL
      field of the SMC reg. We need to relax the check and accept the -ERANGE
      return code.
      
      Note that previous versions of the ONFI spec had a lower tADL_min (100 or
      200 ns). It's not clear why this timing constraint got increased but it
      seems most NANDs are fine with values lower than 400ns, so we should be
      safe.
      
      Fixes: f9ce2edd ("mtd: nand: atmel: Add ->setup_data_interface() hooks")
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      Tested-by: NQuentin Schulz <quentin.schulz@free-electrons.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      be3e83e3
    • U
      mtd: nandsim: remove debugfs entries in error path · b974696d
      Uwe Kleine-König 提交于
      The debugfs entries must be removed before an error is returned in the
      probe function. Otherwise another try to load the module fails and when
      the debugfs files are accessed without the module loaded, the kernel
      still tries to call a function in that module.
      
      Fixes: 5346c27c ("mtd: nandsim: Introduce debugfs infrastructure")
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Reviewed-by: NRichard Weinberger <richard@nod.at>
      Acked-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      b974696d
    • M
      Input: ALPS - fix two-finger scroll breakage in right side on ALPS touchpad · 4a646580
      Masaki Ota 提交于
      Fixed the issue that two finger scroll does not work correctly
      on V8 protocol. The cause is that V8 protocol X-coordinate decode
      is wrong at SS4 PLUS device. I added SS4 PLUS X decode definition.
      
      Mote notes:
      the problem manifests itself by the commit e7348396 ("Input: ALPS
      - fix V8+ protocol handling (73 03 28)"), where a fix for the V8+
      protocol was applied.  Although the culprit must have been present
      beforehand, the two-finger scroll worked casually even with the
      wrongly reported values by some reason.  It got broken by the commit
      above just because it changed x_max value, and this made libinput
      correctly figuring the MT events.  Since the X coord is reported as
      falsely doubled, the events on the right-half side go outside the
      boundary, thus they are no longer handled.  This resulted as a broken
      two-finger scroll.
      
      One finger event is decoded differently, and it didn't suffer from
      this problem.  The problem was only about MT events. --tiwai
      
      Fixes: e7348396 ("Input: ALPS - fix V8+ protocol handling (73 03 28)")
      Signed-off-by: NMasaki Ota <masaki.ota@jp.alps.com>
      Tested-by: NTakashi Iwai <tiwai@suse.de>
      Tested-by: NPaul Donohue <linux-kernel@PaulSD.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      4a646580
    • E
      pty: Repair TIOCGPTPEER · 311fc65c
      Eric W. Biederman 提交于
      The implementation of TIOCGPTPEER has two issues.
      
      When /dev/ptmx (as opposed to /dev/pts/ptmx) is opened the wrong
      vfsmount is passed to dentry_open.  Which results in the kernel displaying
      the wrong pathname for the peer.
      
      The second is simply by caching the vfsmount and dentry of the peer it leaves
      them open, in a way they were not previously Which because of the inreased
      reference counts can cause unnecessary behaviour differences resulting in
      regressions.
      
      To fix these move the ioctl into tty_io.c at a generic level allowing
      the ioctl to have access to the struct file on which the ioctl is
      being called.  This allows the path of the slave to be derived when
      opening the slave through TIOCGPTPEER instead of requiring the path to
      the slave be cached.  Thus removing the need for caching the path.
      
      A new function devpts_ptmx_path is factored out of devpts_acquire and
      used to implement a function devpts_mntget.   The new function devpts_mntget
      takes a filp to perform the lookup on and fsi so that it can confirm
      that the superblock that is found by devpts_ptmx_path is the proper superblock.
      
      v2: Lots of fixes to make the code actually work
      v3: Suggestions by Linus
          - Removed the unnecessary initialization of filp in ptm_open_peer
          - Simplified devpts_ptmx_path as gotos are no longer required
      
      [ This is the fix for the issue that was reverted in commit
        143c97cc, but this time without breaking 'pbuilder' due to
        increased reference counts   - Linus ]
      
      Fixes: 54ebbfb1 ("tty: add TIOCGPTPEER ioctl")
      Reported-by: NChristian Brauner <christian.brauner@canonical.com>
      Reported-and-tested-by: NStefan Lippers-Hollmann <s.l-h@gmx.de>
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      311fc65c
    • M
      IB/mlx5: Always return success for RoCE modify port · ec255879
      Majd Dibbiny 提交于
      CM layer calls ib_modify_port() regardless of the link layer.
      
      For the Ethernet ports, qkey violation and Port capabilities
      are meaningless. Therefore, always return success for ib_modify_port
      calls on the Ethernet ports.
      
      Cc: Selvin Xavier <selvin.xavier@broadcom.com>
      Signed-off-by: NMajd Dibbiny <majd@mellanox.com>
      Reviewed-by: NMoni Shoua <monis@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      ec255879
    • M
      IB/mlx5: Fix Raw Packet QP event handler assignment · 1d31e9c0
      Majd Dibbiny 提交于
      In case we have SQ and RQ for Raw Packet QP, the SQ's event handler
      wasn't assigned.
      
      Fixing this by assigning event handler for each WQ after creation.
      
      [ 1877.145243] Call Trace:
      [ 1877.148644] <IRQ>
      [ 1877.150580] [<ffffffffa07987c5>] ? mlx5_rsc_event+0x105/0x210 [mlx5_core]
      [ 1877.159581] [<ffffffffa0795bd7>] ? mlx5_cq_event+0x57/0xd0 [mlx5_core]
      [ 1877.167137] [<ffffffffa079208e>] mlx5_eq_int+0x53e/0x6c0 [mlx5_core]
      [ 1877.174526] [<ffffffff8101a679>] ? sched_clock+0x9/0x10
      [ 1877.180753] [<ffffffff810f717e>] handle_irq_event_percpu+0x3e/0x1e0
      [ 1877.188014] [<ffffffff810f735d>] handle_irq_event+0x3d/0x60
      [ 1877.194567] [<ffffffff810f9fe7>] handle_edge_irq+0x77/0x130
      [ 1877.201129] [<ffffffff81014c3f>] handle_irq+0xbf/0x150
      [ 1877.207244] [<ffffffff815ed78a>] ? atomic_notifier_call_chain+0x1a/0x20
      [ 1877.214829] [<ffffffff815f434f>] do_IRQ+0x4f/0xf0
      [ 1877.220498] [<ffffffff815e94ad>] common_interrupt+0x6d/0x6d
      [ 1877.227025] <EOI>
      [ 1877.228967] [<ffffffff814834e2>] ? cpuidle_enter_state+0x52/0xc0
      [ 1877.236990] [<ffffffff81483615>] cpuidle_idle_call+0xc5/0x200
      [ 1877.243676] [<ffffffff8101bc7e>] arch_cpu_idle+0xe/0x30
      [ 1877.249831] [<ffffffff810b4725>] cpu_startup_entry+0xf5/0x290
      [ 1877.256513] [<ffffffff815cfee1>] start_secondary+0x265/0x27b
      [ 1877.263111] Code: Bad RIP value.
      [ 1877.267296] RIP [< (null)>] (null)
      [ 1877.273264] RSP <ffff88046fd63df8>
      [ 1877.277531] CR2: 0000000000000000
      
      Fixes: 19098df2 ("IB/mlx5: Refactor mlx5_ib_qp to accommodate other QP types")
      Signed-off-by: NMajd Dibbiny <majd@mellanox.com>
      Reviewed-by: NYishai Hadas <yishaih@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      1d31e9c0
    • N
      IB/core: Avoid accessing non-allocated memory when inferring port type · 498ca3c8
      Noa Osherovich 提交于
      Commit 44c58487 ("IB/core: Define 'ib' and 'roce' rdma_ah_attr types")
      introduced the concept of type in ah_attr:
       * During ib_register_device, each port is checked for its type which
         is stored in ib_device's port_immutable array.
       * During uverbs' modify_qp, the type is inferred using the port number
         in ib_uverbs_qp_dest struct (address vector) by accessing the
         relevant port_immutable array and the type is passed on to
         providers.
      
      IB spec (version 1.3) enforces a valid port value only in Reset to
      Init. During Init to RTR, the address vector must be valid but port
      number is not mentioned as a field in the address vector, so its
      value is not validated, which leads to accesses to a non-allocated
      memory when inferring the port type.
      
      Save the real port number in ib_qp during modify to Init (when the
      comp_mask indicates that the port number is valid) and use this value
      to infer the port type.
      
      Avoid copying the address vector fields if the matching bit is not set
      in the attr_mask. Address vector can't be modified before the port, so
      no valid flow is affected.
      
      Fixes: 44c58487 ('IB/core: Define 'ib' and 'roce' rdma_ah_attr types')
      Signed-off-by: NNoa Osherovich <noaos@mellanox.com>
      Reviewed-by: NYishai Hadas <yishaih@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      498ca3c8
  4. 24 8月, 2017 8 次提交
    • L
      Revert "pty: fix the cached path of the pty slave file descriptor in the master" · 143c97cc
      Linus Torvalds 提交于
      This reverts commit c8c03f18.
      
      It turns out that while fixing the ptmx file descriptor to have the
      correct 'struct path' to the associated slave pty is a really good
      thing, it breaks some user space tools for a very annoying reason.
      
      The problem is that /dev/ptmx and its associated slave pty (/dev/pts/X)
      are on different mounts.  That was what caused us to have the wrong path
      in the first place (we would mix up the vfsmount of the 'ptmx' node,
      with the dentry of the pty slave node), but it also means that now while
      we use the right vfsmount, having the pty master open also keeps the pts
      mount busy.
      
      And it turn sout that that makes 'pbuilder' very unhappy, as noted by
      Stefan Lippers-Hollmann:
      
       "This patch introduces a regression for me when using pbuilder
        0.228.7[2] (a helper to build Debian packages in a chroot and to
        create and update its chroots) when trying to umount /dev/ptmx (inside
        the chroot) on Debian/ unstable (full log and pbuilder configuration
        file[3] attached).
      
        [...]
        Setting up build-essential (12.3) ...
        Processing triggers for libc-bin (2.24-15) ...
        I: unmounting dev/ptmx filesystem
        W: Could not unmount dev/ptmx: umount: /var/cache/pbuilder/build/1340/dev/ptmx: target is busy
                (In some cases useful info about processes that
                 use the device is found by lsof(8) or fuser(1).)"
      
      apparently pbuilder tries to unmount the /dev/pts filesystem while still
      holding at least one master node open, which is arguably not very nice,
      but we don't break user space even when fixing other bugs.
      
      So this commit has to be reverted.
      
      I'll try to figure out a way to avoid caching the path to the slave pty
      in the master pty.  The only thing that actually wants that slave pty
      path is the "TIOCGPTPEER" ioctl, and I think we could just recreate the
      path at that time.
      Reported-by: NStefan Lippers-Hollmann <s.l-h@gmx.de>
      Cc: Eric W Biederman <ebiederm@xmission.com>
      Cc: Christian Brauner <christian.brauner@canonical.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      143c97cc
    • O
      Revert "loop: support 4k physical blocksize" · 1e6ec9ea
      Omar Sandoval 提交于
      There's some stuff still up in the air, let's not get stuck with a
      subpar ABI. I'll follow up with something better for 4.14.
      Signed-off-by: NOmar Sandoval <osandov@fb.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      1e6ec9ea
    • C
      block: replace bi_bdev with a gendisk pointer and partitions index · 74d46992
      Christoph Hellwig 提交于
      This way we don't need a block_device structure to submit I/O.  The
      block_device has different life time rules from the gendisk and
      request_queue and is usually only available when the block device node
      is open.  Other callers need to explicitly create one (e.g. the lightnvm
      passthrough code, or the new nvme multipathing code).
      
      For the actual I/O path all that we need is the gendisk, which exists
      once per block device.  But given that the block layer also does
      partition remapping we additionally need a partition index, which is
      used for said remapping in generic_make_request.
      
      Note that all the block drivers generally want request_queue or
      sometimes the gendisk, so this removes a layer of indirection all
      over the stack.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      74d46992
    • C
      raid5: remove a call to get_start_sect · 10433d04
      Christoph Hellwig 提交于
      The block layer always remaps partitions before calling into the
      ->make_request methods of drivers.  Thus the call to get_start_sect in
      in_chunk_boundary will always return 0 and can be removed.
      Reviewed-by: NShaohua Li <shli@fb.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      10433d04
    • B
      skd: Change default interrupt mode to MSI-X · 744353b6
      Bart Van Assche 提交于
      Since MSI support on some motherboards is unreliable, change the
      default interrupt mode from MSI to MSI-X. This patch avoids that
      the following message appears sporadially in the kernel logs of
      my test setup:
      
      do_IRQ: 3.193 No irq handler for vector
      Signed-off-by: NBart Van Assche <bart.vanassche@wdc.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Johannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      744353b6
    • B
      skd: Avoid double completions in case of a timeout · f2fe4459
      Bart Van Assche 提交于
      Avoid that normal request completion and the timeout handler can
      run concurrently by calling blk_mq_complete_request() instead of
      blk_mq_end_request() from skd_end_request(). Avoid that the block
      layer can reuse a request while the firmware is still processing
      it. Convert skd_softirq_done() to blk-mq. Pass the pointer to
      skd_softirq_done() to the block layer core through
      blk_mq_ops.complete instead of by calling blk_queue_softirq_done().
      Pass the pointer to skd_timed_out() to the block layer core
      through blk_mq_ops.timeout instead of by calling
      blk_queue_timed_out(). The timeout handler has been tested as
      follows:
      
          echo 1 > /sys/block/skd0/io-timeout-fail &&
          (cd /sys/kernel/debug/fail_io_timeout &&
            echo 100 > probability &&
            echo N > task-filter &&
            echo 1 > times)
      
      Fixes: commit a74d5b76 ("skd: Switch to block layer timeout mechanism")
      Reported-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NBart Van Assche <bart.vanassche@wdc.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Johannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      f2fe4459
    • B
      skd: Inline skd_process_request() · c39c6c77
      Bart Van Assche 提交于
      This patch does not change any functionality but makes the skd
      driver code more similar to that of other blk-mq kernel drivers.
      Signed-off-by: NBart Van Assche <bart.vanassche@wdc.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Johannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      c39c6c77
    • B
      skd: Report completion mismatches once · 49f16e2f
      Bart Van Assche 提交于
      This patch removes one debug statement but otherwise does not change
      any functionality.
      Signed-off-by: NBart Van Assche <bart.vanassche@wdc.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Johannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      49f16e2f
  5. 23 8月, 2017 14 次提交
    • S
      nullb: badbblocks support · 2f54a613
      Shaohua Li 提交于
      Sometime disk could have tracks broken and data there is inaccessable,
      but data in other parts can be accessed in normal way. MD RAID supports
      such disks. But we don't have a good way to test it, because we can't
      control which part of a physical disk is bad. For a virtual disk, this
      can be easily controlled.
      
      This patch adds a new 'badblock' attribute. Configure it in this way:
      echo "+1-100" > xxx/badblock, this will make sector [1-100] as bad
      blocks.
      echo "-20-30" > xxx/badblock, this will make sector [20-30] good
      
      If badblocks are accessed, the nullb disk will return IO error. Other
      parts of the disk can accessed in normal way.
      Signed-off-by: NShaohua Li <shli@fb.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      2f54a613
    • S
      nullb: emulate cache · deb78b41
      Shaohua Li 提交于
      Software must flush disk cache to guarantee data safety. To check if
      software correctly does disk cache flush, we must know the behavior of
      disk. But physical disk behavior is uncontrollable. Even software
      doesn't do the flush, the disk probably does the flush. This patch tries
      to emulate a cache in the test disk.
      
      All write will go to a cache first, when the cache is full, we then
      flush some data to disk storage. A flush request will flush all data of
      the cache to disk storage. A FUA write will write to memory store
      directly and revalidate data in cache. If there is a power failure (by
      writing to power attribute, 'echo 0 > disk_name/power'), we discard all
      data in the cache, but preserve the data in disk storage. Later we can
      power on the disk again as usual (write 1 to 'power' attribute), then we
      can check data integrity and very if software does everything correctly.
      
      A new attribute 'cache_size' (in MB) is added to configure cache size.
      
      Based on original patch from Kyungchan Koh
      Signed-off-by: NKyungchan Koh <kkc6196@fb.com>
      Signed-off-by: NShaohua Li <shli@fb.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      deb78b41
    • S
      nullb: bandwidth control · eff2c4f1
      Shaohua Li 提交于
      In test, we usually expect controllable disk speed. For example, in a
      raid array, we'd like some disks are fast and some are slow. MD RAID
      actually has a feature for this. To test the feature, we'd like to make
      the disk run in specific speed.
      
      block throttling probably can be used for this purpose, but it requires
      cgroup setup. Here we just implement a simple throttling mechanism in
      the driver. There is slight fluctuation in the mechanism, but it's good
      enough for test.
      
      To configure the bandwidth cap, user sets the 'mbps' attribute. mbps is
      MB/s.
      
      Based on original patch from Kyungchan Koh
      Signed-off-by: NKyungchan Koh <kkc6196@fb.com>
      Signed-off-by: NShaohua Li <shli@fb.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      eff2c4f1
    • S
      nullb: support discard · 306eb6b4
      Shaohua Li 提交于
      discard makes sense for memory backed disk. And also it's useful to test
      if upper layer supports dicard correctly.
      
      User configures 'discard' attribute to enable/disable dicard support.
      
      Based on original patch from Kyungchan Koh
      Signed-off-by: NKyungchan Koh <kkc6196@fb.com>
      Signed-off-by: NShaohua Li <shli@fb.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      306eb6b4
    • S
      nullb: support memory backed store · 5bcd0e0c
      Shaohua Li 提交于
      This adds memory backed store in nullb.
      
      User configure 'memory_backed' attribute for this. By default, nullb
      disk doesn't use memory backed store.
      
      Based on original patch from Kyungchan Koh
      Signed-off-by: NKyungchan Koh <kkc6196@fb.com>
      Signed-off-by: NShaohua Li <shli@fb.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      5bcd0e0c
    • S
      nullb: use ida to manage index · 94bc02e3
      Shaohua Li 提交于
      We now dynamically create disks. Managing the disk index with ida to
      avoid bump up the index too much.
      Signed-off-by: NShaohua Li <shli@fb.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      94bc02e3
    • S
      nullb: add interface to power on disk · cedcafad
      Shaohua Li 提交于
      The device created in nullb configfs interface isn't power on by
      default. After user configures the device, user can do 'echo 1 >
      xxx/nullb/device_name/power' to power on the device, which will create a
      disk. the xxx/nullb/device_name/index is the disk index, so if the index
      is 2, the new created disk should be named as /dev/nullb2. Note, the
      'index' is only valid after disk is power on.
      
      'echo 0 > xxx/nullb/device_name/power' will remove the disk. Note, this
      doesn't remove the device. To remove the device, user should do 'rmdir
      xxx/nullb/device_name'. Removing the device will remove the disk too.
      Signed-off-by: NShaohua Li <shli@fb.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      cedcafad
    • S
      nullb: add configfs interface · 3bf2bd20
      Shaohua Li 提交于
      Add configfs interface for nullb. configfs interface is more flexible
      and easy to configure in a per-disk basis.
      
      Configuration is something like this:
      mount -t configfs none /mnt
      
      Checking which features the driver supports:
      cat /mnt/nullb/features
      
      The 'features' attribute is for future extension. We probably will add
      new features into the driver, userspace can check this attribute to find
      the supported features.
      
      Create/remove a device:
      mkdir/rmdir /mnt/nullb/a
      
      Then configure the device by setting attributes under /mnt/nullb/a, most
      of nullb supported module parameters are converted to attributes:
      size; /* device size in MB */
      completion_nsec; /* time in ns to complete a request */
      submit_queues; /* number of submission queues */
      home_node; /* home node for the device */
      queue_mode; /* block interface */
      blocksize; /* block size */
      irqmode; /* IRQ completion handler */
      hw_queue_depth; /* queue depth */
      use_lightnvm; /* register as a LightNVM device */
      blocking; /* blocking blk-mq device */
      use_per_node_hctx; /* use per-node allocation for hardware context */
      
      Note, creating a device doesn't create a disk immediately. Creating a
      disk is done in two phases: create a device and then power on the
      device. Next patch will introduce device power on.
      
      Based on original patch from Kyungchan Koh
      Signed-off-by: NKyungchan Koh <kkc6196@fb.com>
      Signed-off-by: NShaohua Li <shli@fb.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      3bf2bd20
    • S
      nullb: factor disk parameters · 2984c868
      Shaohua Li 提交于
      When we switch to configfs interface, each disk could have different
      configuration. To prepare for the change, we move most disk setting to a
      separate data structure. The existing module parameter interface is
      kept. The 'nr_devices' and 'shared_tags' don't make sense for per-disk
      setting, so they are remained as global settings.
      Signed-off-by: NShaohua Li <shli@fb.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      2984c868
    • D
      skd: error pointer dereference in skd_cons_disk() · 92d499d4
      Dan Carpenter 提交于
      My initial impulse was to check for IS_ERR_OR_NULL() but when I looked
      at this code a bit more closely, we should only need to check for
      IS_ERR().
      
      The blk_mq_alloc_tag_set() returns negative error codes and zero on
      success so we can just do an "if (rc) goto err_out;".  It's better to
      preserve the error code anyhow.  The blk_mq_init_queue() returns error
      pointers on failure, it never returns NULL.  We can also remove the
      "q = NULL;" at the start because that's no longer needed.
      
      Fixes: ca33dd92 ("skd: Convert to blk-mq")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      92d499d4
    • D
      skd: Uninitialized variable in skd_isr_completion_posted() · c0b3dda7
      Dan Carpenter 提交于
      Someone got too agressive about removing initializations and
      accidentally removed the "rc = 0;" which is required.
      
      Fixes: c830da8c ("skd: Remove superfluous initializations from skd_isr_completion_posted()")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      c0b3dda7
    • F
      drm/i915/gvt: Fix the kernel null pointer error · ffeaf9aa
      fred gao 提交于
      once error happens in shadow_indirect_ctx function, the variable
      wa_ctx->indirect_ctx.obj is not initialized but accessed, so the
      kernel null point panic occurs.
      
      Fixes: 894cf7d1 ("drm/i915/gvt: i915_gem_object_create() returns an error pointer")
      Cc: stable@vger.kernel.org # v4.8+
      Signed-off-by: Nfred gao <fred.gao@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      ffeaf9aa
    • M
      ANDROID: binder: fix proc->tsk check. · b2a6d1b9
      Martijn Coenen 提交于
      Commit c4ea41ba ("binder: use group leader instead of open thread")'
      was incomplete and didn't update a check in binder_mmap(), causing all
      mmap() calls into the binder driver to fail.
      Signed-off-by: NMartijn Coenen <maco@android.com>
      Tested-by: NJohn Stultz <john.stultz@linaro.org>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2a6d1b9
    • S
      ACPI: device property: Fix node lookup in acpi_graph_get_child_prop_value() · b5212f57
      Sakari Ailus 提交于
      acpi_graph_get_child_prop_value() is intended to find a child node with a
      certain property value pair. The check
      
      	if (!fwnode_property_read_u32(fwnode, prop_name, &nr))
      		continue;
      
      is faulty: fwnode_property_read_u32() returns zero on success, not on
      failure, leading to comparing values only if the searched property was not
      found.
      
      Moreover, the check is made against the parent device node instead of
      the child one as it should be.
      
      Fixes: 79389a83 (ACPI / property: Add support for remote endpoints)
      Reported-by: NHyungwoo Yang <hyungwoo.yang@intel.com>
      Signed-off-by: NSakari Ailus <sakari.ailus@linux.intel.com>
      Cc: 4.12+ <stable@vger.kernel.org> # 4.12+
      [ rjw: Changelog ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      b5212f57