On 1/14/25 10:41 AM, liuye wrote:
> Uninitialized variable: have_outer_privilege.
> Fix it.
Please improve the description. Explain how the current code
is wrong. After that add:
Reviewed-by: Muhammad Usama Anjum
>
> Signed-off-by: liuye
> ---
> tools/testing/self
On 1/9/25 10:42 PM, Kees Cook wrote:
> On Thu, Jan 09, 2025 at 10:38:27PM +0500, Muhammad Usama Anjum wrote:
>> Remove the following warnings by removing unused argc and argv
>> parameters:
>> In function ‘main’:
>> warning: unused parameter ‘argc’ [-Wunused-parameter
)) {
\
| ^~
hugetlb-madvise.c:114:9: note: in expansion of macro ‘validate_free_pages’
114 | validate_free_pages(free_hugepages - NR_HUGE_PAGES);
| ^~~
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/hugetlb-madvise.c | 2 +-
1 file changed, 1
Fix all the found type mismatch warnings.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/thuge-gen.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/mm/thuge-gen.c
b/tools/testing/selftests/mm/thuge-gen.c
index
Add the compiler flags to catch warnings during development.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/mm/Makefile
b/tools/testing/selftests/mm/Makefile
index 63ce39d024bb5
Fix all type mismatch warnings in all uffd-* files.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/uffd-common.c | 6 +++---
tools/testing/selftests/mm/uffd-stress.c | 2 +-
tools/testing/selftests/mm/uffd-unit-tests.c | 6 +++---
3 files changed, 7 insertions(+), 7
Fix type mismatch warnings.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/khugepaged.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tools/testing/selftests/mm/khugepaged.c
b/tools/testing/selftests/mm/khugepaged.c
index 8a4d34cce36b2
Fix variable type mismatch warnings.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/protection_keys.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tools/testing/selftests/mm/protection_keys.c
b/tools/testing/selftests/mm
Fix type mismatch warnings.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/hugetlb-read-hwpoison.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/mm/hugetlb-read-hwpoison.c
b/tools/testing/selftests/mm/hugetlb-read
Fix type mismatch warnings.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/hugepage-vmemmap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/mm/hugepage-vmemmap.c
b/tools/testing/selftests/mm/hugepage-vmemmap.c
index
Fix type mismatch warnings.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/guard-pages.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/mm/guard-pages.c
b/tools/testing/selftests/mm/guard-pages.c
index ece37212a8a2e
Fix following warnings:
- Remove unused variables
- Use __attribute__(unused) with unused variables which aren't being
used and cannot be removed because of function pointer declaration
- Fix type mismatches
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/cow.c
As default_hsize is unsigned, it is always greater than equal to zero.
Remove expression which is checking if it is less than 0.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/hmm-tests.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing
) \
| ~~~^~~
../kselftest_harness.h:152:25: note: in expansion of macro ‘__TEST_IMPL’
152 | #define TEST(test_name) __TEST_IMPL(test_name, -1)
| ^~~
mdwe_test.c:23:1: note: in expansion of macro ‘TEST’
23 | TEST(prctl_flags)
| ^~~~
Signed-off-by: Muhammad Usama Anjum
---
tools
Fix type mismatch warnings in different tests.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/compaction_test.c | 2 +-
tools/testing/selftests/mm/gup_longterm.c | 3 ++-
tools/testing/selftests/mm/hugetlb_dio.c | 2 +-
tools/testing
Fix unused parameter warnings.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/pkey-x86.h | 4 +++-
.../selftests/mm/pkey_sighandler_tests.c | 17 +++--
tools/testing/selftests/mm/protection_keys.c | 18 ++
3 files changed, 24
(int argc, char *argv[])
|~~^~
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/compaction_test.c | 2 +-
tools/testing/selftests/mm/cow.c | 2 +-
tools/testing/selftests/mm/droppable.c | 2 +-
tools/testing
Fix warnings generated by unused parameters.
Signed-off-by: Muhammad Usama Anjum
---
.../selftests/mm/hugetlb_fault_after_madv.c | 4 +-
.../selftests/mm/hugetlb_madv_vs_map.c| 6 +--
tools/testing/selftests/mm/ksm_tests.c| 17 +++---
tools/testing/selftests/mm
27;t being used. When I added them, I found tens of warnings in just
mm suite.
In this series, I'm fixing those warnings. The last check adds the
compiler flags with which the warnings have been caught.
Muhammad Usama Anjum (16):
selftests/mm: remove argc and argv unused parameters
se
Remove unused variable and fix type mismatches.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/mremap_test.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/tools/testing/selftests/mm/mremap_test.c
b/tools/testing/selftests/mm
Fix following warnings:
- Remove unused variables and fix following warnings:
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/mseal_test.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/mm/mseal_test.c
b/tools/testing
Fix following warnings caught by compiler:
- There are several type mismatches among different variables.
- Remove unused variable warnings.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/pagemap_ioctl.c | 108 +++--
tools/testing/selftests/mm/vm_util.c
27;t being used. When I added them, I found tens of warnings in just
mm suite.
In this series, I'm fixing those warnings in a few files. More fixes
would be sent later.
Muhammad Usama Anjum (4):
selftests/mm: thp_settings: remove const from return type
selftests/mm: pagemap_ioctl: Fix t
Remove cost from the return type as it is ignored anyways and generates
the warning:
warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
Signed-off-by: Muhammad Usama Anjum
---
Optional fixes tag.
Fixes: 00679a183ac6 ("selftests/mm: factor out thp set
27;t being used. When I added them, I found tens of warnings in just
mm suite.
In this series, I'm fixing those warnings in a few files. More fixes
would be sent later.
Muhammad Usama Anjum (4):
selftests/mm: thp_settings: remove const from return type
selftests/mm: pagemap_ioctl: Fix t
On 12/2/24 9:58 AM, zhangjiao2 wrote:
> From: zhang jiao
>
> Delete variables "msg" and "pid" that have never been used.
>
> Signed-off-by: zhang jiao
Reviewed-by: Muhammad Usama Anjum
> ---
> tools/testing/selftests/ipc/msgque.c | 2 +-
>
of the result with a single ksft_print_result() which incorporates
> the parameters passed into the test into the output.
>
> Fixes: fae1980347bf ("selftests: hugetlb_dio: fixup check for initial
> conditions to skip in the start")
> Signed-off-by: Mark Brown
Reviewed-by: Muhamm
diff --git a/tools/testing/selftests/kselftest/ktap_helpers.sh
>> b/tools/testing/selftests/kselftest/ktap_helpers.sh
>> index 79a125eb24c2..a4211221ccd6 100644
>> --- a/tools/testing/selftests/kselftest/ktap_helpers.sh
>> +++ b/tools/testing/selftests/kselftest/ktap_helpers.sh
>> @@ -107,5 +107,9 @@ ktap_finished() {
>> }
>> ktap_print_totals() {
>> + if [ "$KTAP_CNT_SKIP" -gt 0 ]; then
>> + echo "# Skipped tests detected. " \
>> + "Consider enabling relevant config options to improve coverage."
>> + fi
>> echo "# Totals: pass:$KTAP_CNT_PASS fail:$KTAP_CNT_FAIL xfail:0
>> xpass:0 skip:$KTAP_CNT_SKIP error:0"
>> }
>
> thanks,
> -- Shuah
>
--
BR,
Muhammad Usama Anjum
s")
> Signed-off-by: guanjing
Reviewed-by: Muhammad Usama Anjum
> ---
> tools/testing/selftests/mm/pagemap_ioctl.c | 10 +-
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/tools/testing/selftests/mm/pagemap_ioctl.c
> b/tools/testing/self
ages after munmap : 100
> ok 3 : Huge pages freed successfully !
> # No. Free pages before allocation : 100
> # No. Free pages after munmap : 100
> ok 4 : Huge pages freed successfully !
> # Totals: pass:4 fail:0 xfail:0 xpass:0 skip:0 error:0
>
> Thanks
> Donet
>
>
--
BR,
Muhammad Usama Anjum
only execute if huge pages are free.
Signed-off-by: Muhammad Usama Anjum
---
Before:
TAP version 13
1..4
Bail out! Error opening file
: Read-only file system (30)
# Planned tests != run tests (4 != 0)
# Totals: pass:0 fail:0 xfail:0 xpass:0 skip:0 error:0
After:
TAP version 13
1..0 # SKIP Unab
el.org
> Cc: linux-kselft...@vger.kernel.org
> Signed-off-by: Mirsad Todorovac
Reviewed-by: Muhammad Usama Anjum
> ---
> v1: initial version.
>
> tools/testing/selftests/x86/syscall_numbering.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>
eate_guest_memfd(vm, page_size, flag);
> TEST_ASSERT(fd == -1 && errno == EINVAL,
> "guest_memfd() with flag '0x%lx' should fail with
> EINVAL",
Reviewed-by: Muhammad Usama Anjum
--
BR,
Muhammad Usama Anjum
-generic/unistd.h in
09f7298100ea ("Subject: [PATCH] userfaultfd: register uapi generic syscall
(aarch64)").
[1]
https://lore.kernel.org/all/20240912103151.1520254-1-usama.an...@collabora.com
--
BR,
/Muhammad Usama Anjum
e the child has
> a chance to start doing work.
>
> Fixes: 8c864371b2a1 ("selftests/mm: fix ARM related issue with fork after
> pthread_create")
> Signed-off-by: Edward Liaw
Reviewed-by: Muhammad Usama Anjum
> ---
> tools/testing/selftests/mm/uffd-common.c
)/tools/net/ynl GENS="$(YNL_GENS)" libynl.a
> $(Q)cp $(top_srcdir)/tools/net/ynl/libynl.a $(OUTPUT)/libynl.a
> +
> +EXTRA_CLEAN += \
> + $(top_srcdir)/tools/net/ynl/lib/__pycache__ \
> + $(top_srcdir)/tools/net/ynl/lib/*.[ado]
Reviewed-by: Muhammad Usama Anjum
--
BR,
Muhammad Usama Anjum
kdirty.c
> @@ -280,6 +280,7 @@ static void test_uffdio_copy(void)
> dst = mmap(NULL, pagesize, PROT_READ, MAP_PRIVATE|MAP_ANON, -1, 0);
> if (dst == MAP_FAILED) {
> ksft_test_result_fail("mmap() failed\n");
> + free(src);
> return;
> }
>
--
BR,
Muhammad Usama Anjum
Result with this patch
> ===
> # RUN hmm2.hmm2_device_private.double_map ...
> #OK hmm2.hmm2_device_private.double_map
> ok 53 hmm2.hmm2_device_private.double_map
>
> Signed-off-by: Donet Tom
Please add Fixes-by tag. Other than this
On 9/23/24 9:02 PM, Shuah Khan wrote:
> On 9/22/24 23:35, Muhammad Usama Anjum wrote:
>> ...
>>
>>>> grep -rnIF "#define __NR_userfaultfd"
>>>> tools/include/uapi/asm-generic/unistd.h:681:#define __NR_userfaultfd
>>>> 282
>
he correct number of this syscall on x86_64 is 323. Fix the header
to asm/unistd.h.
Fixes: a5c6bc590094 ("selftests/mm: remove local __NR_* definitions")
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/pagemap_ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
he best course of
> action.
> We might have other NR_ defines in these two files that are causing
> problems
> for tests and tools that we haven't uncovered yet.
Added authors of these patches.
>
> thanks,
> -- Shuah
--
BR,
Muhammad Usama Anjum
On 9/18/24 10:46 AM, Muhammad Usama Anjum wrote:
> On 9/17/24 6:56 AM, Shuah Khan wrote:
>> On 9/16/24 00:32, Muhammad Usama Anjum wrote:
>>> On 9/12/24 8:44 PM, Shuah Khan wrote:
>>>> On 9/12/24 04:31, Muhammad Usama Anjum wrote:
>>>>> The valu
On 9/17/24 6:56 AM, Shuah Khan wrote:
> On 9/16/24 00:32, Muhammad Usama Anjum wrote:
>> On 9/12/24 8:44 PM, Shuah Khan wrote:
>>> On 9/12/24 04:31, Muhammad Usama Anjum wrote:
>>>> The value of __NR_userfaultfd was changed to 282 when
>>>> asm-generic/u
On 9/12/24 10:28 PM, Shuah Khan wrote:
> On 9/12/24 10:10, Shuah Khan wrote:
>> On 9/12/24 04:31, Muhammad Usama Anjum wrote:
>>> The userfaultfd is enabled in the config fragment of mm selftest suite.
>>> It must always be present. If it isn't present, we should t
On 9/12/24 8:44 PM, Shuah Khan wrote:
> On 9/12/24 04:31, Muhammad Usama Anjum wrote:
>> The value of __NR_userfaultfd was changed to 282 when
>> asm-generic/unistd.h was included. It makes the test to fail every time
>> as the correct number of this syscall on x86_64 is 323.
On 9/14/24 3:33 AM, Jeff Xu wrote:
> On Mon, Aug 19, 2024 at 3:05 AM Muhammad Usama Anjum
> wrote:
>>
>> On 8/14/24 3:29 AM, Jeff Xu wrote:
>>> Hi Muhammad
>>>
>>> On Fri, Aug 9, 2024 at 1:25 AM Muhammad Usama Anjum
>>> wrote:
>>>&g
The userfaultfd is enabled in the config fragment of mm selftest suite.
It must always be present. If it isn't present, we should throw error
and not just skip. This would have helped us catch the test breakage.
Adding this now to catch the future breakages.
Signed-off-by: Muhammad Usama
ned-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/pagemap_ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/mm/pagemap_ioctl.c
b/tools/testing/selftests/mm/pagemap_ioctl.c
index fc90af2a97b80..bcc73b4e805c6 100644
--- a/tools/testing
ftest.h:74:9: error: impossible constraint in ‘asm’
>74 | __asm__ __volatile__ ("cpuid\n\t"
> \
> | ^~~
> cat_test.c:306:17: note: in expansion of macro ‘__cpuid_count’
> 306 | __cpuid_count(0x10, 2, eax, ebx,
ignature are ignored.
>
> Kernel: Linux 5.15
> Dashboard link: https://syzkaller.appspot.com/bug?extid=412c9ae97b4338c5187e
>
> ---
> [1] I expect the commit to be present in:
>
> 1. linux-5.15.y branch of
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
--
BR,
Muhammad Usama Anjum
es with
> the same signature are ignored.
>
> Kernel: Linux 5.15
> Dashboard link: https://syzkaller.appspot.com/bug?extid=412c9ae97b4338c5187e
>
> ---
> [1] I expect the commit to be present in:
>
> 1. linux-5.15.y branch of
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
--
BR,
Muhammad Usama Anjum
pfid is being set to tcon->crfid.fid and they are copied in each other
multiple times. Remove the memcopy between same pointers - memory
locations.
Addresses-Coverity: ("Overlapped copy")
Fixes: 9e81e8ff74b9 ("cifs: return cached_fid from open_shroot")
Signed-off-b
On Wed, 2021-04-14 at 14:00 +0200, Aurélien Aptel wrote:
> Muhammad Usama Anjum writes:
> > pfid is being set to tcon->crfid.fid and they are copied in each other
> > multiple times. Remove the memcopy between same pointers.
> >
> > Addresses-Coverity: ("Overla
pfid is being set to tcon->crfid.fid and they are copied in each other
multiple times. Remove the memcopy between same pointers.
Addresses-Coverity: ("Overlapped copy")
Fixes: 9e81e8ff74b9 ("cifs: return cached_fid from open_shroot")
Signed-off-by: Muhammad Usama Anju
ndef_symbol()")
Signed-off-by: Muhammad Usama Anjum
---
Only build has been tested.
tools/objtool/elf.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c
index d08f5f3670f8..17ee265a6c6b 100644
--- a/tools/objtool/
ASN.1 TPM2 key format for
the blobs")
Signed-off-by: Muhammad Usama Anjum
---
This is only build tested.
security/keys/trusted-keys/trusted_tpm2.c | 37 +++
1 file changed, 24 insertions(+), 13 deletions(-)
diff --git a/security/keys/trusted-keys/trusted_tpm2.c
b/securi
If btusb_mtk_submit_wmt_recv_urb returns error, wc should be freed and
then error should be returned to prevent memory leak.
Addresses-Coverity: ("Prevent memory leak")
Fixes: 4cbb375e997d ("Bluetooth: btusb: Fixed too many in-token issue for
Mediatek Chip.")
Signed-off-by:
Reminder!
On Mon, 2021-03-29 at 09:24 +0200, Juergen Gross wrote:
> On 26.03.21 19:14, Muhammad Usama Anjum wrote:
> > Correct enum pci_channel_io_normal should be used instead of putting
> > integer value 1.
> >
> > Fix following smatch warnings:
> > drivers/
ret variable is not being set if get_capacity returns 0 in very first
try. It should be initialized with 0 for this case.
Addresses-Coverity: ("Uninitialized variable")
Fixes: d3c4a43d92 ("block: refactor blk_drop_partitions")
Signed-off-by: Muhammad Usama Anjum
---
fs/b
On Thu, 2021-04-08 at 17:13 +, scan-ad...@coverity.com wrote:
> ** CID 1503714:(DEADCODE)
> /drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: 367 in wpa_set_auth_algs()
> /drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: 357 in wpa_set_auth_algs()
>
>
> _
nlh is being checked for validtity two times when it is dereferenced in
this function. Check for validity again when updating the flags through
nlh pointer to make the dereferencing safe.
CC:
Addresses-Coverity: ("NULL pointer dereference")
Signed-off-by: Muhammad Usama Anjum
---
can be
removed.
Addresses-Coverity: ("Same code execution")
Signed-off-by: Muhammad Usama Anjum
---
drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
b/drivers/staging/rtl8723bs/core/rtw_ieee8
("spi: orion: Use device_get_match_data() helper")
Signed-off-by: Muhammad Usama Anjum
---
drivers/spi/spi-orion.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c
index d02c5c9def20..34b31aba3981 100644
--- a/drivers/spi/spi-o
cpu_cs_base = hdev->core->cpu_cs_base;
> + wrapper_base = hdev->core->wrapper_base;
> +
> status = readl(wrapper_base + WRAPPER_INTR_STATUS);
> if (IS_V6(core)) {
> if (status & WRAPPER_INTR_STATUS_A2H_MASK ||
Reviewed-by: Muhammad Usama Anjum
devm_ioremap_resource() prints error message in itself. Remove the
dev_err call to avoid redundant error message.
Signed-off-by: Muhammad Usama Anjum
---
drivers/staging/axis-fifo/axis-fifo.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/axis-fifo/axis-fifo.c
b/drivers
devm_ioremap_resource() prints error message in itself. Remove the
dev_err call to avoid redundant error message.
Signed-off-by: Muhammad Usama Anjum
---
drivers/staging/media/meson/vdec/vdec.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/media
On Wed, 2021-04-07 at 16:05 +0200, Hans Verkuil wrote:
> Hi Muhammad,
>
> On 07/04/2021 12:10, Muhammad Usama Anjum wrote:
> > devm_ioremap_resource() prints error message in itself. Remove the
> > dev_err call to avoid redundant error message.
>
> Please split this u
devm_ioremap_resource() prints error message in itself. Remove the
dev_err call to avoid redundant error message.
Signed-off-by: Muhammad Usama Anjum
---
drivers/staging/axis-fifo/axis-fifo.c | 1 -
drivers/staging/media/meson/vdec/vdec.c | 8 ++--
2 files changed, 2 insertions(+), 7
devm_ioremap_resource() prints error message in itself. Remove the
dev_err call to avoid redundant error message.
Signed-off-by: Muhammad Usama Anjum
---
sound/soc/fsl/fsl_aud2htx.c | 4 +---
sound/soc/fsl/fsl_easrc.c | 4 +---
sound/soc/sunxi/sun4i-codec.c | 4 +---
3 files changed, 3
On Wed, 2021-03-31 at 13:22 +0500, Muhammad Usama Anjum wrote:
> On Wed, 2021-03-24 at 23:07 +0500, Muhammad Usama Anjum wrote:
> > If some error occurs, URB buffers should also be freed. If they aren't
> > freed with the dvb here, the em28xx_dvb_fini call doesn't frees t
mutex lock can be initialized with DEFINE_MUTEX() rather than
explicitly calling mutex_init().
Signed-off-by: Muhammad Usama Anjum
---
drivers/media/common/siano/smscoreapi.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/media/common/siano/smscoreapi.c
b
bpf_preload_lock is already defined with DEFINE_MUTEX. There is no need
to initialize it again. Remove the extraneous initialization.
Signed-off-by: Muhammad Usama Anjum
---
kernel/bpf/inode.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/kernel/bpf/inode.c b/kernel/bpf/inode.c
index
kfree should be used to free memory allocated by kzalloc to avoid
any overhead and for maintaining consistency.
Fixes: 5dfeb6d945 ("cifsd: use kmalloc() for small allocations")
Signed-off-by: Muhammad Usama Anjum
---
This one place was left in earlier patch. I've already receiv
kfree should be used to free memory allocated by kmalloc or kzalloc to
avoid any overhead and for maintaining consistency.
Fixes: 5dfeb6d945 ("cifsd: use kmalloc() for small allocations")
Signed-off-by: Muhammad Usama Anjum
---
fs/cifsd/buffer_pool.c | 4 ++--
fs/cifsd/mgmt/shar
igned-off-by: Muhammad Usama Anjum
---
fs/cifsd/mgmt/share_config.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/cifsd/mgmt/share_config.c b/fs/cifsd/mgmt/share_config.c
index db780febd692..b2bd789af945 100644
--- a/fs/cifsd/mgmt/share_config.c
+++ b/fs/cifsd
Hi,
`mode` remains uninitialized when `lane_phy_type` isn't PHY_TYPE_DP
or
PHY_TYPE_QSGMII. I've checked the dtsi (k3-j721e-common-proc-
board.dts)
and possible values of `lane_phy_type` are justPHY_TYPE_USB3 and
PHY_TYPE_PCIE. If this is correct, the mode will remain uninitialized with
garbage
On Fri, 2021-03-26 at 14:24 -0600, Shuah Khan wrote:
> On 3/25/21 5:46 AM, Muhammad Usama Anjum wrote:
> > The driver was assuming that all the parameters would be valid. But it
> > is possible that parameters are sent from userspace. For those cases,
> > appropriate error c
On Wed, 2021-03-31 at 11:48 +0300, Dan Carpenter wrote:
> On Mon, Mar 22, 2021 at 11:41:58PM +0500, Muhammad Usama Anjum wrote:
> > 1) Initialize the struct msghdr msg in the start of the function
> > 2) Uninitialized variable msg.msg_flags can get used if branch happens to
>
On Mon, 2021-03-22 at 23:41 +0500, Muhammad Usama Anjum wrote:
> 1) Initialize the struct msghdr msg in the start of the function
> 2) Uninitialized variable msg.msg_flags can get used if branch happens to
> out_free before initialization.
>
> So initialize variable in question
On Wed, 2021-03-24 at 23:07 +0500, Muhammad Usama Anjum wrote:
> If some error occurs, URB buffers should also be freed. If they aren't
> freed with the dvb here, the em28xx_dvb_fini call doesn't frees the URB
> buffers as dvb is set to NULL. The function in which error occurs
:got int
Signed-off-by: Muhammad Usama Anjum
---
drivers/xen/xen-pciback/pci_stub.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/xen/xen-pciback/pci_stub.c
b/drivers/xen/xen-pciback/pci_stub.c
index cb904ac83006..f8e4faa96ad6 100644
--- a/drivers/xen/xen
ned-off-by: Muhammad Usama Anjum
---
drivers/usb/usbip/vhci_hcd.c | 25 ++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/usbip/vhci_hcd.c b/drivers/usb/usbip/vhci_hcd.c
index 3209b5ddd30c..e32c080a2825 100644
--- a/drivers/usb/usbip/vhci_hcd.c
+++
The returned value by create_autodetect_quirk isn't being used other
than in the success check on next line. Remove the return value
assignement. Check for error values instead of success check.
Signed-off-by: Muhammad Usama Anjum
---
sound/usb/quirks.c | 6 +++---
1 file changed, 3 inser
On Wed, 2021-03-24 at 21:50 +0300, Dan Carpenter wrote:
> On Wed, Mar 24, 2021 at 10:26:04PM +0500, Muhammad Usama Anjum wrote:
> > Return value of usb_driver_claim_interface should not be ignored.
> > Instead it should be stored in err variable and returned from
> > this func
On Wed, 2021-03-24 at 10:36 -0700, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit:84196390 Merge tag 'selinux-pr-20210322' of git://git.kern..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=12ea778ad0
> kernel config
h with the reproducer provided by syzbot. This patch
fixes the memleak.
Reported-by: syzbot+889397c820fa56adf...@syzkaller.appspotmail.com
Signed-off-by: Muhammad Usama Anjum
---
Resending the same path as some email addresses were missing from the
earlier email.
syzbot found the following issue
The condition in switch statement `opcode & 0xf0` cannot evaluate to
0xff. So this case statement will never execute. Remove it.
Fixes: 6256e668b7 ("x86/kprobes: Use int3 instead of debug trap for
single-step")
Signed-off-by: Muhammad Usama Anjum
---
arch/x86/kernel/kprobes/cor
Return value of usb_driver_claim_interface should not be ignored.
Instead it should be stored in err variable and returned from
this function.
Signed-off-by: Muhammad Usama Anjum
---
sound/usb/quirks.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/usb/quirks.c b
On Mon, 2021-03-22 at 22:18 +0300, Dan Carpenter wrote:
> On Tue, Mar 23, 2021 at 12:12:04AM +0500, Muhammad Usama Anjum wrote:
> > When memory allocation for cdev is successful but ida_simple_get fails,
> > branch to out_kfree_cdev label happens and cdev isn't freed. Ther
When memory allocation for cdev is successful but ida_simple_get fails,
branch to out_kfree_cdev label happens and cdev isn't freed. There are
also some other cases in which the memory can leak. Fix it by freeing cdev.
Signed-off-by: Muhammad Usama Anjum
---
Fix description
drivers/th
When memory allocation for cdev is successful but ida_simple_get fails,
branch to out_kfree_cdev label happens and cdev isn't freed. There are
other some other branches in which the memory can leaked. Fix it by
freeing cdev.
Signed-off-by: Muhammad Usama Anjum
---
drivers/thermal/thermal_c
: ("Uninitialized variable")
Addresses-Coverity: ("Uninitialized variable read")
Signed-off-by: Muhammad Usama Anjum
---
fs/io_uring.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index bba74631954b..d5f83326abff 100644
On Mon, 2021-03-22 at 19:54 +0500, Muhammad Usama Anjum wrote:
> If some error occurs, URB buffers should also be freed. If they aren't
> freed with the dvb here, the em28xx_dvb_fini call doesn't frees the URB
> buffers as dvb is set to NULL. The function in which error occurs
h with the reproducer provided by syzbot. This patch
fixes the memleak.
Reported-by: syzbot+889397c820fa56adf...@syzkaller.appspotmail.com
Signed-off-by: Muhammad Usama Anjum
---
drivers/media/usb/em28xx/em28xx-dvb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/usb/em28xx/em28x
if (!lo->workqueue) {
> error = -ENOMEM;
> goto out_unlock;
Nice catch.
Reviewed-by: Muhammad Usama Anjum
There is a spelling mistake in a comment. Fix it.
Signed-off-by: Muhammad Usama Anjum
---
arch/riscv/kernel/smp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/kernel/smp.c b/arch/riscv/kernel/smp.c
index ea028d9e0d24..1ec014067855 100644
--- a/arch/riscv/kernel
in comparison expression
(different address spaces):
arch/x86/kvm//pmu.c:522:18:struct kvm_pmu_event_filter [noderef] __rcu *
arch/x86/kvm//pmu.c:522:18:struct kvm_pmu_event_filter *
Signed-off-by: Muhammad Usama Anjum
---
arch/x86/include/asm/kvm_host.h | 4 ++--
1 file changed, 2
Sparse warnings removed:
warning: Using plain integer as NULL pointer
Signed-off-by: Muhammad Usama Anjum
---
arch/x86/kvm/x86.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 884e5b3838c7..3e11065038e5 100644
--- a/arch/x86/kvm
Remove a unused variable from a function.
Signed-off-by: Muhammad Usama Anjum
---
fs/afs/file.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/afs/file.c b/fs/afs/file.c
index af162d7dab5b..cf2b664a68a5 100644
--- a/fs/afs/file.c
+++ b/fs/afs/file.c
@@ -288,7 +288,6 @@ static void
On Thu, 2021-02-18 at 10:40 +0100, Greg KH wrote:
> On Thu, Feb 18, 2021 at 02:21:54PM +0500, Muhammad Usama Anjum wrote:
> > It is wrong to change the endianness of a variable which has just one
> > byte size.
> >
> > Sparse warnings fixed:
> > drivers/stagi
1 - 100 of 111 matches
Mail list logo