diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-18 19:58:47 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-18 19:58:47 -0400 |
| commit | 8cb652bb10e788270b6b8b6df20fba62b479feb2 (patch) | |
| tree | 1b9957f72498b0a7302a16f2a6c7d17919733f44 | |
| parent | 575a2929815bca197983a22fe6d072534d219be4 (diff) | |
| parent | 33c84bc14c25074ac14644cf7db75a57e9abaf1a (diff) | |
Merge tag 'staging-3.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver fixes from Greg KH:
"Here are a few staging driver fixes for issues that have been reported
for 3.15-rc2.
Also dominating the diffstat for the pull request is the removal of
the rtl8187se driver. It's no longer needed in staging as a "real"
driver for this hardware is now merged in the tree in the "correct"
location in drivers/net/
All of these patches have been tested in linux-next"
* tag 'staging-3.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
staging: r8188eu: Fix case where ethtype was never obtained and always be checked against 0
staging: r8712u: Fix case where ethtype was never obtained and always be checked against 0
staging: r8188eu: Calling rtw_get_stainfo() with a NULL sta_addr will return NULL
staging: comedi: fix circular locking dependency in comedi_mmap()
staging: r8723au: Add missing initialization of change_inx in sort algorithm
Staging: unisys: use after free in list_for_each()
staging: unisys: use after free in error messages
staging: speakup: fix misuse of kstrtol() in handle_goto()
staging: goldfish: Call free_irq in error path
staging: delete rtl8187se wireless driver
staging: rtl8723au: Fix buffer overflow in rtw_get_wfd_ie()
staging: gs_fpgaboot: remove __TIMESTAMP__ macro
staging: vme: fix memory leak in vme_user_probe()
staging: fpgaboot: clean up Makefile
staging/usbip: fix store_attach() sscanf return value check
staging/usbip: userspace - fix usbipd SIGSEGV from refresh_exported_devices()
staging: rtl8188eu: remove spaces, correct counts to unbreak P2P ioctls
staging/rtl8821ae: Fix OOM handling in _rtl_init_deferred_work()
52 files changed, 154 insertions, 19978 deletions
diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig index ea5efb426f75..22365f140bec 100644 --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig | |||
| @@ -40,8 +40,6 @@ source "drivers/staging/olpc_dcon/Kconfig" | |||
| 40 | 40 | ||
| 41 | source "drivers/staging/panel/Kconfig" | 41 | source "drivers/staging/panel/Kconfig" |
| 42 | 42 | ||
| 43 | source "drivers/staging/rtl8187se/Kconfig" | ||
| 44 | |||
| 45 | source "drivers/staging/rtl8192u/Kconfig" | 43 | source "drivers/staging/rtl8192u/Kconfig" |
| 46 | 44 | ||
| 47 | source "drivers/staging/rtl8192e/Kconfig" | 45 | source "drivers/staging/rtl8192e/Kconfig" |
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index 86e020c2ad0d..fbe84ed2d048 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile | |||
| @@ -12,7 +12,6 @@ obj-$(CONFIG_PRISM2_USB) += wlan-ng/ | |||
| 12 | obj-$(CONFIG_COMEDI) += comedi/ | 12 | obj-$(CONFIG_COMEDI) += comedi/ |
| 13 | obj-$(CONFIG_FB_OLPC_DCON) += olpc_dcon/ | 13 | obj-$(CONFIG_FB_OLPC_DCON) += olpc_dcon/ |
| 14 | obj-$(CONFIG_PANEL) += panel/ | 14 | obj-$(CONFIG_PANEL) += panel/ |
| 15 | obj-$(CONFIG_R8187SE) += rtl8187se/ | ||
| 16 | obj-$(CONFIG_RTL8192U) += rtl8192u/ | 15 | obj-$(CONFIG_RTL8192U) += rtl8192u/ |
| 17 | obj-$(CONFIG_RTL8192E) += rtl8192e/ | 16 | obj-$(CONFIG_RTL8192E) += rtl8192e/ |
| 18 | obj-$(CONFIG_R8712U) += rtl8712/ | 17 | obj-$(CONFIG_R8712U) += rtl8712/ |
diff --git a/drivers/staging/comedi/comedi_buf.c b/drivers/staging/comedi/comedi_buf.c index 924fce977985..257595016161 100644 --- a/drivers/staging/comedi/comedi_buf.c +++ b/drivers/staging/comedi/comedi_buf.c | |||
| @@ -61,6 +61,8 @@ static void __comedi_buf_free(struct comedi_device *dev, | |||
| 61 | struct comedi_subdevice *s) | 61 | struct comedi_subdevice *s) |
| 62 | { | 62 | { |
| 63 | struct comedi_async *async = s->async; | 63 | struct comedi_async *async = s->async; |
| 64 | struct comedi_buf_map *bm; | ||
| 65 | unsigned long flags; | ||
| 64 | 66 | ||
| 65 | if (async->prealloc_buf) { | 67 | if (async->prealloc_buf) { |
| 66 | vunmap(async->prealloc_buf); | 68 | vunmap(async->prealloc_buf); |
| @@ -68,8 +70,11 @@ static void __comedi_buf_free(struct comedi_device *dev, | |||
| 68 | async->prealloc_bufsz = 0; | 70 | async->prealloc_bufsz = 0; |
| 69 | } | 71 | } |
| 70 | 72 | ||
| 71 | comedi_buf_map_put(async->buf_map); | 73 | spin_lock_irqsave(&s->spin_lock, flags); |
| 74 | bm = async->buf_map; | ||
| 72 | async->buf_map = NULL; | 75 | async->buf_map = NULL; |
| 76 | spin_unlock_irqrestore(&s->spin_lock, flags); | ||
| 77 | comedi_buf_map_put(bm); | ||
| 73 | } | 78 | } |
| 74 | 79 | ||
| 75 | static void __comedi_buf_alloc(struct comedi_device *dev, | 80 | static void __comedi_buf_alloc(struct comedi_device *dev, |
| @@ -80,6 +85,7 @@ static void __comedi_buf_alloc(struct comedi_device *dev, | |||
| 80 | struct page **pages = NULL; | 85 | struct page **pages = NULL; |
| 81 | struct comedi_buf_map *bm; | 86 | struct comedi_buf_map *bm; |
| 82 | struct comedi_buf_page *buf; | 87 | struct comedi_buf_page *buf; |
| 88 | unsigned long flags; | ||
| 83 | unsigned i; | 89 | unsigned i; |
| 84 | 90 | ||
| 85 | if (!IS_ENABLED(CONFIG_HAS_DMA) && s->async_dma_dir != DMA_NONE) { | 91 | if (!IS_ENABLED(CONFIG_HAS_DMA) && s->async_dma_dir != DMA_NONE) { |
| @@ -92,8 +98,10 @@ static void __comedi_buf_alloc(struct comedi_device *dev, | |||
| 92 | if (!bm) | 98 | if (!bm) |
| 93 | return; | 99 | return; |
| 94 | 100 | ||
| 95 | async->buf_map = bm; | ||
| 96 | kref_init(&bm->refcount); | 101 | kref_init(&bm->refcount); |
| 102 | spin_lock_irqsave(&s->spin_lock, flags); | ||
| 103 | async->buf_map = bm; | ||
| 104 | spin_unlock_irqrestore(&s->spin_lock, flags); | ||
| 97 | bm->dma_dir = s->async_dma_dir; | 105 | bm->dma_dir = s->async_dma_dir; |
| 98 | if (bm->dma_dir != DMA_NONE) | 106 | if (bm->dma_dir != DMA_NONE) |
| 99 | /* Need ref to hardware device to free buffer later. */ | 107 | /* Need ref to hardware device to free buffer later. */ |
| @@ -127,7 +135,9 @@ static void __comedi_buf_alloc(struct comedi_device *dev, | |||
| 127 | 135 | ||
| 128 | pages[i] = virt_to_page(buf->virt_addr); | 136 | pages[i] = virt_to_page(buf->virt_addr); |
| 129 | } | 137 | } |
| 138 | spin_lock_irqsave(&s->spin_lock, flags); | ||
| 130 | bm->n_pages = i; | 139 | bm->n_pages = i; |
| 140 | spin_unlock_irqrestore(&s->spin_lock, flags); | ||
| 131 | 141 | ||
| 132 | /* vmap the prealloc_buf if all the pages were allocated */ | 142 | /* vmap the prealloc_buf if all the pages were allocated */ |
| 133 | if (i == n_pages) | 143 | if (i == n_pages) |
| @@ -150,6 +160,29 @@ int comedi_buf_map_put(struct comedi_buf_map *bm) | |||
| 150 | return 1; | 160 | return 1; |
| 151 | } | 161 | } |
| 152 | |||
