usb/media/pvrusb2: warning in pvr2_send_request_ex/usb_submit_urb

2017-09-20 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). There seems to be no check on endpoint type before submitting bulk urb in pvr2_send_request_ex(). usb 1-1: New USB device found, idVendor=2040, idProduct=7500

usb/media/pvrusb2: warning in pvr2_send_request_ex/usb_submit_urb

2017-09-20 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). There seems to be no check on endpoint type before submitting bulk urb in pvr2_send_request_ex(). usb 1-1: New USB device found, idVendor=2040, idProduct=7500

Re: [PATCH 2/3] drm/panel: add Kingdisplay kd097d04 panel driver

2017-09-20 Thread Sean Paul
On Mon, Sep 18, 2017 at 04:40:01PM +0800, Nickey Yang wrote: > Support Kingdisplay kd097d04 9.7" 1536x2048 TFT LCD panel, > it is a MIPI DSI panel. > > Signed-off-by: Nickey Yang Hi Nickey, This patch doesn't apply cleanly to drm-misc-next and the encoding is set to

Re: [PATCH 2/3] drm/panel: add Kingdisplay kd097d04 panel driver

2017-09-20 Thread Sean Paul
On Mon, Sep 18, 2017 at 04:40:01PM +0800, Nickey Yang wrote: > Support Kingdisplay kd097d04 9.7" 1536x2048 TFT LCD panel, > it is a MIPI DSI panel. > > Signed-off-by: Nickey Yang Hi Nickey, This patch doesn't apply cleanly to drm-misc-next and the encoding is set to 'y' instead of 'UTF-8'. >

Re: [PATCH v2] Input: adxl34x - fix gcc-7 -Wint-in-bool-context warning

2017-09-20 Thread Dmitry Torokhov
On Mon, Jul 17, 2017 at 01:43:51PM +0200, Arnd Bergmann wrote: > FIFO_MODE is an macro expression with a '<<' operator, which > gcc points out could be misread as a '<': > > drivers/input/misc/adxl34x.c: In function 'adxl34x_probe': > drivers/input/misc/adxl34x.c:799:36: error: '<<' in boolean

Re: [PATCH v2] Input: adxl34x - fix gcc-7 -Wint-in-bool-context warning

2017-09-20 Thread Dmitry Torokhov
On Mon, Jul 17, 2017 at 01:43:51PM +0200, Arnd Bergmann wrote: > FIFO_MODE is an macro expression with a '<<' operator, which > gcc points out could be misread as a '<': > > drivers/input/misc/adxl34x.c: In function 'adxl34x_probe': > drivers/input/misc/adxl34x.c:799:36: error: '<<' in boolean

[PATCH 3/3] [media] dvb-ttusb-budget: Adjust eight checks for null pointers

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 20 Sep 2017 20:53:13 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus

[PATCH 3/3] [media] dvb-ttusb-budget: Adjust eight checks for null pointers

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 20 Sep 2017 20:53:13 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus fix the affected source code

[PATCH 2/3] [media] dvb-ttusb-budget: Improve two size determinations in ttusb_probe()

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 20 Sep 2017 20:46:11 +0200 * The script "checkpatch.pl" pointed information out like the following. ERROR: do not use assignment in if condition Thus fix an affected source code place. * Replace the specification of data

[PATCH 2/3] [media] dvb-ttusb-budget: Improve two size determinations in ttusb_probe()

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 20 Sep 2017 20:46:11 +0200 * The script "checkpatch.pl" pointed information out like the following. ERROR: do not use assignment in if condition Thus fix an affected source code place. * Replace the specification of data structures by variable references

[PATCH 1/3] [media] dvb-ttusb-budget: Use common error handling code in ttusb_probe()

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 20 Sep 2017 20:25:24 +0200 Add two jump targets so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring

[PATCH 1/3] [media] dvb-ttusb-budget: Use common error handling code in ttusb_probe()

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 20 Sep 2017 20:25:24 +0200 Add two jump targets so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH 0/3] [media] TTUSB DVB Budget: Fine-tuning for three function implementations

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 20 Sep 2017 21:03:45 +0200 Three update suggestions were taken into account from static source code analysis. Markus Elfring (3): Use common error handling code in ttusb_probe() Improve two size determinations in ttusb_probe()

[PATCH 0/3] [media] TTUSB DVB Budget: Fine-tuning for three function implementations

2017-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 20 Sep 2017 21:03:45 +0200 Three update suggestions were taken into account from static source code analysis. Markus Elfring (3): Use common error handling code in ttusb_probe() Improve two size determinations in ttusb_probe() Adjust eight checks for null

[PATCH 2/2] mm: oom: show unreclaimable slab info when kernel panic

2017-09-20 Thread Yang Shi
Kernel may panic when oom happens without killable process sometimes it is caused by huge unreclaimable slabs used by kernel. Altough kdump could help debug such problem, however, kdump is not available on all architectures and it might be malfunction sometime. And, since kernel already panic it

[PATCH 2/2] mm: oom: show unreclaimable slab info when kernel panic

