05 Sep, 2013

2 commits

  • GFS2 was only setting I_DIRTY_DATASYNC on files that it wrote to, when
    it actually increased the file size. If gfs2_fsync was called without
    I_DIRTY_DATASYNC set, it didn't flush the incore data to the log before
    returning, so any metadata or journaled data changes were not getting
    fsynced. This meant that writes to the middle of files were not always
    getting fsynced properly.

    This patch makes gfs2 set I_DIRTY_DATASYNC whenever metadata has been
    updated during a write. It also make gfs2_sync flush the incore log
    if I_DIRTY_PAGES is set, and the file is using data journalling. This
    will make sure that all incore logged data gets written to disk before
    returning from a fsync.

    Signed-off-by: Benjamin Marzinski
    Signed-off-by: Steven Whitehouse

    Benjamin Marzinski
     
  • This patch checks for the first mounter being a specator. If so, it
    makes sure all the journals are clean. If there's a dirty journal,
    the mount fails.

    Testing results:

    # insmod gfs2.ko
    # mount -tgfs2 -o spectator /dev/sasdrives/scratch /mnt/gfs2
    mount: permission denied
    # dmesg | tail -2
    [ 3390.655996] GFS2: fsid=MUSKETEER:home: Now mounting FS...
    [ 3390.841336] GFS2: fsid=MUSKETEER:home.s: jid=0: Journal is dirty, so the first mounter must not be a spectator.
    # mount -tgfs2 /dev/sasdrives/scratch /mnt/gfs2
    # umount /mnt/gfs2
    # mount -tgfs2 -o spectator /dev/sasdrives/scratch /mnt/gfs2
    # ls /mnt/gfs2|wc -l
    352
    # umount /mnt/gfs2

    Signed-off-by: Bob Peterson
    Signed-off-by: Steven Whitehouse

    Bob Peterson
     

04 Sep, 2013

1 commit


28 Aug, 2013

1 commit

  • The writepages function was recently merged between writeback
    and ordered mode. This completes the change by doing the same
    with writepage. The remaining differences in writepage were
    left over from some earlier time and not actually doing anything
    useful.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     

20 Aug, 2013

7 commits

  • We need to check the glock ref counter in a race free way
    in order to ensure that the gfs2_glock_hold() call will
    succeed. The easiest way to do that is to simply take the
    reference count early in the common code of examine_bucket,
    skipping any glocks with zero ref count.

    That means that the examiner functions all need to put their
    reference on the glock once they've performed their function.

    Signed-off-by: Steven Whitehouse
    Reported-by: David Teigland
    Tested-by: David Teigland

    Steven Whitehouse
     
  • Since gfs2_sync_meta() is only called from a single file, lets move
    it to lops.c where it is used, and mark it static. At the same
    time, we can clean up the meta_io.h header too.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • Pull gfs2 fixes from Steven Whitehouse:
    "Out of these five patches, the one for ensuring that the number of
    revokes is not exceeded, and the one for checking the glock is not
    already held in gfs2_getxattr are the two most important. The latter
    can be triggered by selinux.

    The other three patches are very small and fix mostly fairly trivial
    issues"

    * git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes:
    GFS2: Check for glock already held in gfs2_getxattr
    GFS2: alloc_workqueue() doesn't return an ERR_PTR
    GFS2: don't overrun reserved revokes
    GFS2: WQ_NON_REENTRANT is meaningless and going away
    GFS2: Fix typo in gfs2_create_inode()

    Linus Torvalds
     
  • Pull x86 fixes from Ingo Molnar:
    "Two AMD microcode loader fixes and an OLPC firmware support fix"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86, microcode, AMD: Fix early microcode loading
    x86, microcode, AMD: Make cpu_has_amd_erratum() use the correct struct cpuinfo_x86
    x86: Don't clear olpc_ofw_header when sentinel is detected

    Linus Torvalds
     
  • Pull timer fixes from Ingo Molnar:
    "Three small fixlets"

    * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    nohz: fix compile warning in tick_nohz_init()
    nohz: Do not warn about unstable tsc unless user uses nohz_full
    sched_clock: Fix integer overflow

    Linus Torvalds
     
  • Pull drm fixes from Dave Airlie:
    "Bit late with these, was under the weather for a a few days, nothing
    too crazy:

    Some radeon regression fixes, one intel regression fix, and one fix to
    avoid a warn with i915 when used with dma-buf"

    * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
    drm/i915: unpin backing storage in dmabuf_unmap
    drm/radeon: fix WREG32_OR macro setting bits in a register
    drm/radeon/r7xx: fix copy paste typo in golden register setup
    drm/i915: Don't deref pipe->cpu_transcoder in the hangcheck code
    drm/radeon: fix UVD message buffer validation

    Linus Torvalds
     
  • Fix new kernel-doc warnings in kernel/wait.c:

    Warning(kernel/wait.c:374): No description found for parameter 'p'
    Warning(kernel/wait.c:374): Excess function parameter 'word' description in 'wake_up_atomic_t'
    Warning(kernel/wait.c:374): Excess function parameter 'bit' description in 'wake_up_atomic_t'

    Signed-off-by: Randy Dunlap
    Cc: David Howells
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

