1. 10 5月, 2016 1 次提交
    • C
      target: make ->shutdown_session optional · 22d11759
      Christoph Hellwig 提交于
      Turns out the template and thus many drivers got the return value wrong:
      0 means the fabrics driver needs to put a session reference, which no
      driver except for the iSCSI target drivers did.  Fortunately none of these
      drivers supports explicit Node ACLs, so the bug was harmless.
      
      Even without that only qla2xxx and iscsi every did real work in
      shutdown_session, so get rid of the boilerplate code in all other
      drivers.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      22d11759
  2. 02 5月, 2016 1 次提交
  3. 27 4月, 2016 3 次提交
  4. 24 4月, 2016 2 次提交
  5. 20 4月, 2016 1 次提交
  6. 18 4月, 2016 5 次提交
  7. 14 4月, 2016 11 次提交
  8. 07 4月, 2016 3 次提交
  9. 06 4月, 2016 3 次提交
  10. 05 4月, 2016 1 次提交
    • K
      mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros · 09cbfeaf
      Kirill A. Shutemov 提交于
      PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
      ago with promise that one day it will be possible to implement page
      cache with bigger chunks than PAGE_SIZE.
      
      This promise never materialized.  And unlikely will.
      
      We have many places where PAGE_CACHE_SIZE assumed to be equal to
      PAGE_SIZE.  And it's constant source of confusion on whether
      PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
      especially on the border between fs and mm.
      
      Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
      breakage to be doable.
      
      Let's stop pretending that pages in page cache are special.  They are
      not.
      
      The changes are pretty straight-forward:
      
       - <foo> << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
      
       - <foo> >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;
      
       - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN};
      
       - page_cache_get() -> get_page();
      
       - page_cache_release() -> put_page();
      
      This patch contains automated changes generated with coccinelle using
      script below.  For some reason, coccinelle doesn't patch header files.
      I've called spatch for them manually.
      
      The only adjustment after coccinelle is revert of changes to
      PAGE_CAHCE_ALIGN definition: we are going to drop it later.
      
      There are few places in the code where coccinelle didn't reach.  I'll
      fix them manually in a separate patch.  Comments and documentation also
      will be addressed with the separate patch.
      
      virtual patch
      
      @@
      expression E;
      @@
      - E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
      + E
      
      @@
      expression E;
      @@
      - E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
      + E
      
      @@
      @@
      - PAGE_CACHE_SHIFT
      + PAGE_SHIFT
      
      @@
      @@
      - PAGE_CACHE_SIZE
      + PAGE_SIZE
      
      @@
      @@
      - PAGE_CACHE_MASK
      + PAGE_MASK
      
      @@
      expression E;
      @@
      - PAGE_CACHE_ALIGN(E)
      + PAGE_ALIGN(E)
      
      @@
      expression E;
      @@
      - page_cache_get(E)
      + get_page(E)
      
      @@
      expression E;
      @@
      - page_cache_release(E)
      + put_page(E)
      Signed-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Acked-by: NMichal Hocko <mhocko@suse.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      09cbfeaf
  11. 04 4月, 2016 3 次提交
  12. 01 4月, 2016 3 次提交
  13. 31 3月, 2016 2 次提交
    • M
      usb: fix regression in SuperSpeed endpoint descriptor parsing · 59b9023c
      Mathias Nyman 提交于
      commit b37d83a6 ("usb: Parse the new USB 3.1 SuperSpeedPlus Isoc
      endpoint companion descriptor") caused a regression in 4.6-rc1 and fails
      to parse SuperSpeed endpoint companion descriptors.
      
      The new SuperSpeedPlus Isoc endpoint companion parsing code incorrectly
      decreased the the remaining buffer size before comparing the size with the
      expected length of the descriptor.
      
      This lead to possible failure in reading the SuperSpeed endpoint companion
      descriptor of the last endpoint, displaying a message like:
      
      "No SuperSpeed endpoint companion for config 1 interface 0 altsetting 0
       ep 129: using minimum values"
      
      Fix it by decreasing the size after comparing it.
      Also finish all the SS endpoint companion parsing before calling SSP isoc
      endpoint parsing function.
      
      Fixes: b37d83a6Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      59b9023c
    • I
      USB: usbip: fix potential out-of-bounds write · b348d7dd
      Ignat Korchagin 提交于
      Fix potential out-of-bounds write to urb->transfer_buffer
      usbip handles network communication directly in the kernel. When receiving a
      packet from its peer, usbip code parses headers according to protocol. As
      part of this parsing urb->actual_length is filled. Since the input for
      urb->actual_length comes from the network, it should be treated as untrusted.
      Any entity controlling the network may put any value in the input and the
      preallocated urb->transfer_buffer may not be large enough to hold the data.
      Thus, the malicious entity is able to write arbitrary data to kernel memory.
      Signed-off-by: NIgnat Korchagin <ignat.korchagin@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b348d7dd
  14. 30 3月, 2016 1 次提交