2017-09-20 Thread Yang Shi
Kernel may panic when oom happens without killable process sometimes it is caused by huge unreclaimable slabs used by kernel. Altough kdump could help debug such problem, however, kdump is not available on all architectures and it might be malfunction sometime. And, since kernel already panic it

[PATCH 1/2] tools: slabinfo: add "-U" option to show unreclaimable slabs only

2017-09-20 Thread Yang Shi
Add "-U" option to show unreclaimable slabs only. "-U" and "-S" together can tell us what unreclaimable slabs use the most memory to help debug huge unreclaimable slabs issue. Signed-off-by: Yang Shi Acked-by: Christoph Lameter --- tools/vm/slabinfo.c |

[PATCH 1/2] tools: slabinfo: add "-U" option to show unreclaimable slabs only

2017-09-20 Thread Yang Shi
Add "-U" option to show unreclaimable slabs only. "-U" and "-S" together can tell us what unreclaimable slabs use the most memory to help debug huge unreclaimable slabs issue. Signed-off-by: Yang Shi Acked-by: Christoph Lameter --- tools/vm/slabinfo.c | 11 ++- 1 file changed, 10

[RFC v3] oom: capture unreclaimable slab info in oom message when kernel panic

2017-09-20 Thread Yang Shi
Recently we ran into a oom issue, kernel panic due to no killable process. The dmesg shows huge unreclaimable slabs used almost 100% memory, but kdump doesn't capture vmcore due to some reason. So, it may sound better to capture unreclaimable slab info in oom message when kernel panic to aid

[RFC v3] oom: capture unreclaimable slab info in oom message when kernel panic

2017-09-20 Thread Yang Shi
Recently we ran into a oom issue, kernel panic due to no killable process. The dmesg shows huge unreclaimable slabs used almost 100% memory, but kdump doesn't capture vmcore due to some reason. So, it may sound better to capture unreclaimable slab info in oom message when kernel panic to aid

Re: [PATCH v7] blktrace: Fix potentail deadlock between delete & sysfs ops

2017-09-20 Thread Jens Axboe
On 09/20/2017 11:32 AM, Steven Rostedt wrote: > > Christoph, > > Can you give an acked-by for this patch? > > Jens, > > You want to take this through your tree, or do you want me to? > > If you want it, here's my: > > Acked-by: Steven Rostedt (VMware) I'll take it

Re: [PATCH v7] blktrace: Fix potentail deadlock between delete & sysfs ops

2017-09-20 Thread Jens Axboe
On 09/20/2017 11:32 AM, Steven Rostedt wrote: > > Christoph, > > Can you give an acked-by for this patch? > > Jens, > > You want to take this through your tree, or do you want me to? > > If you want it, here's my: > > Acked-by: Steven Rostedt (VMware) I'll take it through my tree, and I'll

Re: [PATCH v7] blktrace: Fix potentail deadlock between delete & sysfs ops