19 Aug, 2013

9 commits

  • Since the introduction of atomic_open, gfs2_getxattr can be
    called with the glock already held, so we need to allow for
    this.

    Signed-off-by: Steven Whitehouse
    Reported-by: David Teigland
    Tested-by: David Teigland

    Steven Whitehouse
     
  • alloc_workqueue() returns a NULL on error, it doesn't return an ERR_PTR.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Steven Whitehouse

    Dan Carpenter
     
  • When run during fsync, a gfs2_log_flush could happen between the
    time when gfs2_ail_flush checked the number of blocks to revoke,
    and when it actually started the transaction to do those revokes.
    This occassionally caused it to need more revokes than it reserved,
    causing gfs2 to crash.

    Instead of just reserving enough revokes to handle the blocks that
    currently need them, this patch makes gfs2_ail_flush reserve the
    maximum number of revokes it can, without increasing the total number
    of reserved log blocks. This patch also passes the number of reserved
    revokes to __gfs2_ail_flush() so that it doesn't go over its limit
    and cause a crash like we're seeing. Non-fsync calls to __gfs2_ail_flush
    will still cause a BUG() necessary revokes are skipped.

    Signed-off-by: Benjamin Marzinski
    Signed-off-by: Steven Whitehouse

    Benjamin Marzinski
     
  • dbf2576e37 ("workqueue: make all workqueues non-reentrant") made
    WQ_NON_REENTRANT no-op and the flag is going away. Remove its usages.

    This patch doesn't introduce any behavior changes.

    Signed-off-by: Tejun Heo
    Signed-off-by: Steven Whitehouse
    Cc: cluster-devel@redhat.com

    Tejun Heo
     
  • PTR_RET should be PTR_ERR

    Reported-by: Sachin Kamat
    Cc: Rusty Russell
    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • * tag 'drm-intel-fixes-2013-08-15' of git://people.freedesktop.org/~danvet/drm-intel: (153 commits)
    drm/i915: Don't deref pipe->cpu_transcoder in the hangcheck code

    Dave Airlie
     
  • This fixes a WARN in i915_gem_free_object when the
    obj->pages_pin_count isn't 0.

    v2: Add locking to unmap, noticed by Chris Wilson. Note that even
    though we call unmap with our own dev->struct_mutex held that won't
    result in an immediate deadlock since we never go through the dma_buf
    interfaces for our own, reimported buffers. But it's still easy to
    blow up and anger lockdep, but that's already the case with our ->map
    implementation. Fixing this for real will involve per dma-buf ww mutex
    locking by the callers. And lots of fun. So go with the duct-tape
    approach for now.

    Cc: Chris Wilson
    Reported-by: Maarten Lankhorst
    Cc: Maarten Lankhorst
    Tested-by: Armin K. (v1)
    Tested-by: Dave Airlie
    Acked-by: Maarten Lankhorst
    Signed-off-by: Daniel Vetter
    Signed-off-by: Dave Airlie

    Daniel Vetter
     
  • Just two small fixes for radeon. One fixes an array overrun
    that can cause garbage to get written to registers on some r7xx boards,
    the other is a small UVD fix.
    Also one audio regresion

    * 'drm-fixes-3.11' of git://people.freedesktop.org/~agd5f/linux:
    drm/radeon: fix WREG32_OR macro setting bits in a register
    drm/radeon/r7xx: fix copy paste typo in golden register setup
    drm/radeon: fix UVD message buffer validation

    Dave Airlie
     
  • Linus Torvalds
     

