[PATCH] net: tipc: prevent possible null deref of link

2020-12-07 Thread Cengiz Can
ry" line into if block to make sure that we're not in a state that `e->link` is null. Signed-off-by: Cengiz Can --- net/tipc/node.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/tipc/node.c b/net/tipc/node.c index c95d037fde51..83978d5dae59 100644 --- a/net/tipc/node.

[PATCH] media: vidtv: fix read after free

2020-11-30 Thread Cengiz Can
before free'ing Program Association Table and loop on it instead. Signed-off-by: Cengiz Can --- drivers/media/test-drivers/vidtv/vidtv_channel.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/test-drivers/vidtv/vidtv_channel.c b/drivers/media/test-drivers

[PATCH] dt-bindings: fsl-imx-drm: fix example compatible string

2020-11-13 Thread Cengiz Can
Example `display-subsystem` has an incorrect compatible string. Required properties section tells that developers should use "fsl,imx-display-subsystem" as "compatible" string but the example misses 'imx-' prefix. Change example to have correct "compatible" stri

Re: [PATCH] infiniband: remove unnecessary fallthrough usage

2020-08-31 Thread Cengiz Can
On 2020-08-31 18:34, Jason Gunthorpe wrote: On Mon, Aug 31, 2020 at 06:30:34PM +0300, Cengiz Can wrote: Since /* fallthrough */ comments are deprecated[1], they are being replaced by new 'fallthrough' pseudo-keyword. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html

[PATCH] infiniband: remove unnecessary fallthrough usage

2020-08-31 Thread Cengiz Can
by static analyzers, particularly in this case, Coverity Scanner. (CID 1466512) Remove unnecessary 'fallthrough' keywords to prevent dead code warnings. Signed-off-by: Cengiz Can --- drivers/infiniband/hw/qib/qib_mad.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/infiniband/hw/qib

[PATCH v2] staging: atomisp: Remove unnecessary 'fallthrough'

2020-08-31 Thread Cengiz Can
allthrough' is unreachable due to the adjacent 'return false' statement. (Coverity ID CID 1466511) In order to fix the unreachable code warning, remove unnecessary fallthrough keyword. Signed-off-by: Cengiz Can --- drivers/staging/media/atomisp/pci/atomisp_compat_css20.c | 1 - 1 file changed, 1 deletio

[PATCH] staging: atomisp: Fix fallthrough keyword warning

2020-08-31 Thread Cengiz Can
part of the previous if statement's else clause. Reported-by: Coverity Static Analyzer CID 1466511 Signed-off-by: Cengiz Can --- drivers/staging/media/atomisp/pci/atomisp_compat_css20.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_compa

Re: [PATCH v6] staging: atomisp: move null check to earlier point

2020-08-06 Thread Cengiz Can
On August 6, 2020 21:39:21 Greg KH wrote: On Thu, Aug 06, 2020 at 09:34:22PM +0300, Cengiz Can wrote: Hello Andy, Can I get some feedback on v6 please? It's been 4 days, in the middle of a merge window, please give people a chance to catch up on other things... I wasn't aware

Re: [PATCH v6] staging: atomisp: move null check to earlier point

2020-08-06 Thread Cengiz Can
Hello Andy, Can I get some feedback on v6 please? I hope it suits your standards this time. Thank you On August 2, 2020 01:02:22 Cengiz Can wrote: `find_gmin_subdev()` that returns a pointer to `struct gmin_subdev` can return NULL. In `gmin_v2p8_ctrl()` there's a call to this function

[PATCH v6] staging: atomisp: move null check to earlier point

2020-08-01 Thread Cengiz Can
= find_gmin_subdev(subdev); /* v--Dereferenced here */ if (gs->v2p8_gpio >= 0) { ... } With this change we're null checking `find_gmin_subdev()` result and we return an error if that's the case. We also WARN() for the sake of debugging. Signed-off-by: Cengiz Can Reported-by: Coverity

[PATCH v5] staging: atomisp: move null check to earlier point

2020-08-01 Thread Cengiz Can
= find_gmin_subdev(subdev); /* v--Dereferenced here */ if (gs->v2p8_gpio >= 0) { ... } With this change we're null checking `find_gmin_subdev()` result and we return an error if that's the case. We also WARN() for the sake of debugging. Signed-off-by: Cengiz Can Reported-by: Coverity

[PATCHi v4] staging: atomisp: move null check to earlier point

