1. 22 Apr, 2015 29 commits
  2. 21 Apr, 2015 8 commits
  3. 13 Apr, 2015 1 commit
    • Jiri Slaby's avatar
      core, nfqueue, openvswitch: fix compilation warning · 3426bb8d
      Jiri Slaby authored
      Stable commit "core, nfqueue, openvswitch: Orphan frags in
      skb_zerocopy and handle errors", upstream commit
      36d5fe6a, was not correctly backported
      and missed to change a const 'from' parameter to non-const.  This
      results in a new batch of warnings:
      
      net/netfilter/nfnetlink_queue_core.c: In function ‘nfqnl_zcopy’:
      net/netfilter/nfnetlink_queue_core.c:272:2: warning: passing argument 1 of ‘skb_orphan_frags’ discards ‘const’ qualifier from pointer target type [enabled by default]
        if (unlikely(skb_orphan_frags(from, GFP_ATOMIC))) {
        ^
      In file included from net/netfilter/nfnetlink_queue_core.c:18:0:
      include/linux/skbuff.h:1822:19: note: expected ‘struct sk_buff *’ but argument is of type ‘const struct sk_buff *’
       static inline int skb_orphan_frags(struct sk_buff *skb, gfp_t gfp_mask)
                         ^
      net/netfilter/nfnetlink_queue_core.c:273:3: warning: passing argument 1 of ‘skb_tx_error’ discards ‘const’ qualifier from pointer target type [enabled by default]
         skb_tx_error(from);
         ^
      In file included from net/netfilter/nfnetlink_queue_core.c:18:0:
      include/linux/skbuff.h:630:13: note: expected ‘struct sk_buff *’ but argument is of type ‘const struct sk_buff *’
       extern void skb_tx_error(struct sk_buff *skb);
      
      Remove const from the 'from' parameter, the same as in the upstream
      commit.
      
      As far as I can see, this leaked into 3.10, 3.12, and 3.13 already.
      
      Cc: Zoltan Kiss <zoltan.kiss@citrix.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: stable@vger.kernel.org # v3.10, v3.12, v3.13
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      3426bb8d
  4. 09 Apr, 2015 2 commits
    • Jiri Slaby's avatar
      Linux 3.12.40 · 129ea38d
      Jiri Slaby authored
      129ea38d
    • Sergei Antonov's avatar
      hfsplus: fix B-tree corruption after insertion at position 0 · a340cc20
      Sergei Antonov authored
      commit 98cf21c6 upstream.
      
      Fix B-tree corruption when a new record is inserted at position 0 in the
      node in hfs_brec_insert().  In this case a hfs_brec_update_parent() is
      called to update the parent index node (if exists) and it is passed
      hfs_find_data with a search_key containing a newly inserted key instead
      of the key to be updated.  This results in an inconsistent index node.
      The bug reproduces on my machine after an extents overflow record for
      the catalog file (CNID=4) is inserted into the extents overflow B-tree.
      Because of a low (reserved) value of CNID=4, it has to become the first
      record in the first leaf node.
      
      The resulting first leaf node is correct:
      
        ----------------------------------------------------
        | key0.CNID=4 | key1.CNID=123 | key2.CNID=456, ... |
        ----------------------------------------------------
      
      But the parent index key0 still contains the previous key CNID=123:
      
        -----------------------
        | key0.CNID=123 | ... |
        -----------------------
      
      A change in hfs_brec_insert() makes hfs_brec_update_parent() work
      correctly by preventing it from getting fd->record=-1 value from
      __hfs_brec_find().
      
      Along the way, I removed duplicate code with unification of the if
      condition.  The resulting code is equivalent to the original code
      because node is never 0.
      
      Also hfs_brec_update_parent() will now return an error after getting a
      negative fd->record value.  However, the return value of
      hfs_brec_update_parent() is not checked anywhere in the file and I'm
      leaving it unchanged by this patch.  brec.c lacks error checking after
      some other calls too, but this issue is of less importance than the one
      being fixed by this patch.
      Signed-off-by: default avatarSergei Antonov <saproj@gmail.com>
      Cc: Joe Perches <joe@perches.com>
      Reviewed-by: default avatarVyacheslav Dubeyko <slava@dubeyko.com>
      Acked-by: default avatarHin-Tak Leung <htl10@users.sourceforge.net>
      Cc: Anton Altaparmakov <aia21@cam.ac.uk>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      a340cc20