Re: [PATCH -next 1/5] net: ceph: Fix a typo in osdmap.c

2021-03-25 Thread Ilya Dryomov
On Thu, Mar 25, 2021 at 7:37 AM Lu Wei wrote: > > Modify "inital" to "initial" in net/ceph/osdmap.c. > > Reported-by: Hulk Robot > Signed-off-by: Lu Wei > --- > net/ceph/osdmap.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c > ind

Re: [PATCH net-next] ceph: Delete useless kfree code

2020-12-18 Thread Ilya Dryomov
On Thu, Dec 17, 2020 at 2:25 AM Jakub Kicinski wrote: > > On Wed, 16 Dec 2020 21:02:39 +0800 Zheng Yongjun wrote: > > The parameter of kfree function is NULL, so kfree code is useless, delete > > it. > > > > Signed-off-by: Zheng Yongjun > > To be clear the subject tags is misleading we're not ta

Re: [PATCH v2 31/39] docs: ABI: cleanup several ABI documents

2020-10-30 Thread Ilya Dryomov
for sysfs-bus-papr-pmem > Signed-off-by: Mauro Carvalho Chehab > > [...] > > Documentation/ABI/testing/sysfs-bus-rbd | 37 ++- Acked-by: Ilya Dryomov # for rbd Thanks, Ilya