2020-08-01 Thread Cengiz Can
= find_gmin_subdev(subdev); /* v--Dereferenced here */ if (gs->v2p8_gpio >= 0) { ... } With this change we're null checking `find_gmin_subdev()` result and we return an error if that's the case. We also WARN() for the sake of debugging. Signed-off-by: Cengiz Can Reported-by: Coverity

[PATCH v3] staging: atomisp: move null check to earlier point

2020-08-01 Thread Cengiz Can
= find_gmin_subdev(subdev); /* v--Dereferenced here */ if (gs->v2p8_gpio >= 0) { ... } With this change we're null checking `find_gmin_subdev()` result and return we return an error if that's the case. We also WARN() for the sake of debugging. Signed-off-by: Cengiz Can Reported-by: Co

[PATCH v2] staging: atomisp: move null check to earlier point

2020-07-30 Thread Cengiz Can
result of `axp_regulator_set` or `gmin_i2c_write`. - return -EINVAL if unknown PMIC type. Caught-by: Coverity Static Analyzer CID 1465536 Signed-off-by: Cengiz Can --- drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

Re: [PATCH] staging: atomisp: move null check to earlier point

2020-07-30 Thread Cengiz Can
On July 30, 2020 11:48:06 Dan Carpenter wrote: On Wed, Jul 29, 2020 at 06:13:44PM +0300, Andy Shevchenko wrote: On Wed, Jul 29, 2020 at 5:00 PM Cengiz Can wrote: `find_gmin_subdev` function that returns a pointer to `struct gmin_subdev` can return NULL. In `gmin_v2p8_ctrl` there's

[PATCH] staging: atomisp: move null check to earlier point