18 Aug, 2013

2 commits


17 Aug, 2013

10 commits

  • Fix this build error:

    In file included from fs/exec.c:61:0:
    arch/s390/include/asm/tlb.h:35:23: error: expected identifier or '(' before 'unsigned'
    arch/s390/include/asm/tlb.h:36:1: warning: no semicolon at end of struct or union [enabled by default]
    arch/s390/include/asm/tlb.h: In function 'tlb_gather_mmu':
    arch/s390/include/asm/tlb.h:57:5: error: 'struct mmu_gather' has no member named 'end'

    Broken due to commit 2b047252d0 ("Fix TLB gather virtual address range
    invalidation corner cases").

    Cc: Greg Kroah-Hartman
    Cc: stable@vger.kernel.org
    Signed-off-by: Guenter Roeck
    [ Oh well. We had build testing for ppc amd um, but no s390 - Linus ]
    Signed-off-by: Linus Torvalds

    Guenter Roeck
     
  • I have taken a different job. I am removing myself as maintainer of
    GRU. Dimitri will continue to maintain the SGI GRU driver, changing the
    XP/XPC/XPNET maintainer to Cliff Whickman, but leaving behind my
    personal email address to answer any questions about the design or
    operation of the XP family of drivers.

    Signed-off-by: Robin Holt
    Signed-off-by: Linus Torvalds

    Robin Holt
     
  • Commit 0713ed0cde76438d05849f1537d3aab46e099475 added
    jbd2_journal_file_inode() call into ext4_block_zero_page_range().
    However that function gets called from truncate path and thus inode
    needn't have jinode attached - that happens in ext4_file_open() but
    the file needn't be ever open since mount. Calling
    jbd2_journal_file_inode() without jinode attached results in the oops.

    We fix the problem by attaching jinode to inode also in ext4_truncate()
    and ext4_punch_hole() when we are going to zero out partial blocks.

    Reported-by: majianpeng
    Signed-off-by: Jan Kara
    Signed-off-by: "Theodore Ts'o"

    Jan Kara
     
  • Pull ARM fixes from Russell King:
    "The usual collection of random fixes. Also some further fixes to the
    last set of security fixes, and some more from Will (which you may
    already have in a slightly different form)"

    * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
    ARM: 7807/1: kexec: validate CPU hotplug support
    ARM: 7812/1: rwlocks: retry trylock operation if strex fails on free lock
    ARM: 7811/1: locks: use early clobber in arch_spin_trylock
    ARM: 7810/1: perf: Fix array out of bounds access in armpmu_map_hw_event()
    ARM: 7809/1: perf: fix event validation for software group leaders
    ARM: Fix FIQ code on VIVT CPUs
    ARM: Fix !kuser helpers case
    ARM: Fix the world famous typo with is_gate_vma()

    Linus Torvalds
     
  • Pull m68k fixes from Geert Uytterhoeven:
    "These are two critical fixes, needed by distro kernels, and thus also
    destined for stable:

    - The do_div() commit fixes a crash in mounting btrfs volumes, which
    was a regression from 3.2,

    - The ARAnyM fix allows to have NatFeat drivers as loadable modules,
    which is needed for initrds"

    * 'for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
    m68k: Truncate base in do_div()
    m68k/atari: ARAnyM - Fix NatFeat module support

    Linus Torvalds
     
  • Pull clock controller fixes from Michael Turquette:
    "Two small fixes for the Zynq clock controller introduced in 3.11-rc1
    and another Exynos clock patch which fixes a regression that prevents
    the video pipeline from functioning on that platform"

    * tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mturquette/linux:
    clk: exynos4: Add CLK_GET_RATE_NOCACHE flag for the Exynos4x12 ISP clocks
    clk/zynq/clkc: Add CLK_SET_RATE_PARENT flag to ethernet muxes
    clk/zynq/clkc: Add dedicated spinlock for the SWDT

    Linus Torvalds
     
  • Pull power management fix from Rafael Wysocki:
    "The removal of delayed_work_pending() checks from kernel/power/qos.c
    done in 3.9 introduced a deadlock in pm_qos_work_fn().

    Fix from Stephen Boyd"

    * tag 'pm-3.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    PM / QoS: Fix workqueue deadlock when using pm_qos_update_request_timeout()

    Linus Torvalds
     
  • Pull sound fixes from Takashi Iwai:
    "This batch contains a few USB audio fixes, a couple of HD-audio
    quirks, various small ASoC driver fixes in addition to an ASoC core
    fix that may lead to memory corruption.

    Unfortunately slightly more volume than the previous pull request, but
    all are reasonable regression fixes"

    * tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
    ALSA: hda - Add a fixup for Gateway LT27
    ASoC: tegra: fix Tegra30 I2S capture parameter setup
    ALSA: usb-audio: Fix invalid volume resolution for Logitech HD Webcam C525
    ALSA: hda - Fix missing mute controls for CX5051
    ALSA: usb-audio: fix automatic Roland/Yamaha MIDI detection
    ALSA: 6fire: make buffers DMA-able (midi)
    ALSA: 6fire: make buffers DMA-able (pcm)
    ALSA: hda - Add pinfix for LG LW25 laptop
    ASoC: cs42l52: Add new TLV for Beep Volume
    ASoC: cs42l52: Reorder Min/Max and update to SX_TLV for Beep Volume
    ASoC: dapm: Fix empty list check in dapm_new_mux()
    ASoC: sgtl5000: fix buggy 'Capture Attenuate Switch' control
    ASoC: sgtl5000: prevent playback to be muted when terminating concurrent capture

    Linus Torvalds
     
  • Pull USB fixes from Greg KH:
    "Here are some small USB fixes for 3.11-rc6 that have accumulated.

    Nothing huge, a EHCI fix that solves a much-reported audio USB
    problem, some usb-serial driver endian fixes and other minor fixes, a
    wireless USB oops fix, and two new quirks"

    * tag 'usb-3.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
    USB: keyspan: fix null-deref at disconnect and release
    USB: mos7720: fix broken control requests
    usb: add two quirky touchscreen
    USB: ti_usb_3410_5052: fix big-endian firmware handling
    USB: adutux: fix big-endian device-type reporting
    USB: usbtmc: fix big-endian probe of Rigol devices
    USB: mos7840: fix big-endian probe
    USB-Serial: Fix error handling of usb_wwan
    wusbcore: fix kernel panic when disconnecting a wireless USB->serial device
    USB: EHCI: accept very late isochronous URBs

    Linus Torvalds
     
  • Pull networking fixes from David Miller:

    1) Fix SKB leak in 8139cp, from Dave Jones.

    2) Fix use of *_PAGES interfaces with mlx5 firmware, from Moshe Lazar.

    3) RCU conversion of macvtap introduced two races, fixes by Eric
    Dumazet

    4) Synchronize statistic flows in bnx2x driver to prevent corruption,
    from Dmitry Kravkov

    5) Undo optimization in IP tunneling, we were using the inner IP header
    in some cases to inherit the IP ID, but that isn't correct in some
    circumstances. From Pravin B Shelar

    6) Use correct struct size when parsing netlink attributes in
    rtnl_bridge_getlink(). From Asbjoern Sloth Toennesen

    7) Length verifications in tun_get_user() are bogus, from Weiping Pan
    and Dan Carpenter

    8) Fix bad merge resolution during 3.11 networking development in
    openvswitch, albeit a harmless one which added some unreachable
    code. From Jesse Gross

    9) Wrong size used in flexible array allocation in openvswitch, from
    Pravin B Shelar

    10) Clear out firmware capability flags the be2net driver isn't ready to
    handle yet, from Sarveshwar Bandi

    11) Revert DMA mapping error checking addition to cxgb3 driver, it's
    buggy. From Alexey Kardashevskiy

    12) Fix regression in packet scheduler rate limiting when working with a
    link layer of ATM. From Jesper Dangaard Brouer

    13) Fix several errors in TCP Cubic congestion control, in particular
    overflow errors in timestamp calculations. From Eric Dumazet and
    Van Jacobson

    14) In ipv6 routing lookups, we need to backtrack if subtree traversal
    don't result in a match. From Hannes Frederic Sowa

    15) ipgre_header() returns incorrect packet offset. Fix from Timo Teräs

    16) Get "low latency" out of the new MIB counter names. From Eliezer
    Tamir

    17) State check in ndo_dflt_fdb_del() is inverted, from Sridhar
    Samudrala

    18) Handle TCP Fast Open properly in netfilter conntrack, from Yuchung
    Cheng

    19) Wrong memcpy length in pcan_usb driver, from Stephane Grosjean

    20) Fix dealock in TIPC, from Wang Weidong and Ding Tianhong

    21) call_rcu() call to destroy SCTP transport is done too early and
    might result in an oops. From Daniel Borkmann

    22) Fix races in genetlink family dumps, from Johannes Berg

    23) Flags passed into macvlan by the user need to be validated properly,
    from Michael S Tsirkin

    24) Fix skge build on 32-bit, from Stephen Hemminger

    25) Handle malformed TCP headers properly in xt_TCPMSS, from Pablo Neira
    Ayuso

    26) Fix handling of stacked vlans in vlan_dev_real_dev(), from Nikolay
    Aleksandrov

    27) Eliminate MTU calculation overflows in esp{4,6}, from Daniel
    Borkmann

    28) neigh_parms need to be setup before calling the ->ndo_neigh_setup()
    method. From Veaceslav Falico

    29) Kill out-of-bounds prefetch in fib_trie, from Eric Dumazet

    30) Don't dereference MLD query message if the length isn't value in the
    bridge multicast code, from Linus Lüssing

    31) Fix VXLAN IGMP join regression due to an inverted check, from Cong
    Wang

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (70 commits)
    net/mlx5_core: Support MANAGE_PAGES and QUERY_PAGES firmware command changes
    tun: signedness bug in tun_get_user()
    qlcnic: Fix diagnostic interrupt test for 83xx adapters
    qlcnic: Fix beacon state return status handling
    qlcnic: Fix set driver version command
    net: tg3: fix NULL pointer dereference in tg3_io_error_detected and tg3_io_slot_reset
    net_sched: restore "linklayer atm" handling
    drivers/net/ethernet/via/via-velocity.c: update napi implementation
    Revert "cxgb3: Check and handle the dma mapping errors"
    be2net: Clear any capability flags that driver is not interested in.
    openvswitch: Reset tunnel key between input and output.
    openvswitch: Use correct type while allocating flex array.
    openvswitch: Fix bad merge resolution.
    tun: compare with 0 instead of total_len
    rtnetlink: rtnl_bridge_getlink: Call nlmsg_find_attr() with ifinfomsg header
    ethernet/arc/arc_emac - fix NAPI "work > weight" warning
    ip_tunnel: Do not use inner ip-header-id for tunnel ip-header-id.
    bnx2x: prevent crash in shutdown flow with CNIC
    bnx2x: fix PTE write access error
    bnx2x: fix memory leak in VF
    ...

    Linus Torvalds
     

16 Aug, 2013

8 commits

  • Ben Tebulin reported:

    "Since v3.7.2 on two independent machines a very specific Git
    repository fails in 9/10 cases on git-fsck due to an SHA1/memory
    failures. This only occurs on a very specific repository and can be
    reproduced stably on two independent laptops. Git mailing list ran
    out of ideas and for me this looks like some very exotic kernel issue"

    and bisected the failure to the backport of commit 53a59fc67f97 ("mm:
    limit mmu_gather batching to fix soft lockups on !CONFIG_PREEMPT").

    That commit itself is not actually buggy, but what it does is to make it
    much more likely to hit the partial TLB invalidation case, since it
    introduces a new case in tlb_next_batch() that previously only ever
    happened when running out of memory.

    The real bug is that the TLB gather virtual memory range setup is subtly
    buggered. It was introduced in commit 597e1c3580b7 ("mm/mmu_gather:
    enable tlb flush range in generic mmu_gather"), and the range handling
    was already fixed at least once in commit e6c495a96ce0 ("mm: fix the TLB
    range flushed when __tlb_remove_page() runs out of slots"), but that fix
    was not complete.

    The problem with the TLB gather virtual address range is that it isn't
    set up by the initial tlb_gather_mmu() initialization (which didn't get
    the TLB range information), but it is set up ad-hoc later by the
    functions that actually flush the TLB. And so any such case that forgot
    to update the TLB range entries would potentially miss TLB invalidates.

    Rather than try to figure out exactly which particular ad-hoc range
    setup was missing (I personally suspect it's the hugetlb case in
    zap_huge_pmd(), which didn't have the same logic as zap_pte_range()
    did), this patch just gets rid of the problem at the source: make the
    TLB range information available to tlb_gather_mmu(), and initialize it
    when initializing all the other tlb gather fields.

    This makes the patch larger, but conceptually much simpler. And the end
    result is much more understandable; even if you want to play games with
    partial ranges when invalidating the TLB contents in chunks, now the
    range information is always there, and anybody who doesn't want to
    bother with it won't introduce subtle bugs.

    Ben verified that this fixes his problem.

    Reported-bisected-and-tested-by: Ben Tebulin
    Build-testing-by: Stephen Rothwell
    Build-testing-by: Richard Weinberger
    Reviewed-by: Michal Hocko
    Acked-by: Peter Zijlstra
    Cc: stable@vger.kernel.org
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Gateway LT27 needs a fixup for the inverted digital mic.

    Reported-by: "Nathanael D. Noblet"
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • In the previous QUERY_PAGES command version we used one command to get the
    required amount of boot, init and post init pages. The new version uses the
    op_mod field to specify whether the query is for the required amount of boot,
    init or post init pages. In addition the output field size for the required
    amount of pages increased from 16 to 32 bits.

    In MANAGE_PAGES command the input_num_entries and output_num_entries fields
    sizes changed from 16 to 32 bits and the PAS tables offset changed to 0x10.

    In the pages request event the num_pages field also changed to 32 bits.

    In the HCA-capabilities-layout the size and location of max_qp_mcg field has
    been changed to support 24 bits.

    This patch isn't compatible with firmware versions < 5; however, it turns out that the
    first GA firmware we will publish will not support previous versions so this should be OK.

    Signed-off-by: Moshe Lazer
    Signed-off-by: Eli Cohen
    Signed-off-by: David S. Miller

    Moshe Lazer
     
  • The recent fix d9bf5f1309 "tun: compare with 0 instead of total_len" is
    not totally correct. Because "len" and "sizeof()" are size_t type, that
    means they are never less than zero.

    Signed-off-by: Dan Carpenter
    Acked-by: Michael S. Tsirkin
    Acked-by: Neil Horman
    Signed-off-by: David S. Miller

    Dan Carpenter
     
  • o Do not allow interrupt test when adapter is resetting.

    Signed-off-by: Manish Chopra
    Signed-off-by: Sucheta Chakraborty
    Signed-off-by: David S. Miller

    Manish Chopra
     
  • o Driver was misinterpreting the return status for beacon
    state query leading to incorrect interpretation of beacon
    state and logging an error message for successful status.
    Fixed the driver to properly interpret the return status.

    Signed-off-by: Sucheta Chakraborty
    Signed-off-by: David S. Miller

    Sucheta Chakraborty
     
  • Driver was issuing set driver version command through all
    functions in the adapter. Fix the driver to issue set driver
    version once per adapter, through function 0.

    Signed-off-by: Himanshu Madhani
    Signed-off-by: Sucheta Chakraborty
    Signed-off-by: David S. Miller

    Himanshu Madhani
     
  • Commit d8af4dfd8 ("net/tg3: Fix kernel crash") introduced a possible
    NULL pointer dereference in tg3 driver when !netdev || !netif_running(netdev)
    condition is met and netdev is NULL. Then, the jump to the 'done' label
    calls dev_close() with a netdevice that is NULL. Therefore, only call
    dev_close() when we have a netdevice, but one that is not running.

    [ Add the same checks in tg3_io_slot_reset() per Gavin Shan - by Nithin
    Nayak Sujir ]

    Reported-by: Dave Jones
    Signed-off-by: Daniel Borkmann
    Cc: Gavin Shan
    Cc: Michael Chan
    Signed-off-by: Nithin Nayak Sujir
    Signed-off-by: Nithin Nayak Sujir
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Daniel Borkmann