Re: [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-10 Thread Ilya Dryomov
0/isp1760-hcd.c | 2 +- > drivers/usb/musb/cppi_dma.c | 2 +- > drivers/usb/phy/phy-fsl-usb.c | 2 +- > drivers/video/fbdev/stifb.c | 2 +- > fs/afs/yfsclient.c| 8 > fs/ceph/dir.c | 2 +- For ceph: Acked-by: Ilya Dryomov Thanks, Ilya

Re: [PATCH] libceph: Convert to use the preferred fallthrough macro

2020-08-19 Thread Ilya Dryomov
On Tue, Aug 18, 2020 at 9:56 PM Jeff Layton wrote: > > On Tue, 2020-08-18 at 08:26 -0400, Miaohe Lin wrote: > > Convert the uses of fallthrough comments to fallthrough macro. > > > > Signed-off-by: Miaohe Lin > > --- > > net/ceph/ceph_hash.c| 20 ++-- > > net/ceph/crush/mappe

Re: [PATCH] Replace HTTP links with HTTPS ones: CEPH COMMON CODE (LIBCEPH)

2020-07-08 Thread Ilya Dryomov
On Wed, Jul 8, 2020 at 8:53 AM Alexander A. Klimov wrote: > > Rationale: > Reduces attack surface on kernel devs opening the links for MITM > as HTTPS traffic is much harder to manipulate. > > Deterministic algorithm: > For each file: > If not .svg: > For each line: > If doesn't contai

Re: [PATCH net-next] libceph, ceph: use struct_size() in kmalloc()

2019-01-17 Thread Ilya Dryomov
On Tue, Jan 15, 2019 at 8:41 PM Gustavo A. R. Silva wrote: > > One of the more common cases of allocation size calculations is finding > the size of a structure that has a zero-sized array at the end, along > with memory for some number of elements for that array. For example: > > struct foo { >

Re: [PATCH] libceph: protect pending flags in ceph_con_keepalive()

2019-01-15 Thread Ilya Dryomov
On Tue, Jan 15, 2019 at 7:56 AM Myungho Jung wrote: > > On Mon, Jan 14, 2019 at 09:37:25PM +0100, Ilya Dryomov wrote: > > On Thu, Jan 3, 2019 at 4:50 AM Myungho Jung wrote: > > > I reproduced on vm using syzkaller utils and verified the fix by syzbot. > > > >

Re: [PATCH] libceph: protect pending flags in ceph_con_keepalive()

2019-01-14 Thread Ilya Dryomov
On Thu, Jan 3, 2019 at 4:50 AM Myungho Jung wrote: > I reproduced on vm using syzkaller utils and verified the fix by syzbot. Hi Myungho, I think this might be a better fix: diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index d5718284db57..c5f5313e3537 100644 --- a/net/ceph/messenger

Re: [PATCH] libceph: protect pending flags in ceph_con_keepalive()

2019-01-02 Thread Ilya Dryomov
On Thu, Dec 27, 2018 at 8:08 PM Myungho Jung wrote: > > con_flag_test_and_set() sets CON_FLAG_KEEPALIVE_PENDING and > CON_FLAG_WRITE_PENDING flags without protection in ceph_con_keepalive(). > It triggers WARN_ON() in clear_standby() if the flags are set after > con_fault() changes connection stat

Re: [PATCH V2] libceph: fix use after free

2018-11-27 Thread Ilya Dryomov
On Tue, Nov 27, 2018 at 10:22 AM Pan Bian wrote: > > The function ceph_monc_handle_map calls kfree(old) to free the old > monitor map, old points to monc->monmap. However, after that, it reads > monc->monmap->epoch and passes it to __ceph_monc_got_map. This will > result in a use-after-free bug. T

Re: [PATCH PATCH net-next 07/18] ceph: fix whitespace

2018-07-25 Thread Ilya Dryomov
On Tue, Jul 24, 2018 at 9:31 PM Stephen Hemminger wrote: > > Remove blank lines at end of file and trailing whitespace. > > Signed-off-by: Stephen Hemminger > --- > net/ceph/Kconfig | 1 - > net/ceph/Makefile | 1 - > net/ceph/auth_none.c | 1 - > net/ceph/auth_none.h | 1 - > net/cep

Re: [PATCH] libceph: use 64-bit arithmetic instead of 32-bit

2018-01-31 Thread Ilya Dryomov
On Wed, Jan 31, 2018 at 6:29 AM, Gustavo A. R. Silva wrote: > Cast objsetno to u64 in order to give the compiler complete > information about the proper arithmetic to use. Notice > that this variable is used in a context that expects an > expression of type u64 (64 bits, unsigned). > > The express

Re: [PATCH] ceph: Check memory allocation result

2018-01-29 Thread Ilya Dryomov
On Fri, Jan 26, 2018 at 7:54 AM, Chengguang Xu wrote: > Should check result of kstrndup() in case of memory allocation failure. > > Signed-off-by: Chengguang Xu > --- > net/ceph/ceph_common.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_comm

Re: [PATCH] libceph: don't WARN() if user tries to add invalid key

2017-11-07 Thread Ilya Dryomov
On Tue, Nov 7, 2017 at 6:57 AM, Eric Biggers wrote: > From: Eric Biggers > > The WARN_ON(!key->len) in set_secret() in net/ceph/crypto.c is hit if a > user tries to add a key of type "ceph" with an invalid payload as > follows (assuming CONFIG_CEPH_LIB=y): > > echo -e -n '\x01\x00\x00\x00\x00

Re: [PATCH] net: ceph: mark expected switch fall-throughs

2017-10-16 Thread Ilya Dryomov
On Sun, Oct 15, 2017 at 7:55 PM, Gustavo A. R. Silva wrote: > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > Signed-off-by: Gustavo A. R. Silva > --- > net/ceph/ceph_hash.c | 12 +++- > net/ceph/messenger.c | 1 + > n

Re: [PATCH] libceph: potential NULL dereference in ceph_msg_data_create()

2017-07-17 Thread Ilya Dryomov
On Mon, Jul 17, 2017 at 10:13 AM, Dan Carpenter wrote: > If kmem_cache_zalloc() returns NULL then the INIT_LIST_HEAD(&data->links); > will Oops. The callers aren't really prepared for NULL returns so it > doesn't make a lot of difference in real life. > > Fixes: 5240d9f95dfe ("libceph: replace me

Re: [PATCH net] libceph: osdmap: Fix some NULL dereferences

2017-07-13 Thread Ilya Dryomov
On Thu, Jul 13, 2017 at 9:45 AM, Dan Carpenter wrote: > There are hidden gotos in the ceph_decode_* macros. We need to set the > "err" variable on these error paths otherwise we end up returning > ERR_PTR(0) which is NULL. It causes NULL dereferences in the callers. > > Fixes: 278b1d709c6a ("lib

Re: [PATCH 06/23] net, ceph: convert ceph_pagelist.refcnt from atomic_t to refcount_t

2017-03-24 Thread Ilya Dryomov
On Fri, Mar 17, 2017 at 1:10 PM, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free > situations. > > Signed

Re: [PATCH 05/23] net, ceph: convert ceph_osd.o_ref from atomic_t to refcount_t

2017-03-24 Thread Ilya Dryomov
On Fri, Mar 17, 2017 at 1:10 PM, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free > situations. > > Signed

Re: [PATCH 04/23] net, ceph: convert ceph_snap_context.nref from atomic_t to refcount_t

2017-03-24 Thread Ilya Dryomov
On Fri, Mar 17, 2017 at 1:10 PM, Elena Reshetova wrote: > refcount_t type and corresponding API should be > used instead of atomic_t when the variable is used as > a reference counter. This allows to avoid accidental > refcounter overflows that might lead to use-after-free > situations. > > Signed

Re: [PATCH 1/2] libceph: Remove unneeded stddef.h include

2017-02-06 Thread Ilya Dryomov
On Sun, Feb 5, 2017 at 8:07 AM, Stafford Horne wrote: > This was causing a build failure for openrisc when using musl and > gcc 5.4.0 since the file is not available in the toolchain. > > It doesnt seem this is needed and removing it does not cause any build > warnings for me. > > Signed-off-by: S

Re: [PATCH 5/6] treewide: use kv[mz]alloc* rather than opencoded variants

2017-01-25 Thread Ilya Dryomov
On Wed, Jan 25, 2017 at 2:09 PM, Michal Hocko wrote: > On Wed 25-01-17 12:15:59, Vlastimil Babka wrote: >> On 01/24/2017 04:00 PM, Michal Hocko wrote: >> > > > Well, I am not opposed to kvmalloc_array but I would argue that this >> > > > conversion cannot introduce new overflow issues. The code wo

Re: [PATCH 5/6] treewide: use kv[mz]alloc* rather than opencoded variants

2017-01-12 Thread Ilya Dryomov
> Cc: Yishai Hadas > Cc: Dan Williams > Cc: Oleg Drokin > Cc: Andreas Dilger > Cc: Boris Ostrovsky > Cc: David Sterba > Cc: "Yan, Zheng" > Cc: Ilya Dryomov > Cc: Alexander Viro > Cc: Alexei Starovoitov > Cc: Eric Dumazet >

Re: [PATCH 3/3] libceph: use KMEM_CACHE macro

2016-03-22 Thread Ilya Dryomov
On Sun, Mar 13, 2016 at 8:18 AM, Geliang Tang wrote: > Use KMEM_CACHE() instead of kmem_cache_create() to simplify the code. > > Signed-off-by: Geliang Tang > --- > net/ceph/messenger.c | 10 ++ > net/ceph/osd_client.c | 5 + > 2 files changed, 3 insertions(+), 12 deletions(-) > >

BUG: held lock freed! - request_sock_queue::rskq_lock

2016-02-11 Thread Ilya Dryomov
Hi Eric, I'm hitting the following splat (attached in full): kernel: = kernel: [ BUG: held lock freed! ] kernel: 4.5.0-rc1-ceph-00026-g5e0a311 #1 Not tainted kernel: - kernel: swapper/5/0 is freeing memory 880035c9d200-880035c9dbff, with a l

Re: [PATCH 16/26] libceph: Use skcipher

2016-01-26 Thread Ilya Dryomov
On Tue, Jan 26, 2016 at 11:54 AM, Herbert Xu wrote: > On Mon, Jan 25, 2016 at 05:18:47PM +0100, Ilya Dryomov wrote: >> >> Could you get rid of ivsize instead of assigning to it - see the >> attached diff? > > How about an incremental patch like this? Thanks! > &

Re: [PATCH 16/26] libceph: Use skcipher

2016-01-25 Thread Ilya Dryomov
deletions(-) Could you get rid of ivsize instead of assigning to it - see the attached diff? Otherwise: Acked-by: Ilya Dryomov Thanks, Ilya diff --git a/net/ceph/crypto.c b/net/ceph/crypto.c index 42e8649c6e79..db2847ac5f12 100644 --- a/net/ceph/crypto.c +++ b/net/ceph/crypto.c @

Re: [PATCH 2/3] net/ceph: do not define list_entry_next

2015-11-18 Thread Ilya Dryomov
On Wed, Nov 18, 2015 at 1:13 PM, Sergey Senozhatsky wrote: > Cosmetic. > > Do not define list_entry_next() and use list_next_entry() > from list.h. > > Signed-off-by: Sergey Senozhatsky > --- > net/ceph/messenger.c | 8 +++- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/

Re: [PATCH 2/3] libceph: use list_next_entry instead of list_entry_next

2015-11-17 Thread Ilya Dryomov
On Mon, Nov 16, 2015 at 2:46 PM, Geliang Tang wrote: > list_next_entry has been defined in list.h, so I replace list_entry_next > with it. > > Signed-off-by: Geliang Tang > --- > net/ceph/messenger.c | 7 ++- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/net/ceph/messeng

Re: [PATCH] ceph:Remove unused goto labels in decode crush map functions

2015-10-02 Thread Ilya Dryomov
On Fri, Oct 2, 2015 at 9:48 PM, Nicholas Krause wrote: > This removes unused goto labels in decode crush map functions related > to error paths due to them never being used on any error path for these > particular functions in the file, osdmap.c. > > Signed-off-by: Nicholas Krause > --- > net/ce

Re: [PATCH] crush:Make the function crush_ln static

2015-06-16 Thread Ilya Dryomov
On Tue, Jun 16, 2015 at 8:22 PM, nick wrote: > > > On 2015-06-16 01:16 PM, Ilya Dryomov wrote: >> On Tue, Jun 16, 2015 at 8:07 PM, nick wrote: >>> >>> >>> On 2015-06-16 12:47 PM, Ilya Dryomov wrote: >>>> On Tue, Jun 16, 2015 at 7:18 PM,

Re: [PATCH] crush:Make the function crush_ln static

2015-06-16 Thread Ilya Dryomov
On Tue, Jun 16, 2015 at 8:07 PM, nick wrote: > > > On 2015-06-16 12:47 PM, Ilya Dryomov wrote: >> On Tue, Jun 16, 2015 at 7:18 PM, nick wrote: >>> Ilya, >>> That's fine I do have a unrelated question through. I have over 90 patches >>> lying aroun

Re: [PATCH] crush:Make the function crush_ln static

2015-06-16 Thread Ilya Dryomov
On Tue, Jun 16, 2015 at 7:57 PM, nick wrote: > > > On 2015-06-16 12:47 PM, Ilya Dryomov wrote: >> On Tue, Jun 16, 2015 at 7:18 PM, nick wrote: >>> Ilya, >>> That's fine I do have a unrelated question through. I have over 90 patches >>> lying aroun

Re: [PATCH] crush:Make the function crush_ln static

2015-06-16 Thread Ilya Dryomov
On Tue, Jun 16, 2015 at 7:18 PM, nick wrote: > Ilya, > That's fine I do have a unrelated question through. I have over 90 patches > lying around in terms of cleanups/ > fixes and need help getting them merged. Should I just resend them or wait > until the end of this merge window. Are all of th

Re: [PATCH] crush:Make the function crush_ln static

2015-06-16 Thread Ilya Dryomov
On Tue, Jun 9, 2015 at 11:00 AM, Ilya Dryomov wrote: > On Tue, Jun 9, 2015 at 1:51 AM, Nicholas Krause wrote: >> This makes the function, crush_ln static now due to having >> only one caller in its own definition and declaration file >> of mapper.c >> >&g

Re: [PATCH] crush:Make the function crush_ln static

2015-06-09 Thread Ilya Dryomov
On Tue, Jun 9, 2015 at 1:51 AM, Nicholas Krause wrote: > This makes the function, crush_ln static now due to having > only one caller in its own definition and declaration file > of mapper.c > > Signed-off-by: Nicholas Krause > --- > net/ceph/crush/mapper.c | 2 +- > 1 file changed, 1 insertion(

Re: [PATCH] libceph: use kvfree() in ceph_put_page_vector()

2015-06-01 Thread Ilya Dryomov
On Mon, Jun 1, 2015 at 5:36 PM, Geliang Tang wrote: > Use kvfree() instead of open-coding it. > > Signed-off-by: Geliang Tang > --- > net/ceph/pagevec.c | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/net/ceph/pagevec.c b/net/ceph/pagevec.c > index 096d914..d4f5f22 1

Re: randconfig build error with next-20150421, in net/ceph

2015-04-21 Thread Ilya Dryomov
On Tue, Apr 21, 2015 at 7:21 PM, Sage Weil wrote: > On Tue, 21 Apr 2015, Guenter Roeck wrote: >> On Tue, Apr 21, 2015 at 08:10:44AM -0700, Jim Davis wrote: >> > Building with the attached random configuration file, >> > >> > ERROR: "__divdi3" [net/ceph/libceph.ko] undefined! >> >> Commit 7321f19d