2017-09-20 Thread Waiman Long
On 09/20/2017 01:35 PM, Christoph Hellwig wrote: >> +/* >> + * When reading or writing the blktrace sysfs files, the references to the >> + * opened sysfs or device files should prevent the underlying block device >> + * from being removed. So no further delete protection is really needed. >> + *

Re: [PATCH v7] blktrace: Fix potentail deadlock between delete & sysfs ops

2017-09-20 Thread Waiman Long
On 09/20/2017 01:35 PM, Christoph Hellwig wrote: >> +/* >> + * When reading or writing the blktrace sysfs files, the references to the >> + * opened sysfs or device files should prevent the underlying block device >> + * from being removed. So no further delete protection is really needed. >> + *

usb/media/smsusb: null-ptr-deref in smsusb_init_device

2017-09-20 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). The null-ptr-deref happens on dev->udev->ep_in[1]->desc.wMaxPacketSize. There seems to be no check on the number of endpoints. usb 1-1: New USB device found,

usb/media/smsusb: null-ptr-deref in smsusb_init_device

2017-09-20 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). The null-ptr-deref happens on dev->udev->ep_in[1]->desc.wMaxPacketSize. There seems to be no check on the number of endpoints. usb 1-1: New USB device found,

[RFC PATCH v5 2/6] i2c: add helpers to ease DMA handling

2017-09-20 Thread Wolfram Sang
One helper checks if DMA is suitable and optionally creates a bounce buffer, if not. The other function returns the bounce buffer and makes sure the data is properly copied back to the message. Signed-off-by: Wolfram Sang --- drivers/i2c/i2c-core-base.c | 45

[RFC PATCH v5 2/6] i2c: add helpers to ease DMA handling

2017-09-20 Thread Wolfram Sang
One helper checks if DMA is suitable and optionally creates a bounce buffer, if not. The other function returns the bounce buffer and makes sure the data is properly copied back to the message. Signed-off-by: Wolfram Sang --- drivers/i2c/i2c-core-base.c | 45

[RFC PATCH v5 3/6] i2c: add docs to clarify DMA handling

2017-09-20 Thread Wolfram Sang
Signed-off-by: Wolfram Sang --- Documentation/i2c/DMA-considerations | 58 1 file changed, 58 insertions(+) create mode 100644 Documentation/i2c/DMA-considerations diff --git a/Documentation/i2c/DMA-considerations

[RFC PATCH v5 3/6] i2c: add docs to clarify DMA handling

2017-09-20 Thread Wolfram Sang
Signed-off-by: Wolfram Sang --- Documentation/i2c/DMA-considerations | 58 1 file changed, 58 insertions(+) create mode 100644 Documentation/i2c/DMA-considerations diff --git a/Documentation/i2c/DMA-considerations b/Documentation/i2c/DMA-considerations new

[RFC PATCH v5 4/6] i2c: sh_mobile: use helper to decide if DMA is useful

2017-09-20 Thread Wolfram Sang
This ensures that we fall back to PIO if the message length is too small for DMA being useful. Otherwise, we use DMA. A bounce buffer might be applied by the helper if the original message buffer is not DMA safe. Signed-off-by: Wolfram Sang ---

[RFC PATCH v5 4/6] i2c: sh_mobile: use helper to decide if DMA is useful

2017-09-20 Thread Wolfram Sang
This ensures that we fall back to PIO if the message length is too small for DMA being useful. Otherwise, we use DMA. A bounce buffer might be applied by the helper if the original message buffer is not DMA safe. Signed-off-by: Wolfram Sang --- drivers/i2c/busses/i2c-sh_mobile.c | 8 ++-- 1

[RFC PATCH v5 5/6] i2c: rcar: skip DMA if buffer is not safe

2017-09-20 Thread Wolfram Sang
This HW is prone to races, so it needs to setup new messages in irq context. That means we can't alloc bounce buffers if a message buffer is not DMA safe. So, in that case, simply fall back to PIO. Signed-off-by: Wolfram Sang --- drivers/i2c/busses/i2c-rcar.c |

[RFC PATCH v5 5/6] i2c: rcar: skip DMA if buffer is not safe

2017-09-20 Thread Wolfram Sang
This HW is prone to races, so it needs to setup new messages in irq context. That means we can't alloc bounce buffers if a message buffer is not DMA safe. So, in that case, simply fall back to PIO. Signed-off-by: Wolfram Sang --- drivers/i2c/busses/i2c-rcar.c | 2 +- 1 file changed, 1

[RFC PATCH v5 6/6] i2c: dev: mark RDWR buffers as DMA_SAFE

2017-09-20 Thread Wolfram Sang
Signed-off-by: Wolfram Sang --- drivers/i2c/i2c-dev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c index 6f638bbc922db4..bbc7aadb4c899d 100644 --- a/drivers/i2c/i2c-dev.c +++ b/drivers/i2c/i2c-dev.c @@

[RFC PATCH v5 6/6] i2c: dev: mark RDWR buffers as DMA_SAFE

2017-09-20 Thread Wolfram Sang
Signed-off-by: Wolfram Sang --- drivers/i2c/i2c-dev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c index 6f638bbc922db4..bbc7aadb4c899d 100644 --- a/drivers/i2c/i2c-dev.c +++ b/drivers/i2c/i2c-dev.c @@ -280,6 +280,8 @@ static noinline int

[RFC PATCH v5 0/6] i2c: document DMA handling and add helpers for it

2017-09-20 Thread Wolfram Sang
So, after revisiting old mail threads, taking part in a similar discussion on the USB list, and implementing a not-convincing solution before, here is what I cooked up to document and ease DMA handling for I2C within Linux. Please have a look at the documentation introduced in patch 3 for details.

[RFC PATCH v5 1/6] i2c: add a message flag for DMA safe buffers

2017-09-20 Thread Wolfram Sang
I2C has no requirement that the buffer of a message needs to be DMA safe. In case it is, it can now be flagged, so drivers wishing to do DMA can use the buffer directly. Signed-off-by: Wolfram Sang --- include/uapi/linux/i2c.h | 3 +++ 1 file changed, 3

[RFC PATCH v5 0/6] i2c: document DMA handling and add helpers for it

2017-09-20 Thread Wolfram Sang
So, after revisiting old mail threads, taking part in a similar discussion on the USB list, and implementing a not-convincing solution before, here is what I cooked up to document and ease DMA handling for I2C within Linux. Please have a look at the documentation introduced in patch 3 for details.

[RFC PATCH v5 1/6] i2c: add a message flag for DMA safe buffers

2017-09-20 Thread Wolfram Sang
I2C has no requirement that the buffer of a message needs to be DMA safe. In case it is, it can now be flagged, so drivers wishing to do DMA can use the buffer directly. Signed-off-by: Wolfram Sang --- include/uapi/linux/i2c.h | 3 +++ 1 file changed, 3 insertions(+) diff --git

usb/media/cx231xx: null-ptr-deref in cx231xx_usb_probe

2017-09-20 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). The null-ptr-deref happens on assoc_desc->bFirstInterface, where assoc_desc = udev->actconfig->intf_assoc[0]. There seems to be no check that the device

usb/media/cx231xx: null-ptr-deref in cx231xx_usb_probe

2017-09-20 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). The null-ptr-deref happens on assoc_desc->bFirstInterface, where assoc_desc = udev->actconfig->intf_assoc[0]. There seems to be no check that the device

Re: [PATCH v5 2/2] tracing: Add support for preempt and irq enable/disable events

2017-09-20 Thread Joel Fernandes
On Wed, Sep 20, 2017 at 11:23 AM, Steven Rostedt wrote: > On Tue, 12 Sep 2017 11:11:09 -0700 > Joel Fernandes wrote: > >> Preempt and irq trace events can be used for tracing the start and >> end of an atomic section which can be used by a trace viewer

Re: [PATCH v5 2/2] tracing: Add support for preempt and irq enable/disable events

2017-09-20 Thread Joel Fernandes
On Wed, Sep 20, 2017 at 11:23 AM, Steven Rostedt wrote: > On Tue, 12 Sep 2017 11:11:09 -0700 > Joel Fernandes wrote: > >> Preempt and irq trace events can be used for tracing the start and >> end of an atomic section which can be used by a trace viewer like >> systrace to graphically view the

[PATCH] crypto: bcm: use of_device_get_match_data

2017-09-20 Thread Corentin Labbe
The usage of of_device_get_match_data reduce the code size a bit. Furthermore, it prevents an improbable dereference when of_match_device() return NULL. Signed-off-by: Corentin Labbe --- drivers/crypto/bcm/cipher.c | 7 ++- 1 file changed, 2 insertions(+), 5

[PATCH] crypto: bcm: use of_device_get_match_data

2017-09-20 Thread Corentin Labbe
The usage of of_device_get_match_data reduce the code size a bit. Furthermore, it prevents an improbable dereference when of_match_device() return NULL. Signed-off-by: Corentin Labbe --- drivers/crypto/bcm/cipher.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git

Re: [RFC PATCH v4 3/6] i2c: add docs to clarify DMA handling

2017-09-20 Thread Wolfram Sang
> In order to avoid that, and to place them into a box using monotonic fonts, > I usually add "::" at the preceding line, e. g.: Just in time: I added the '::' and will resubmit the new version in a minute. Thanks for the pointers! signature.asc Description: PGP signature

Re: [RFC PATCH v4 3/6] i2c: add docs to clarify DMA handling

2017-09-20 Thread Wolfram Sang
> In order to avoid that, and to place them into a box using monotonic fonts, > I usually add "::" at the preceding line, e. g.: Just in time: I added the '::' and will resubmit the new version in a minute. Thanks for the pointers! signature.asc Description: PGP signature

Re: Vibrations in input vs. LED was Re: [PATCH v2 0/3] led: ledtrig-transient: add support for hrtimer

2017-09-20 Thread Jacek Anaszewski
Hi, On 09/20/2017 01:15 PM, Pavel Machek wrote: > On Mon 2017-09-18 22:43:40, Jacek Anaszewski wrote: >> Hi, >> >> On 09/17/2017 07:50 PM, Pavel Machek wrote: >>> Hi! >>> >> Do you think such an improvement could be harmful in some way, >> even if it was made optional? > > Of

Re: Vibrations in input vs. LED was Re: [PATCH v2 0/3] led: ledtrig-transient: add support for hrtimer

2017-09-20 Thread Jacek Anaszewski
Hi, On 09/20/2017 01:15 PM, Pavel Machek wrote: > On Mon 2017-09-18 22:43:40, Jacek Anaszewski wrote: >> Hi, >> >> On 09/17/2017 07:50 PM, Pavel Machek wrote: >>> Hi! >>> >> Do you think such an improvement could be harmful in some way, >> even if it was made optional? > > Of

[PATCH] crypto: omap: use of_device_get_match_data

2017-09-20 Thread Corentin Labbe
The usage of of_device_get_match_data reduce the code size a bit. Furthermore, it prevents an improbable dereference when of_match_device() return NULL. Signed-off-by: Corentin Labbe --- drivers/crypto/omap-aes.c | 7 ++- drivers/crypto/omap-des.c | 7 ++-

[PATCH] crypto: omap: use of_device_get_match_data

2017-09-20 Thread Corentin Labbe
The usage of of_device_get_match_data reduce the code size a bit. Furthermore, it prevents an improbable dereference when of_match_device() return NULL. Signed-off-by: Corentin Labbe --- drivers/crypto/omap-aes.c | 7 ++- drivers/crypto/omap-des.c | 7 ++- drivers/crypto/omap-sham.c |

Re: [PATCH] seccomp: fix the usage of get/put_seccomp_filter() in seccomp_get_filter()

2017-09-20 Thread Kees Cook
On Wed, Sep 20, 2017 at 6:04 AM, Oleg Nesterov wrote: > On 09/20, Oleg Nesterov wrote: >> >> @@ -908,13 +912,13 @@ long seccomp_get_filter(struct task_struct *task, >> unsigned long filter_off, >> if (!data) >> goto out; >> >> - get_seccomp_filter(task);

Re: [PATCH] seccomp: fix the usage of get/put_seccomp_filter() in seccomp_get_filter()

2017-09-20 Thread Kees Cook
On Wed, Sep 20, 2017 at 6:04 AM, Oleg Nesterov wrote: > On 09/20, Oleg Nesterov wrote: >> >> @@ -908,13 +912,13 @@ long seccomp_get_filter(struct task_struct *task, >> unsigned long filter_off, >> if (!data) >> goto out; >> >> - get_seccomp_filter(task); >> +

Re: [PATCH v2] vfs: introduce UMOUNT_WAIT which waits for umount completion

2017-09-20 Thread Al Viro
On Wed, Sep 20, 2017 at 10:38:31AM -0700, Jaegeuk Kim wrote: > This patch introduces UMOUNT_WAIT flag for umount(2) which let user wait for > umount(2) to complete filesystem shutdown. This should fix a kernel panic > triggered when a living filesystem tries to access dead block device after >

Re: [PATCH v2] vfs: introduce UMOUNT_WAIT which waits for umount completion

2017-09-20 Thread Al Viro
On Wed, Sep 20, 2017 at 10:38:31AM -0700, Jaegeuk Kim wrote: > This patch introduces UMOUNT_WAIT flag for umount(2) which let user wait for > umount(2) to complete filesystem shutdown. This should fix a kernel panic > triggered when a living filesystem tries to access dead block device after >

Re: [PATCH] drm/i915: remove redundant variable hw_check

2017-09-20 Thread Daniel Vetter
On Thu, Sep 14, 2017 at 08:28:37PM +0100, Chris Wilson wrote: > Quoting Colin King (2017-09-14 17:21:54) > > From: Colin Ian King > > > > hw_check is being assigned and updated but is no longer being read, > > hence it is redundant and can be removed. > > > > Detected

Re: [PATCH] drm/i915: remove redundant variable hw_check

2017-09-20 Thread Daniel Vetter
On Thu, Sep 14, 2017 at 08:28:37PM +0100, Chris Wilson wrote: > Quoting Colin King (2017-09-14 17:21:54) > > From: Colin Ian King > > > > hw_check is being assigned and updated but is no longer being read, > > hence it is redundant and can be removed. > > > > Detected by clang scan-build: > >

usb/net/p54: trying to register non-static key in p54_unregister_leds

2017-09-20 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 1 PID: 1404 Comm:

usb/net/p54: trying to register non-static key in p54_unregister_leds

2017-09-20 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 1 PID: 1404 Comm:

Re: [PATCH] seccomp: fix the usage of get/put_seccomp_filter() in seccomp_get_filter()

2017-09-20 Thread Kees Cook
On Wed, Sep 20, 2017 at 5:56 AM, Oleg Nesterov wrote: > As Chris explains, get_seccomp_filter() and put_seccomp_filter() can > use the different filters, once we drop ->siglock task->seccomp.filter > can be replaced by SECCOMP_FILTER_FLAG_TSYNC. > > Fixes: f8e529ed941b ("seccomp,

Re: [PATCH] seccomp: fix the usage of get/put_seccomp_filter() in seccomp_get_filter()

2017-09-20 Thread Kees Cook
On Wed, Sep 20, 2017 at 5:56 AM, Oleg Nesterov wrote: > As Chris explains, get_seccomp_filter() and put_seccomp_filter() can > use the different filters, once we drop ->siglock task->seccomp.filter > can be replaced by SECCOMP_FILTER_FLAG_TSYNC. > > Fixes: f8e529ed941b ("seccomp, ptrace: add

[PATCH] crypto: stm32: use of_device_get_match_data

2017-09-20 Thread Corentin Labbe
The usage of of_device_get_match_data reduce the code size a bit. Furthermore, it prevents an improbable dereference when of_match_device() return NULL. Signed-off-by: Corentin Labbe --- drivers/crypto/stm32/stm32-hash.c | 7 ++- 1 file changed, 2 insertions(+), 5

Re: [PATCH] drm/vmwgfx: remove DRM_ERROR message, stops log spamming

2017-09-20 Thread Daniel Vetter
On Tue, Sep 12, 2017 at 06:54:45PM +0100, Emil Velikov wrote: > On 12 September 2017 at 18:47, Colin Ian King > wrote: > > On 12/09/17 18:42, Thomas Hellstrom wrote: > >> Hi, Colin, > >> > >> On 09/12/2017 07:35 PM, Colin King wrote: > >>> From: Colin Ian King

[PATCH] crypto: stm32: use of_device_get_match_data

2017-09-20 Thread Corentin Labbe
The usage of of_device_get_match_data reduce the code size a bit. Furthermore, it prevents an improbable dereference when of_match_device() return NULL. Signed-off-by: Corentin Labbe --- drivers/crypto/stm32/stm32-hash.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git

Re: [PATCH] drm/vmwgfx: remove DRM_ERROR message, stops log spamming

2017-09-20 Thread Daniel Vetter
On Tue, Sep 12, 2017 at 06:54:45PM +0100, Emil Velikov wrote: > On 12 September 2017 at 18:47, Colin Ian King > wrote: > > On 12/09/17 18:42, Thomas Hellstrom wrote: > >> Hi, Colin, > >> > >> On 09/12/2017 07:35 PM, Colin King wrote: > >>> From: Colin Ian King > >>> > >>> mmap'ing the device

Re: usb/gadget: null-ptr-deref in dev_ioctl

2017-09-20 Thread Andrey Konovalov
On Wed, Sep 20, 2017 at 7:59 PM, Alan Stern wrote: > On Mon, 11 Sep 2017, Andrey Konovalov wrote: > >> Hi! >> >> It seems that gadget->ops can be NULL so it probably needs to be >> checked as well as gadget->ops->ioctl in dev_ioctl() in >>

Re: usb/gadget: null-ptr-deref in dev_ioctl

2017-09-20 Thread Andrey Konovalov
On Wed, Sep 20, 2017 at 7:59 PM, Alan Stern wrote: > On Mon, 11 Sep 2017, Andrey Konovalov wrote: > >> Hi! >> >> It seems that gadget->ops can be NULL so it probably needs to be >> checked as well as gadget->ops->ioctl in dev_ioctl() in >> drivers/usb/gadget/legacy/inode.c. > > Actually, I

Re: [PATCH 1/1] userfaultfd: non-cooperative: fix fork use after free

2017-09-20 Thread Greg KH
On Wed, Sep 20, 2017 at 08:04:13PM +0200, Andrea Arcangeli wrote: > When reading the event from the uffd, we put it on a temporary > fork_event list to detect if we can still access it after releasing > and retaking the event_wqh.lock. > > If fork aborts and removes the event from the fork_event

Re: [PATCH 1/1] userfaultfd: non-cooperative: fix fork use after free

2017-09-20 Thread Greg KH
On Wed, Sep 20, 2017 at 08:04:13PM +0200, Andrea Arcangeli wrote: > When reading the event from the uffd, we put it on a temporary > fork_event list to detect if we can still access it after releasing > and retaking the event_wqh.lock. > > If fork aborts and removes the event from the fork_event

[PATCH v2 0/3] Altera ASMI Parallel II IP Core

2017-09-20 Thread matthew . gerlach
From: Matthew Gerlach This patch set adds a spi-nor flash driver for the Altera ASMI Parallel II IP Core. This driver was created based on feedback from Marek Vasut, Cyrill Pitchen, and Michal Suchanek regarding Version 2 of the Altera Quadspi Controller:

[PATCH v2 0/3] Altera ASMI Parallel II IP Core

2017-09-20 Thread matthew . gerlach
From: Matthew Gerlach This patch set adds a spi-nor flash driver for the Altera ASMI Parallel II IP Core. This driver was created based on feedback from Marek Vasut, Cyrill Pitchen, and Michal Suchanek regarding Version 2 of the Altera Quadspi Controller: https://lkml.org/lkml/2017/6/26/518

[PATCH v2 2/3] mtd: spi-nor: Altera ASMI Parallel II IP Core

2017-09-20 Thread matthew . gerlach
From: Matthew Gerlach This patch adds support for a spi-nor, platform driver for the Altera ASMI Parallel II IP Core. The intended use case is to be able to update the flash used to load a FPGA at power up with mtd-utils. Signed-off-by: Matthew Gerlach

[PATCH v2 2/3] mtd: spi-nor: Altera ASMI Parallel II IP Core

2017-09-20 Thread matthew . gerlach
From: Matthew Gerlach This patch adds support for a spi-nor, platform driver for the Altera ASMI Parallel II IP Core. The intended use case is to be able to update the flash used to load a FPGA at power up with mtd-utils. Signed-off-by: Matthew Gerlach --- v2: minor checkpatch fixing by

[PATCH v2 3/3] mtd: spi-nor: add flag for reading dummy cycles from nv cfg reg

2017-09-20 Thread matthew . gerlach
From: Matthew Gerlach This patch is a work around for some non-standard behavior of EPCQ flash parts: https://www.altera.com/documentation/wtw1396921531042.html#wtw1396921651224 These flash parts are generally used to configure Intel/Altera FPGAs on power up.

[PATCH v2 3/3] mtd: spi-nor: add flag for reading dummy cycles from nv cfg reg

2017-09-20 Thread matthew . gerlach
From: Matthew Gerlach This patch is a work around for some non-standard behavior of EPCQ flash parts: https://www.altera.com/documentation/wtw1396921531042.html#wtw1396921651224 These flash parts are generally used to configure Intel/Altera FPGAs on power up. These parts report a JEDEC id of

[PATCH v2 1/3] dt-bindings: mtd: Altera ASMI Parallel II IP Core

2017-09-20 Thread matthew . gerlach
From: Matthew Gerlach Device Tree bindings for Altera ASMI Parallel II IP Core connected to a flash chip. Signed-off-by: Matthew Gerlach --- v2: Made substitutions suggested by Rob Herring. Emphasize driver expects

[PATCH v2 1/3] dt-bindings: mtd: Altera ASMI Parallel II IP Core

2017-09-20 Thread matthew . gerlach
From: Matthew Gerlach Device Tree bindings for Altera ASMI Parallel II IP Core connected to a flash chip. Signed-off-by: Matthew Gerlach --- v2: Made substitutions suggested by Rob Herring. Emphasize driver expects controller is connected to spi-nor flash. ---

Re: [PATCH 08/20] lightnvm: pblk: sched. metadata on write thread

2017-09-20 Thread Rakesh Pandit
Hi Javier, one small issue I found for error path while going through changes: On Mon, Jun 26, 2017 at 11:57:17AM +0200, Javier González wrote: .. > +static int pblk_lines_alloc_metadata(struct pblk *pblk) > +{ > + struct pblk_line_mgmt *l_mg = >l_mg; > + struct pblk_line_meta *lm = >lm;

Re: [PATCH 08/20] lightnvm: pblk: sched. metadata on write thread

2017-09-20 Thread Rakesh Pandit
Hi Javier, one small issue I found for error path while going through changes: On Mon, Jun 26, 2017 at 11:57:17AM +0200, Javier González wrote: .. > +static int pblk_lines_alloc_metadata(struct pblk *pblk) > +{ > + struct pblk_line_mgmt *l_mg = >l_mg; > + struct pblk_line_meta *lm = >lm;

Re: [RFC][PATCH v2 7/7] checkpatch: add pF/pf deprecation warning

2017-09-20 Thread Joe Perches
On Wed, 2017-09-20 at 19:53 +0200, Helge Deller wrote: > On 20.09.2017 19:38, Joe Perches wrote: > > On Thu, 2017-09-21 at 01:29 +0900, Sergey Senozhatsky wrote: > > > We deprecated '%pF/%pf' printk specifiers, since '%pS/%ps' is now smart > > > enough to handle function pointer dereference on

Re: [RFC][PATCH v2 7/7] checkpatch: add pF/pf deprecation warning

2017-09-20 Thread Joe Perches
On Wed, 2017-09-20 at 19:53 +0200, Helge Deller wrote: > On 20.09.2017 19:38, Joe Perches wrote: > > On Thu, 2017-09-21 at 01:29 +0900, Sergey Senozhatsky wrote: > > > We deprecated '%pF/%pf' printk specifiers, since '%pS/%ps' is now smart > > > enough to handle function pointer dereference on

Re: [PATCH v5 05/10] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-09-20 Thread Corentin Labbe
On Tue, Sep 19, 2017 at 09:49:52PM -0500, Rob Herring wrote: > On Thu, Sep 14, 2017 at 2:19 PM, Andrew Lunn wrote: > >> > Is the MDIO controller "allwinner,sun8i-h3-emac" or "snps,dwmac-mdio"? > >> > If the latter, then I think the node is fine, but then the mux should be > >> > a

Re: [PATCH v5 05/10] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY

2017-09-20 Thread Corentin Labbe
On Tue, Sep 19, 2017 at 09:49:52PM -0500, Rob Herring wrote: > On Thu, Sep 14, 2017 at 2:19 PM, Andrew Lunn wrote: > >> > Is the MDIO controller "allwinner,sun8i-h3-emac" or "snps,dwmac-mdio"? > >> > If the latter, then I think the node is fine, but then the mux should be > >> > a child node of

Re: [PATCH v5 2/2] tracing: Add support for preempt and irq enable/disable events

2017-09-20 Thread Steven Rostedt
On Tue, 12 Sep 2017 11:11:09 -0700 Joel Fernandes wrote: > Preempt and irq trace events can be used for tracing the start and > end of an atomic section which can be used by a trace viewer like > systrace to graphically view the start and end of an atomic section and >

Re: [PATCH v5 2/2] tracing: Add support for preempt and irq enable/disable events

2017-09-20 Thread Steven Rostedt
On Tue, 12 Sep 2017 11:11:09 -0700 Joel Fernandes wrote: > Preempt and irq trace events can be used for tracing the start and > end of an atomic section which can be used by a trace viewer like > systrace to graphically view the start and end of an atomic section and > correlate them with

Re: [RFC PATCH v4 3/6] i2c: add docs to clarify DMA handling

2017-09-20 Thread Mauro Carvalho Chehab
Em Wed, 20 Sep 2017 19:18:40 +0200 Wolfram Sang escreveu: > Hi Mauro, > > > > +Linux I2C and DMA > > > +- > > > > I would use, instead: > > > > = > > Linux I2C and DMA > > = > > > > As this is the way we're starting

Re: [RFC PATCH v4 3/6] i2c: add docs to clarify DMA handling

2017-09-20 Thread Mauro Carvalho Chehab
Em Wed, 20 Sep 2017 19:18:40 +0200 Wolfram Sang escreveu: > Hi Mauro, > > > > +Linux I2C and DMA > > > +- > > > > I would use, instead: > > > > = > > Linux I2C and DMA > > = > > > > As this is the way we're starting document titles, after

Re: Rough notes from sys_membarrier() lightning BoF

2017-09-20 Thread Andy Lutomirski
On Wed, Sep 20, 2017 at 11:13 AM, Mathieu Desnoyers wrote: > > - On Sep 20, 2017, at 12:02 PM, Andy Lutomirski l...@kernel.org wrote: > > > On Sun, Sep 17, 2017 at 3:36 PM, Paul E. McKenney > > wrote: > >> Hello! > >> > >> Rough

Re: Rough notes from sys_membarrier() lightning BoF

2017-09-20 Thread Andy Lutomirski
On Wed, Sep 20, 2017 at 11:13 AM, Mathieu Desnoyers wrote: > > - On Sep 20, 2017, at 12:02 PM, Andy Lutomirski l...@kernel.org wrote: > > > On Sun, Sep 17, 2017 at 3:36 PM, Paul E. McKenney > > wrote: > >> Hello! > >> > >> Rough notes from our discussion last Thursday. Please reply to the >

Re: Rough notes from sys_membarrier() lightning BoF

2017-09-20 Thread Mathieu Desnoyers
- On Sep 20, 2017, at 12:02 PM, Andy Lutomirski l...@kernel.org wrote: > On Sun, Sep 17, 2017 at 3:36 PM, Paul E. McKenney > wrote: >> Hello! >> >> Rough notes from our discussion last Thursday. Please reply to the >> group with any needed elaborations or

Re: Rough notes from sys_membarrier() lightning BoF

2017-09-20 Thread Mathieu Desnoyers
- On Sep 20, 2017, at 12:02 PM, Andy Lutomirski l...@kernel.org wrote: > On Sun, Sep 17, 2017 at 3:36 PM, Paul E. McKenney > wrote: >> Hello! >> >> Rough notes from our discussion last Thursday. Please reply to the >> group with any needed elaborations or corrections. >> >> Adding Andy and

Re: [v4,0/3] Workaround for bus/slot reset on Cavium cn8xxx root ports

2017-09-20 Thread Alex Williamson
On Tue, 12 Sep 2017 02:40:49 -0700 Vadim Lomovtsev wrote: > Hi all, > > Are there any updates on this ? > Comments/objections/acks/nacks ? > > WBBR, > Vadim > > On Fri, Sep 08, 2017 at 10:10:30AM +0200, Jan Glauber wrote: > > Using vfio-pci on a combination

Re: [v4,0/3] Workaround for bus/slot reset on Cavium cn8xxx root ports

2017-09-20 Thread Alex Williamson
On Tue, 12 Sep 2017 02:40:49 -0700 Vadim Lomovtsev wrote: > Hi all, > > Are there any updates on this ? > Comments/objections/acks/nacks ? > > WBBR, > Vadim > > On Fri, Sep 08, 2017 at 10:10:30AM +0200, Jan Glauber wrote: > > Using vfio-pci on a combination of cn8xxx and some PCI devices

Re: A patch slipped through the cracks?

2017-09-20 Thread Mauro Carvalho Chehab
Em Wed, 20 Sep 2017 19:17:17 +0200 Lubomir Rintel escreveu: > Hi, > > we're trying to get this reasonably trivial patch [1] applied for more > than a year and four attempts now. (I'm not including it in this > message so that this message won't be ignored for the same reason the

Re: A patch slipped through the cracks?

2017-09-20 Thread Mauro Carvalho Chehab
Em Wed, 20 Sep 2017 19:17:17 +0200 Lubomir Rintel escreveu: > Hi, > > we're trying to get this reasonably trivial patch [1] applied for more > than a year and four attempts now. (I'm not including it in this > message so that this message won't be ignored for the same reason the > submissions

[PATCH 1/1] userfaultfd: non-cooperative: fix fork use after free

2017-09-20 Thread Andrea Arcangeli
When reading the event from the uffd, we put it on a temporary fork_event list to detect if we can still access it after releasing and retaking the event_wqh.lock. If fork aborts and removes the event from the fork_event all is fine as long as we're still in the userfault read context and

[PATCH 1/1] userfaultfd: non-cooperative: fix fork use after free

2017-09-20 Thread Andrea Arcangeli
When reading the event from the uffd, we put it on a temporary fork_event list to detect if we can still access it after releasing and retaking the event_wqh.lock. If fork aborts and removes the event from the fork_event all is fine as long as we're still in the userfault read context and

[PATCH] ARM: davinci_all_defconfig: enable CMA options

2017-09-20 Thread Suman Anna
Enable the CMA and DMA_CMA Kconfig options by default for Davinci platforms. Davinci remoteproc driver is one of the modules that depends on these options, and this allows the driver to be made visible for selection with menuconfig. Signed-off-by: Suman Anna --- Hi Sekhar, Here's

[PATCH] ARM: davinci_all_defconfig: enable CMA options

2017-09-20 Thread Suman Anna
Enable the CMA and DMA_CMA Kconfig options by default for Davinci platforms. Davinci remoteproc driver is one of the modules that depends on these options, and this allows the driver to be made visible for selection with menuconfig. Signed-off-by: Suman Anna --- Hi Sekhar, Here's the patch that

<    3   4   5   6   7   8   9   10   11   12   >