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. > > > > Hi Myungho, > > > > I think this migh

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

2019-01-14 Thread Myungho Jung
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. > > Hi Myungho, > > I think this might be a better fix: > > diff --git a/net/ceph/messenger.c b/net/cep

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 Myungho Jung
On Wed, Jan 02, 2019 at 04:42:47PM +0100, Ilya Dryomov wrote: > 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_st

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

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

2018-12-27 Thread Myungho Jung
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 state to CON_STATE_STANDBY. Move con_flag_test_and_set() to be call