2020-07-29 Thread Cengiz Can
if (!ret) ret = gpio_direction_output(gs->v2p8_gpio, 0); if (ret) pr_err("V2P8 GPIO initialization failed\n"); } ``` I have moved the NULL check before deref point. Caught-by: Coverity Static Analyzer CID 1465536 Signed-off-by: Cengi

Re: BUG: unable to handle kernel NULL pointer dereference in do_syscall_32_irqs_on

2020-07-27 Thread Cengiz Can
:407 > no_context+0x56b/0x9f0 arch/x86/mm/fault.c:695 > __bad_area_nosemaphore+0xa9/0x480 arch/x86/mm/fault.c:789 > do_user_addr_fault+0x8ce/0xd00 arch/x86/mm/fault.c:1258 > Lost 45 message(s)! > > > --- > This report is generated by a bot. It may contain errors. > See https://goo.gl/tpsmEJ for more information about syzbot. > syzbot engineers can be reached at syzkal...@googlegroups.com. > > syzbot will keep track of this issue. See: > https://goo.gl/tpsmEJ#status for how to communicate with syzbot. > syzbot can test patches for this issue, for details see: > https://goo.gl/tpsmEJ#testing-patches There's no C reproducer for this syzkaller report but I'm trying to reproduce it, in order to understand and possibly fix it if it's legit. Wanted to notify if anyone is already working on it or has an idea. Thank you Cengiz Can

Re: WARNING in __kernel_read

2020-07-23 Thread Cengiz Can
l from `p9_read_work` (and `p9_fd_read`) and since the `file->f_mode` does not contain FMODE_READ , a WARN_ON_ONCE is thrown. ``` if (WARN_ON_ONCE(!(file->f_mode & FMODE_READ))) return -EINVAL; ``` Can you help me understand what's wrong and fix this issue? Is it already being

Re: [PATCH v3] kdb: remove unnecessary null check of dbg_io_ops

2020-07-10 Thread Cengiz Can
time -- Cengiz Can @cengiz_io

[PATCH v3] kdb: remove unnecessary null check of dbg_io_ops

2020-06-30 Thread Cengiz Can
. Coverity scanner caught this as CID 1465042. I have removed the unnecessary null check and eliminated false-positive forward null dereference warning. Signed-off-by: Cengiz Can --- kernel/debug/kdb/kdb_io.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/kernel

Re: [PATCH v2] kdb: remove unnecessary null check of dbg_io_ops

2020-06-29 Thread Cengiz Can
On June 30, 2020 00:16:54 Doug Anderson wrote: Hi, On Mon, Jun 29, 2020 at 1:50 PM Cengiz Can wrote: `kdb_msg_write` operates on a global `struct kgdb_io *` called `dbg_io_ops`. It's initialized in `debug_core.c` and checked throughout the debug flow. There's a null check

[PATCH v2] kdb: remove unnecessary null check of dbg_io_ops

2020-06-29 Thread Cengiz Can
. Coverity scanner caught this as CID 1465042. I have removed the unnecessary null check and eliminated false-positive forward null dereference warning. Signed-off-by: Cengiz Can --- kernel/debug/kdb/kdb_io.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/kernel

[PATCH] kdb: prevent possible null deref in kdb_msg_write

2020-06-29 Thread Cengiz Can
have modified the function to bail out if `dbg_io_ops` is not properly initialized. Signed-off-by: Cengiz Can --- kernel/debug/kdb/kdb_io.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/kernel/debug/kdb/kdb_io.c b/kernel/debug/kdb/kdb_io.c index 683a799618ad

Re: [PATCH v2] i2c: i2c-mt65xx: fix NULL ptr dereference

2019-09-30 Thread Cengiz Can
On 2019-09-30 18:28, Fabien Parent wrote: Fixes: abf4923e97c3 ("i2c: mediatek: disable zero-length transfers for mt8183") Signed-off-by: Fabien Parent Reviewed-by: Cengiz Can

Re: [PATCH] i2c: pca954x: Add property to skip disabling PCA954x MUX device

2019-09-29 Thread Cengiz Can
ernel cannot > +* know this otherwise. > +*/ Can you please explain what a "mess up" is? And also, should we put this new DTS property in related default bindings? If not, are you planning a documentation update for the users to notify them about this? -- Cengiz Can

Re: [PATCH v2] i2c: update i2c-dev.h warning in documentation

2017-12-21 Thread Cengiz Can
> Applied to the docs tree, thanks. Note that the patch was wrapped by your > mailer and I had to fix it up; that would be nice to avoid in the future. Thank you! I've ditched claws-mail and will use git send-mail instead. -- Cengiz Can

Re: [PATCH v2] i2c: update i2c-dev.h warning in documentation

2017-12-21 Thread Cengiz Can
> Applied to the docs tree, thanks. Note that the patch was wrapped by your > mailer and I had to fix it up; that would be nice to avoid in the future. Thank you! I've ditched claws-mail and will use git send-mail instead. -- Cengiz Can

[PATCH] i2c: update i2c-dev.h warning in documentation

2017-12-09 Thread Cengiz Can
smbus.h") Thus, I've converted the warning paragraph into a historical note and updated the suggested header files. Signed-off-by: Cengiz Can <ceng...@gmail.com> --- Sorry for duplicate mails. My email client hard-wrapped previous patch. Thanks. Documentat

[PATCH] i2c: update i2c-dev.h warning in documentation

2017-12-09 Thread Cengiz Can
smbus.h") Thus, I've converted the warning paragraph into a historical note and updated the suggested header files. Signed-off-by: Cengiz Can --- Sorry for duplicate mails. My email client hard-wrapped previous patch. Thanks. Documentation/i2c/dev-interface | 29 -

[PATCH] i2c: update i2c-dev.h warning in documentation

2017-12-09 Thread Cengiz Can
smbus.h") Thus, I've converted the warning paragraph into a historical note and updated the suggested header files. Signed-off-by: Cengiz Can <ceng...@gmail.com> --- Documentation/i2c/dev-interface | 29 - 1 file changed, 16 insertions(+), 13 deletions(-) diff

[PATCH] i2c: update i2c-dev.h warning in documentation

2017-12-09 Thread Cengiz Can
smbus.h") Thus, I've converted the warning paragraph into a historical note and updated the suggested header files. Signed-off-by: Cengiz Can --- Documentation/i2c/dev-interface | 29 - 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/Documentation

unregister_netdevice: waiting for lo to become free. Usage count = 1

2017-11-26 Thread Cengiz Can
Hello! In case anyone wondering (like I did) if this is still an issue, it's not. It was fixed in 4.12.

unregister_netdevice: waiting for lo to become free. Usage count = 1

2017-11-26 Thread Cengiz Can
Hello! In case anyone wondering (like I did) if this is still an issue, it's not. It was fixed in 4.12.

[PATCH] hwmon: applesmc: fix deprecated hwmon_device_register call

2017-07-01 Thread Cengiz Can
11,2 with it. The warning is no longer shown. And the functionality doesn't seem to be broken. Thank you for reading this. Signed-off-by: Cengiz Can <ceng...@gmail.com> --- drivers/hwmon/applesmc.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/appl

[PATCH] hwmon: applesmc: fix deprecated hwmon_device_register call

2017-07-01 Thread Cengiz Can
11,2 with it. The warning is no longer shown. And the functionality doesn't seem to be broken. Thank you for reading this. Signed-off-by: Cengiz Can --- drivers/hwmon/applesmc.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon